require('./sourcemap-register.js');module.exports = /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 87932: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"name\":\"openid-client\",\"version\":\"4.7.3\",\"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\",\"lint-ts\":\"npx typescript@~3.6.0 --build types\",\"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}]}}"); /***/ }), /***/ 94822: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); const model_1 = __webpack_require__(41359); const cli_1 = __webpack_require__(55651); const mac_builder_1 = __importDefault(__webpack_require__(39364)); const platform_setup_1 = __importDefault(__webpack_require__(64423)); function runMain() { return __awaiter(this, void 0, void 0, function* () { try { model_1.Action.checkCompatibility(); model_1.Cache.verify(); const { dockerfile, workspace, actionFolder } = model_1.Action; const buildParameters = yield model_1.BuildParameters.create(); const baseImage = new model_1.ImageTag(buildParameters); let builtImage; if (buildParameters.cloudRunnerCluster && buildParameters.cloudRunnerCluster !== '' && buildParameters.cloudRunnerCluster !== 'local') { yield model_1.CloudRunner.run(buildParameters, baseImage.toString()); } else { core.info('Building locally'); yield platform_setup_1.default.setup(buildParameters, actionFolder); if (process.platform === 'darwin') { mac_builder_1.default.run(actionFolder, workspace, buildParameters); } else { builtImage = yield model_1.Docker.build({ path: actionFolder, dockerfile, baseImage }); yield model_1.Docker.run(builtImage, Object.assign({ workspace }, buildParameters)); } } // Set output yield model_1.Output.setBuildVersion(buildParameters.buildVersion); } catch (error) { core.setFailed(error.message); } }); } const options = cli_1.CLI.SetupCli(); if (cli_1.CLI.isCliMode(options)) { cli_1.CLI.RunCli(options); } else { runMain(); } /***/ }), /***/ 89088: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const path_1 = __importDefault(__webpack_require__(85622)); class Action { static get supportedPlatforms() { return ['linux', 'win32', 'darwin']; } static get isRunningLocally() { return process.env.RUNNER_WORKSPACE === undefined; } static get isRunningFromSource() { return path_1.default.basename(__dirname) === 'model'; } static get canonicalName() { return 'unity-builder'; } static get rootFolder() { if (Action.isRunningFromSource) { return path_1.default.dirname(path_1.default.dirname(path_1.default.dirname(__filename))); } return path_1.default.dirname(path_1.default.dirname(__filename)); } static get actionFolder() { return `${Action.rootFolder}/dist`; } static get dockerfile() { const currentPlatform = process.platform; switch (currentPlatform) { case 'linux': return `${Action.actionFolder}/platforms/ubuntu/Dockerfile`; case 'win32': return `${Action.actionFolder}/platforms/windows/Dockerfile`; case 'darwin': return 'unused'; //Mac doesn't use a container default: throw new Error(`No Dockerfile for currently unsupported platform: ${currentPlatform}`); } } static get workspace() { return process.env.GITHUB_WORKSPACE; } static checkCompatibility() { const currentPlatform = process.platform; if (!Action.supportedPlatforms.includes(currentPlatform)) { throw new Error(`Currently ${currentPlatform}-platform is not supported`); } } } exports.default = Action; /***/ }), /***/ 43059: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); const semver = __importStar(__webpack_require__(11383)); class AndroidVersioning { static determineVersionCode(version, inputVersionCode) { if (!inputVersionCode) { return AndroidVersioning.versionToVersionCode(version); } return inputVersionCode; } static versionToVersionCode(version) { if (version === 'none') { core.info(`Versioning strategy is set to ${version}, so android version code should not be applied.`); return 0; } const parsedVersion = semver.parse(version); if (!parsedVersion) { core.warning(`Could not parse "${version}" to semver, defaulting android version code to 1`); return 1; } // The greatest value Google Plays allows is 2100000000. // Allow for 3 patch digits, 3 minor digits and 3 major digits. const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch; if (versionCode >= 2050000000) { throw new Error(`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`); } core.info(`Using android versionCode ${versionCode}`); return versionCode; } static determineSdkManagerParameters(targetSdkVersion) { const parsedVersion = Number.parseInt(targetSdkVersion.slice(-2), 10); return Number.isNaN(parsedVersion) ? '' : `platforms;android-${parsedVersion}`; } } exports.default = AndroidVersioning; /***/ }), /***/ 80787: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const nanoid_1 = __webpack_require__(39140); const core = __importStar(__webpack_require__(42186)); const android_versioning_1 = __importDefault(__webpack_require__(43059)); const cloud_runner_constants_1 = __importDefault(__webpack_require__(91311)); const cloud_runner_namespace_1 = __importDefault(__webpack_require__(63287)); const input_1 = __importDefault(__webpack_require__(91933)); const platform_1 = __importDefault(__webpack_require__(9707)); const unity_versioning_1 = __importDefault(__webpack_require__(17146)); const versioning_1 = __importDefault(__webpack_require__(88729)); class BuildParameters { static create() { return __awaiter(this, void 0, void 0, function* () { const buildFile = this.parseBuildFile(input_1.default.buildName, input_1.default.targetPlatform, input_1.default.androidAppBundle); const unityVersion = unity_versioning_1.default.determineUnityVersion(input_1.default.projectPath, input_1.default.unityVersion); const buildVersion = yield versioning_1.default.determineVersion(input_1.default.versioningStrategy, input_1.default.specifiedVersion); const androidVersionCode = android_versioning_1.default.determineVersionCode(buildVersion, input_1.default.androidVersionCode); const androidSdkManagerParameters = android_versioning_1.default.determineSdkManagerParameters(input_1.default.androidTargetSdkVersion); let unitySerial = ''; if (!process.env.UNITY_SERIAL) { //No serial was present so it is a personal license that we need to convert if (!process.env.UNITY_LICENSE) { throw new Error(`Missing Unity License File and no Serial was found. If this is a personal license, make sure to follow the activation steps and set the UNITY_LICENSE GitHub secret or enter a Unity serial number inside the UNITY_SERIAL GitHub secret.`); } unitySerial = this.getSerialFromLicenseFile(process.env.UNITY_LICENSE); } else { unitySerial = process.env.UNITY_SERIAL; } core.setSecret(unitySerial); return { version: unityVersion, customImage: input_1.default.customImage, unitySerial, runnerTempPath: process.env.RUNNER_TEMP, platform: input_1.default.targetPlatform, projectPath: input_1.default.projectPath, buildName: input_1.default.buildName, buildPath: `${input_1.default.buildsPath}/${input_1.default.targetPlatform}`, buildFile, buildMethod: input_1.default.buildMethod, buildVersion, androidVersionCode, androidKeystoreName: input_1.default.androidKeystoreName, androidKeystoreBase64: input_1.default.androidKeystoreBase64, androidKeystorePass: input_1.default.androidKeystorePass, androidKeyaliasName: input_1.default.androidKeyaliasName, androidKeyaliasPass: input_1.default.androidKeyaliasPass, androidTargetSdkVersion: input_1.default.androidTargetSdkVersion, androidSdkManagerParameters, customParameters: input_1.default.customParameters, sshAgent: input_1.default.sshAgent, gitPrivateToken: yield input_1.default.gitPrivateToken(), chownFilesTo: input_1.default.chownFilesTo, cloudRunnerCluster: input_1.default.cloudRunnerCluster, awsBaseStackName: input_1.default.awsBaseStackName, kubeConfig: input_1.default.kubeConfig, githubToken: yield input_1.default.githubToken(), cloudRunnerMemory: input_1.default.cloudRunnerMemory, cloudRunnerCpu: input_1.default.cloudRunnerCpu, kubeVolumeSize: input_1.default.kubeVolumeSize, kubeVolume: input_1.default.kubeVolume, postBuildSteps: input_1.default.postBuildSteps, preBuildSteps: input_1.default.preBuildSteps, customJob: input_1.default.customJob, runNumber: input_1.default.runNumber, branch: yield input_1.default.branch(), githubRepo: yield input_1.default.githubRepo(), remoteBuildCluster: input_1.default.cloudRunnerCluster, awsStackName: input_1.default.awsBaseStackName, gitSha: input_1.default.gitSha, logId: nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 9)(), buildGuid: cloud_runner_namespace_1.default.generateBuildName(input_1.default.runNumber, input_1.default.targetPlatform), }; }); } static parseBuildFile(filename, platform, androidAppBundle) { if (platform_1.default.isWindows(platform)) { return `${filename}.exe`; } if (platform_1.default.isAndroid(platform)) { return androidAppBundle ? `${filename}.aab` : `${filename}.apk`; } return filename; } static getSerialFromLicenseFile(license) { const startKey = ``; const startIndex = license.indexOf(startKey) + startKey.length; if (startIndex < 0) { throw new Error(`License File was corrupted, unable to locate serial`); } const endIndex = license.indexOf(endKey, startIndex); // Slice off the first 4 characters as they are garbage values return Buffer.from(license.slice(startIndex, endIndex), 'base64').toString('binary').slice(4); } } exports.default = BuildParameters; /***/ }), /***/ 97134: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); const fs_1 = __importDefault(__webpack_require__(35747)); const action_1 = __importDefault(__webpack_require__(89088)); const project_1 = __importDefault(__webpack_require__(88666)); class Cache { static verify() { if (!fs_1.default.existsSync(project_1.default.libraryFolder)) { this.notifyAboutCachingPossibility(); } } static notifyAboutCachingPossibility() { if (action_1.default.isRunningLocally) { return; } core.warning(` Library folder does not exist. Consider setting up caching to speed up your workflow, if this is not your first build. `); } } exports.default = Cache; /***/ }), /***/ 8731: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.GetAllCliModes = exports.GetCliFunctions = exports.CliFunction = void 0; const targets = new Array(); function CliFunction(key, description) { return function (target, propertyKey, descriptor) { targets.push({ target, propertyKey, descriptor, key, description, }); }; } exports.CliFunction = CliFunction; function GetCliFunctions(key) { return targets.find((x) => x.key === key); } exports.GetCliFunctions = GetCliFunctions; function GetAllCliModes() { return targets.map((x) => { return { key: x.key, description: x.description, }; }); } exports.GetAllCliModes = GetAllCliModes; /***/ }), /***/ 55651: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __decorate = (this && this.__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; }; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CLI = void 0; const commander_ts_1 = __webpack_require__(40451); const __1 = __webpack_require__(41359); const core = __importStar(__webpack_require__(42186)); const action_yaml_1 = __webpack_require__(11091); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cli_decorator_1 = __webpack_require__(8731); const remote_client_logger_1 = __webpack_require__(28082); const cloud_runner_state_1 = __webpack_require__(70912); const setup_cloud_runner_repository_1 = __webpack_require__(39656); const SDK = __importStar(__webpack_require__(71786)); class CLI { static RunCli(options) { return __awaiter(this, void 0, void 0, function* () { __1.Input.githubInputEnabled = false; const results = cli_decorator_1.GetCliFunctions(options.mode); if (results === undefined || results.length === 0) { throw new Error('no CLI mode found'); } cloud_runner_logger_1.default.log(`Entrypoint: ${results.key}`); options.versioning = 'None'; __1.Input.cliOptions = options; return yield results.target[results.propertyKey](); }); } static isCliMode(options) { return options.mode !== undefined && options.mode !== ''; } static SetupCli() { const program = new commander_ts_1.Command(); program.version('0.0.1'); const properties = Object.getOwnPropertyNames(__1.Input); core.info(`\n`); core.info(`INPUT:`); const actionYamlReader = new action_yaml_1.ActionYamlReader(); for (const element of properties) { program.option(`--${element} <${element}>`, actionYamlReader.GetActionYamlValue(element)); if (__1.Input[element] !== undefined && __1.Input[element] !== '' && typeof __1.Input[element] !== `function`) { core.info(`${element} ${__1.Input[element]}`); } } core.info(`\n`); program.option('-m, --mode ', cli_decorator_1.GetAllCliModes() .map((x) => `${x.key} (${x.description})`) .join(` | `)); program.parse(process.argv); return program.opts(); } static CLIBuild() { return __awaiter(this, void 0, void 0, function* () { const buildParameter = yield __1.BuildParameters.create(); const baseImage = new __1.ImageTag(buildParameter); return yield __1.CloudRunner.run(buildParameter, baseImage.toString()); }); } static runRemoteClientJob() { return __awaiter(this, void 0, void 0, function* () { const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); remote_client_logger_1.RemoteClientLogger.log(`Build Params: ${JSON.stringify(buildParameter, undefined, 4)} `); cloud_runner_state_1.CloudRunnerState.setup(buildParameter); yield setup_cloud_runner_repository_1.SetupCloudRunnerRepository.run(); }); } static cachePush() { return __awaiter(this, void 0, void 0, function* () { }); } static cachePull() { return __awaiter(this, void 0, void 0, function* () { }); } static garbageCollectAws() { return __awaiter(this, void 0, void 0, function* () { process.env.AWS_REGION = __1.Input.region; const CF = new SDK.CloudFormation(); const stacks = yield CF.listStacks().promise(); cloud_runner_logger_1.default.log(JSON.stringify(stacks, undefined, 4)); }); } } __decorate([ cli_decorator_1.CliFunction(`cli`, `runs a cloud runner build`) ], CLI, "CLIBuild", null); __decorate([ cli_decorator_1.CliFunction(`remote-cli`, `sets up a repository, usually before a game-ci build`) ], CLI, "runRemoteClientJob", null); __decorate([ cli_decorator_1.CliFunction(`cach-push`, `push to cache`) ], CLI, "cachePush", null); __decorate([ cli_decorator_1.CliFunction(`cach-pull`, `pull from cache`) ], CLI, "cachePull", null); __decorate([ cli_decorator_1.CliFunction(`garbage-collect-aws`, `garbage collect aws`) ], CLI, "garbageCollectAws", null); exports.CLI = CLI; /***/ }), /***/ 38759: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Caching = void 0; const console_1 = __webpack_require__(57082); const fs_1 = __importDefault(__webpack_require__(35747)); const path_1 = __importDefault(__webpack_require__(85622)); const __1 = __webpack_require__(41359); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cloud_runner_state_1 = __webpack_require__(70912); const cloud_runner_system_1 = __webpack_require__(66879); const lfs_hashing_1 = __webpack_require__(31938); const remote_client_logger_1 = __webpack_require__(28082); class Caching { static PushToCache(cacheFolder, sourceFolder, cacheKey) { return __awaiter(this, void 0, void 0, function* () { const startPath = process.cwd(); try { if (!fs_1.default.existsSync(cacheFolder)) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cacheFolder}`); } process.chdir(path_1.default.resolve(sourceFolder, '..')); if (__1.Input.cloudRunnerTests) { cloud_runner_logger_1.default.log(`Hashed cache folder ${yield lfs_hashing_1.LFSHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${path_1.default.basename(sourceFolder)}`); } if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${path_1.default.basename(sourceFolder)}`); } yield cloud_runner_system_1.CloudRunnerSystem.Run(`zip ${cacheKey}.zip ${path_1.default.basename(sourceFolder)}`); console_1.assert(fs_1.default.existsSync(`${cacheKey}.zip`), 'cache zip exists'); console_1.assert(fs_1.default.existsSync(path_1.default.basename(sourceFolder)), 'source folder exists'); yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`); remote_client_logger_1.RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`); console_1.assert(fs_1.default.existsSync(`${path_1.default.join(cacheFolder, cacheKey)}.zip`), 'cache zip exists inside cache folder'); if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${cacheFolder}`); } } catch (error) { process.chdir(`${startPath}`); throw error; } process.chdir(`${startPath}`); }); } static PullFromCache(cacheFolder, destinationFolder, cacheKey = ``) { return __awaiter(this, void 0, void 0, function* () { const startPath = process.cwd(); remote_client_logger_1.RemoteClientLogger.log(`Caching for ${path_1.default.basename(destinationFolder)}`); try { if (!fs_1.default.existsSync(cacheFolder)) { fs_1.default.mkdirSync(cacheFolder); } if (!fs_1.default.existsSync(destinationFolder)) { fs_1.default.mkdirSync(destinationFolder); } const latestInBranch = yield (yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -t "${cacheFolder}" | grep .zip$ | head -1`)) .replace(/\n/g, ``) .replace('.zip', ''); process.chdir(cacheFolder); const cacheSelection = cacheKey !== `` && fs_1.default.existsSync(`${cacheKey}.zip`) ? cacheKey : latestInBranch; yield cloud_runner_logger_1.default.log(`cache key ${cacheKey} selection ${cacheSelection}`); if (fs_1.default.existsSync(`${cacheSelection}.zip`)) { const resultsFolder = `results${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}`; yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${resultsFolder}`); if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationFolder}`); } remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`); console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`); console_1.assert(`${fs_1.default.existsSync(`${cacheSelection}.zip`)}`); const fullResultsFolder = path_1.default.join(cacheFolder, resultsFolder); if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`); } yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path_1.default.basename(resultsFolder)}`); remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullResultsFolder}`); console_1.assert(`${fs_1.default.existsSync(fullResultsFolder)}`); const destinationParentFolder = path_1.default.resolve(destinationFolder, '..'); if (fs_1.default.existsSync(destinationFolder)) { fs_1.default.rmSync(destinationFolder, { recursive: true, force: true }); } yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullResultsFolder}/${path_1.default.basename(destinationFolder)}" "${destinationParentFolder}"`); if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationParentFolder}`); } } else { remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); if (cacheSelection !== ``) { if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`); } remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey}.zip doesn't exist ${destinationFolder}`); throw new Error(`Failed to get cache item, but cache hit was found: ${cacheSelection}`); } } } catch (error) { process.chdir(`${startPath}`); throw error; } process.chdir(`${startPath}`); }); } static handleCachePurging() { if (process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined) { remote_client_logger_1.RemoteClientLogger.log(`purging ${cloud_runner_state_1.CloudRunnerState.purgeRemoteCaching}`); fs_1.default.rmdirSync(cloud_runner_state_1.CloudRunnerState.cacheFolder, { recursive: true }); } } } exports.Caching = Caching; /***/ }), /***/ 66879: /***/ (function(__unused_webpack_module, exports, __webpack_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.CloudRunnerSystem = void 0; const child_process_1 = __webpack_require__(63129); const remote_client_logger_1 = __webpack_require__(28082); class CloudRunnerSystem { static Run(command, suppressError = false) { return __awaiter(this, void 0, void 0, function* () { for (const element of command.split(`\n`)) { remote_client_logger_1.RemoteClientLogger.log(element); } return yield new Promise((promise) => { let output = ''; const child = child_process_1.exec(command, (error, stdout, stderr) => { if (error && !suppressError) { throw error; } if (stderr) { const diagnosticOutput = `${stderr.toString()}`; remote_client_logger_1.RemoteClientLogger.logCliDiagnostic(diagnosticOutput); output += diagnosticOutput; return; } const outputChunk = `${stdout}`; output += outputChunk; }); child.on('close', function (code) { remote_client_logger_1.RemoteClientLogger.log(`[Exit code ${code}]`); if (code !== 0 && !suppressError) { throw new Error(output); } const outputLines = output.split(`\n`); for (const element of outputLines) { remote_client_logger_1.RemoteClientLogger.log(element); } promise(output); }); }); }); } } exports.CloudRunnerSystem = CloudRunnerSystem; /***/ }), /***/ 31938: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LFSHashing = void 0; const path_1 = __importDefault(__webpack_require__(85622)); const cloud_runner_state_1 = __webpack_require__(70912); const cloud_runner_system_1 = __webpack_require__(66879); const fs_1 = __importDefault(__webpack_require__(35747)); const console_1 = __webpack_require__(57082); const __1 = __webpack_require__(41359); const remote_client_logger_1 = __webpack_require__(28082); class LFSHashing { static createLFSHashFiles() { return __awaiter(this, void 0, void 0, function* () { try { yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`md5sum .lfs-assets-guid > .lfs-assets-guid-sum`); console_1.assert(fs_1.default.existsSync(`.lfs-assets-guid-sum`)); console_1.assert(fs_1.default.existsSync(`.lfs-assets-guid`)); const lfsHashes = { lfsGuid: fs_1.default .readFileSync(`${path_1.default.join(cloud_runner_state_1.CloudRunnerState.repoPathFull, `.lfs-assets-guid`)}`, 'utf8') .replace(/\n/g, ``), lfsGuidSum: fs_1.default .readFileSync(`${path_1.default.join(cloud_runner_state_1.CloudRunnerState.repoPathFull, `.lfs-assets-guid-sum`)}`, 'utf8') .replace(/\n/g, ``), }; if (__1.Input.cloudRunnerTests) { remote_client_logger_1.RemoteClientLogger.log(lfsHashes.lfsGuid); remote_client_logger_1.RemoteClientLogger.log(lfsHashes.lfsGuidSum); } return lfsHashes; } catch (error) { throw error; } }); } static hashAllFiles(folder) { return __awaiter(this, void 0, void 0, function* () { const startPath = process.cwd(); process.chdir(folder); const result = yield (yield cloud_runner_system_1.CloudRunnerSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`)) .replace(/\n/g, '') .split(` `)[0]; process.chdir(startPath); return result; }); } } exports.LFSHashing = LFSHashing; /***/ }), /***/ 28082: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RemoteClientLogger = void 0; const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); class RemoteClientLogger { static log(message) { cloud_runner_logger_1.default.log(`[Client] ${message}`); } static logCliError(message) { cloud_runner_logger_1.default.log(`[Client][Error] ${message}`); } static logCliDiagnostic(message) { cloud_runner_logger_1.default.log(`[Client][Diagnostic] ${message}`); } static logWarning(message) { cloud_runner_logger_1.default.logWarning(message); } } exports.RemoteClientLogger = RemoteClientLogger; /***/ }), /***/ 39656: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SetupCloudRunnerRepository = void 0; const fs_1 = __importDefault(__webpack_require__(35747)); const cloud_runner_state_1 = __webpack_require__(70912); const caching_1 = __webpack_require__(38759); const lfs_hashing_1 = __webpack_require__(31938); const cloud_runner_system_1 = __webpack_require__(66879); const __1 = __webpack_require__(41359); const remote_client_logger_1 = __webpack_require__(28082); const path_1 = __importDefault(__webpack_require__(85622)); const console_1 = __webpack_require__(57082); class SetupCloudRunnerRepository { static run() { return __awaiter(this, void 0, void 0, function* () { try { yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.buildPathFull}`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}`); process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull); if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree`); } yield SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles(); if (__1.Input.cloudRunnerTests) { yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree`); } const lfsHashes = yield lfs_hashing_1.LFSHashing.createLFSHashFiles(); if (fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.libraryFolderFull)) { remote_client_logger_1.RemoteClientLogger.logWarning(`!Warning!: The Unity library was included in the git repository`); } yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolderFull, cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull, `${lfsHashes.lfsGuid}`); yield SetupCloudRunnerRepository.pullLatestLFS(); yield caching_1.Caching.PushToCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolderFull, cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull, `${lfsHashes.lfsGuid}`); yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.libraryCacheFolderFull, cloud_runner_state_1.CloudRunnerState.libraryFolderFull); caching_1.Caching.handleCachePurging(); } catch (error) { throw error; } }); } static cloneRepoWithoutLFSFiles() { return __awaiter(this, void 0, void 0, function* () { try { process.chdir(`${cloud_runner_state_1.CloudRunnerState.repoPathFull}`); remote_client_logger_1.RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global advice.detachedHead false`); remote_client_logger_1.RemoteClientLogger.log(`Cloning the repository being built:`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs install --skip-smudge`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`git clone ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${path_1.default.resolve(`..`, path_1.default.basename(cloud_runner_state_1.CloudRunnerState.repoPathFull))}`); console_1.assert(fs_1.default.existsSync(`.git`)); remote_client_logger_1.RemoteClientLogger.log(`${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`); console_1.assert(fs_1.default.existsSync(path_1.default.join(`.git`, `lfs`)), 'LFS folder should not exist before caching'); remote_client_logger_1.RemoteClientLogger.log(`Checked out ${process.env.GITHUB_SHA}`); } catch (error) { throw error; } }); } static pullLatestLFS() { return __awaiter(this, void 0, void 0, function* () { yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`); process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull); yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`); remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`); console_1.assert(fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull)); yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`); }); } } exports.SetupCloudRunnerRepository = SetupCloudRunnerRepository; /***/ }), /***/ 28730: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AWSBaseStack = void 0; const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const core = __importStar(__webpack_require__(42186)); const fs = __importStar(__webpack_require__(35747)); const path_1 = __importDefault(__webpack_require__(85622)); const crypto = __webpack_require__(76417); class AWSBaseStack { constructor(baseStackName) { this.baseStackName = baseStackName; } setupBaseStack(CF) { var _a, _b, _c, _d, _e; return __awaiter(this, void 0, void 0, function* () { const baseStackName = this.baseStackName; const baseStack = fs.readFileSync(path_1.default.join(__dirname, 'cloud-formations', 'base-setup.yml'), 'utf8'); // Cloud Formation Input const describeStackInput = { StackName: baseStackName, }; const parametersWithoutHash = [ { ParameterKey: 'EnvironmentName', ParameterValue: baseStackName }, ]; const parametersHash = crypto .createHash('md5') .update(baseStack + JSON.stringify(parametersWithoutHash)) .digest('hex'); const parameters = [ ...parametersWithoutHash, ...[{ ParameterKey: 'Version', ParameterValue: parametersHash }], ]; const updateInput = { StackName: baseStackName, TemplateBody: baseStack, Parameters: parameters, Capabilities: ['CAPABILITY_IAM'], }; const createStackInput = { StackName: baseStackName, TemplateBody: baseStack, Parameters: parameters, Capabilities: ['CAPABILITY_IAM'], }; const stacks = yield CF.listStacks({ StackStatusFilter: ['UPDATE_COMPLETE', 'CREATE_COMPLETE', 'ROLLBACK_COMPLETE'], }).promise(); const stackNames = ((_a = stacks.StackSummaries) === null || _a === void 0 ? void 0 : _a.map((x) => x.StackName)) || []; const stackExists = stackNames.includes(baseStackName) || false; const describeStack = () => __awaiter(this, void 0, void 0, function* () { return yield CF.describeStacks(describeStackInput).promise(); }); try { if (!stackExists) { cloud_runner_logger_1.default.log(`${baseStackName} stack does not exist (${JSON.stringify(stackNames)})`); yield CF.createStack(createStackInput).promise(); cloud_runner_logger_1.default.log(`created stack (version: ${parametersHash})`); } const CFState = yield describeStack(); let stack = (_b = CFState.Stacks) === null || _b === void 0 ? void 0 : _b[0]; if (!stack) { throw new Error(`Base stack doesn't exist, even after creation, stackExists check: ${stackExists}`); } const stackVersion = (_d = (_c = stack.Parameters) === null || _c === void 0 ? void 0 : _c.find((x) => x.ParameterKey === 'Version')) === null || _d === void 0 ? void 0 : _d.ParameterValue; if (stack.StackStatus === 'CREATE_IN_PROGRESS') { yield CF.waitFor('stackCreateComplete', describeStackInput).promise(); } if (stackExists) { cloud_runner_logger_1.default.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`); if (parametersHash !== stackVersion) { cloud_runner_logger_1.default.log(`Attempting update of base stack`); try { yield CF.updateStack(updateInput).promise(); } catch (error) { if (error['message'].includes('No updates are to be performed')) { cloud_runner_logger_1.default.log(`No updates are to be performed`); } else { cloud_runner_logger_1.default.log(`Update Failed (Stack name: ${baseStackName})`); cloud_runner_logger_1.default.log(error['message']); } cloud_runner_logger_1.default.log(`Continuing...`); } } else { cloud_runner_logger_1.default.log(`No update required`); } stack = (_e = (yield describeStack()).Stacks) === null || _e === void 0 ? void 0 : _e[0]; if (!stack) { throw new Error(`Base stack doesn't exist, even after updating and creation, stackExists check: ${stackExists}`); } if (stack.StackStatus === 'UPDATE_IN_PROGRESS') { yield CF.waitFor('stackUpdateComplete', describeStackInput).promise(); } } cloud_runner_logger_1.default.log('base stack is now ready'); } catch (error) { core.error(JSON.stringify(yield describeStack(), undefined, 4)); throw error; } }); } } exports.AWSBaseStack = AWSBaseStack; /***/ }), /***/ 83683: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AWSError = void 0; const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const core = __importStar(__webpack_require__(42186)); const __1 = __webpack_require__(41359); class AWSError { static handleStackCreationFailure(error, CF, taskDefStackName) { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.log('aws error: '); core.error(JSON.stringify(error, undefined, 4)); if (__1.Input.cloudRunnerTests) { cloud_runner_logger_1.default.log('Getting events and resources for task stack'); const events = (yield CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents; cloud_runner_logger_1.default.log(JSON.stringify(events, undefined, 4)); } }); } } exports.AWSError = AWSError; /***/ }), /***/ 85819: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AWSJobStack = void 0; const aws_templates_1 = __webpack_require__(6436); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const aws_error_1 = __webpack_require__(83683); class AWSJobStack { constructor(baseStackName) { this.baseStackName = baseStackName; } setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets) { return __awaiter(this, void 0, void 0, function* () { const taskDefStackName = `${this.baseStackName}-${buildGuid}`; let taskDefCloudFormation = aws_templates_1.AWSTemplates.readTaskCloudFormationTemplate(); for (const secret of secrets) { secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')}`; if (typeof secret.ParameterValue == 'number') { secret.ParameterValue = `${secret.ParameterValue}`; } if (!secret.ParameterValue || secret.ParameterValue === '') { secrets = secrets.filter((x) => x !== secret); continue; } taskDefCloudFormation = aws_templates_1.AWSTemplates.insertAtTemplate(taskDefCloudFormation, 'p1 - input', aws_templates_1.AWSTemplates.getParameterTemplate(secret.ParameterKey)); taskDefCloudFormation = aws_templates_1.AWSTemplates.insertAtTemplate(taskDefCloudFormation, 'p2 - secret', aws_templates_1.AWSTemplates.getSecretTemplate(`${secret.ParameterKey}`)); taskDefCloudFormation = aws_templates_1.AWSTemplates.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', aws_templates_1.AWSTemplates.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey)); } const secretsMappedToCloudFormationParameters = secrets.map((x) => { return { ParameterKey: x.ParameterKey.replace(/[^\dA-Za-z]/g, ''), ParameterValue: x.ParameterValue }; }); const parameters = [ { ParameterKey: 'EnvironmentName', ParameterValue: this.baseStackName, }, { ParameterKey: 'ImageUrl', ParameterValue: image, }, { ParameterKey: 'ServiceName', ParameterValue: taskDefStackName, }, { ParameterKey: 'Command', ParameterValue: 'echo "this template should be overwritten when running a task"', }, { ParameterKey: 'EntryPoint', ParameterValue: entrypoint.join(','), }, { ParameterKey: 'WorkingDirectory', ParameterValue: workingdir, }, { ParameterKey: 'EFSMountDirectory', ParameterValue: mountdir, }, ...secretsMappedToCloudFormationParameters, ]; let previousStackExists = true; while (previousStackExists) { previousStackExists = false; const stacks = yield CF.listStacks().promise(); if (!stacks.StackSummaries) { throw new Error('Faild to get stacks'); } for (let index = 0; index < stacks.StackSummaries.length; index++) { const element = stacks.StackSummaries[index]; if (element.StackName === taskDefStackName && element.StackStatus !== 'DELETE_COMPLETE') { previousStackExists = true; cloud_runner_logger_1.default.log(`Previous stack still exists: ${JSON.stringify(element)}`); } } } try { yield CF.createStack({ StackName: taskDefStackName, TemplateBody: taskDefCloudFormation, Capabilities: ['CAPABILITY_IAM'], Parameters: parameters, }).promise(); cloud_runner_logger_1.default.log('Creating cloud runner job'); yield CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise(); } catch (error) { yield aws_error_1.AWSError.handleStackCreationFailure(error, CF, taskDefStackName); throw error; } const taskDefResources = (yield CF.describeStackResources({ StackName: taskDefStackName, }).promise()).StackResources; const baseResources = (yield CF.describeStackResources({ StackName: this.baseStackName }).promise()).StackResources; return { taskDefStackName, taskDefCloudFormation, taskDefResources, baseResources, }; }); } } exports.AWSJobStack = AWSJobStack; /***/ }), /***/ 74668: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const AWS = __importStar(__webpack_require__(71786)); const core = __importStar(__webpack_require__(42186)); const zlib = __importStar(__webpack_require__(78761)); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const __1 = __webpack_require__(41359); const cloud_runner_state_1 = __webpack_require__(70912); const cloud_runner_statics_1 = __webpack_require__(90828); const cloud_runner_build_command_process_1 = __webpack_require__(71899); class AWSTaskRunner { static runTask(taskDef, ECS, CF, environment, buildGuid, commands) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; return __awaiter(this, void 0, void 0, function* () { const cluster = ((_b = (_a = taskDef.baseResources) === null || _a === void 0 ? void 0 : _a.find((x) => x.LogicalResourceId === 'ECSCluster')) === null || _b === void 0 ? void 0 : _b.PhysicalResourceId) || ''; const taskDefinition = ((_d = (_c = taskDef.taskDefResources) === null || _c === void 0 ? void 0 : _c.find((x) => x.LogicalResourceId === 'TaskDefinition')) === null || _d === void 0 ? void 0 : _d.PhysicalResourceId) || ''; const SubnetOne = ((_f = (_e = taskDef.baseResources) === null || _e === void 0 ? void 0 : _e.find((x) => x.LogicalResourceId === 'PublicSubnetOne')) === null || _f === void 0 ? void 0 : _f.PhysicalResourceId) || ''; const SubnetTwo = ((_h = (_g = taskDef.baseResources) === null || _g === void 0 ? void 0 : _g.find((x) => x.LogicalResourceId === 'PublicSubnetTwo')) === null || _h === void 0 ? void 0 : _h.PhysicalResourceId) || ''; const ContainerSecurityGroup = ((_k = (_j = taskDef.baseResources) === null || _j === void 0 ? void 0 : _j.find((x) => x.LogicalResourceId === 'ContainerSecurityGroup')) === null || _k === void 0 ? void 0 : _k.PhysicalResourceId) || ''; const streamName = ((_m = (_l = taskDef.taskDefResources) === null || _l === void 0 ? void 0 : _l.find((x) => x.LogicalResourceId === 'KinesisStream')) === null || _m === void 0 ? void 0 : _m.PhysicalResourceId) || ''; const task = yield ECS.runTask({ cluster, taskDefinition, platformVersion: '1.4.0', overrides: { containerOverrides: [ { name: taskDef.taskDefStackName, environment, command: ['-c', cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.ProcessCommands(commands, cloud_runner_state_1.CloudRunnerState.buildParams)], }, ], }, launchType: 'FARGATE', networkConfiguration: { awsvpcConfiguration: { subnets: [SubnetOne, SubnetTwo], assignPublicIp: 'ENABLED', securityGroups: [ContainerSecurityGroup], }, }, }).promise(); cloud_runner_logger_1.default.log('Cloud runner job is starting'); const taskArn = ((_o = task.tasks) === null || _o === void 0 ? void 0 : _o[0].taskArn) || ''; try { yield ECS.waitFor('tasksRunning', { tasks: [taskArn], cluster }).promise(); } catch (error_) { const error = error_; yield new Promise((resolve) => setTimeout(resolve, 3000)); cloud_runner_logger_1.default.log(`Cloud runner job has ended ${(_p = (yield AWSTaskRunner.describeTasks(ECS, cluster, taskArn)).containers) === null || _p === void 0 ? void 0 : _p[0].lastStatus}`); core.setFailed(error); core.error(error); } cloud_runner_logger_1.default.log(`Cloud runner job is running`); const output = yield this.streamLogsUntilTaskStops(ECS, CF, taskDef, cluster, taskArn, streamName); const exitCode = (_q = (yield AWSTaskRunner.describeTasks(ECS, cluster, taskArn)).containers) === null || _q === void 0 ? void 0 : _q[0].exitCode; cloud_runner_logger_1.default.log(`Cloud runner job exit code ${exitCode}`); if (exitCode !== 0 && exitCode !== undefined) { core.error(`job failed with exit code ${exitCode} ${JSON.stringify(yield ECS.describeTasks({ tasks: [taskArn], cluster }).promise(), undefined, 4)}`); throw new Error(`job failed with exit code ${exitCode}`); } else { cloud_runner_logger_1.default.log(`Cloud runner job has finished successfully`); return output; } }); } static describeTasks(ECS, clusterName, taskArn) { var _a, _b; return __awaiter(this, void 0, void 0, function* () { const tasks = yield ECS.describeTasks({ cluster: clusterName, tasks: [taskArn], }).promise(); if ((_a = tasks.tasks) === null || _a === void 0 ? void 0 : _a[0]) { return (_b = tasks.tasks) === null || _b === void 0 ? void 0 : _b[0]; } else { throw new Error('No task found'); } }); } static streamLogsUntilTaskStops(ECS, CF, taskDef, clusterName, taskArn, kinesisStreamName) { var _a; return __awaiter(this, void 0, void 0, function* () { const kinesis = new AWS.Kinesis(); const stream = yield AWSTaskRunner.getLogStream(kinesis, kinesisStreamName); let iterator = yield AWSTaskRunner.getLogIterator(kinesis, stream); cloud_runner_logger_1.default.log(`Cloud runner job status is ${(_a = (yield AWSTaskRunner.describeTasks(ECS, clusterName, taskArn))) === null || _a === void 0 ? void 0 : _a.lastStatus}`); const logBaseUrl = `https://${__1.Input.region}.console.aws.amazon.com/cloudwatch/home?region=${CF.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`; cloud_runner_logger_1.default.log(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`); let shouldReadLogs = true; let timestamp = 0; let output = ''; while (shouldReadLogs) { yield new Promise((resolve) => setTimeout(resolve, 1500)); const taskData = yield AWSTaskRunner.describeTasks(ECS, clusterName, taskArn); ({ timestamp, shouldReadLogs } = AWSTaskRunner.checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs)); ({ iterator, shouldReadLogs, output } = yield AWSTaskRunner.handleLogStreamIteration(kinesis, iterator, shouldReadLogs, taskDef, output)); } return output; }); } static handleLogStreamIteration(kinesis, iterator, shouldReadLogs, taskDef, output) { return __awaiter(this, void 0, void 0, function* () { const records = yield kinesis .getRecords({ ShardIterator: iterator, }) .promise(); iterator = records.NextShardIterator || ''; ({ shouldReadLogs, output } = AWSTaskRunner.logRecords(records, iterator, taskDef, shouldReadLogs, output)); return { iterator, shouldReadLogs, output }; }); } static checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs) { if ((taskData === null || taskData === void 0 ? void 0 : taskData.lastStatus) !== 'RUNNING') { if (timestamp === 0) { cloud_runner_logger_1.default.log('## Cloud runner job stopped, streaming end of logs'); timestamp = Date.now(); } if (timestamp !== 0 && Date.now() - timestamp > 30000) { cloud_runner_logger_1.default.log('## Cloud runner status is not RUNNING for 30 seconds, last query for logs'); shouldReadLogs = false; } cloud_runner_logger_1.default.log(`## Status of job: ${taskData.lastStatus}`); } return { timestamp, shouldReadLogs }; } static logRecords(records, iterator, taskDef, shouldReadLogs, output) { if (records.Records.length > 0 && iterator) { for (let index = 0; index < records.Records.length; index++) { const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8')); if (json.messageType === 'DATA_MESSAGE') { for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) { let message = json.logEvents[logEventsIndex].message; if (json.logEvents[logEventsIndex].message.includes(`---${cloud_runner_state_1.CloudRunnerState.buildParams.logId}`)) { cloud_runner_logger_1.default.log('End of log transmission received'); shouldReadLogs = false; } else if (message.includes('Rebuilding Library because the asset database could not be found!')) { core.warning('LIBRARY NOT FOUND!'); } message = `[${cloud_runner_statics_1.CloudRunnerStatics.logPrefix}] ${message}`; if (__1.Input.cloudRunnerTests) { output += message; } cloud_runner_logger_1.default.log(message); } } } } return { shouldReadLogs, output }; } static getLogStream(kinesis, kinesisStreamName) { return __awaiter(this, void 0, void 0, function* () { return yield kinesis .describeStream({ StreamName: kinesisStreamName, }) .promise(); }); } static getLogIterator(kinesis, stream) { return __awaiter(this, void 0, void 0, function* () { return ((yield kinesis .getShardIterator({ ShardIteratorType: 'TRIM_HORIZON', StreamName: stream.StreamDescription.StreamName, ShardId: stream.StreamDescription.Shards[0].ShardId, }) .promise()).ShardIterator || ''); }); } } exports.default = AWSTaskRunner; /***/ }), /***/ 6436: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AWSTemplates = void 0; const fs = __importStar(__webpack_require__(35747)); class AWSTemplates { static getParameterTemplate(p1) { return ` ${p1}: Type: String Default: '' `; } static getSecretTemplate(p1) { return ` ${p1}Secret: Type: AWS::SecretsManager::Secret Properties: Name: '${p1}' SecretString: !Ref ${p1} `; } static getSecretDefinitionTemplate(p1, p2) { return ` - Name: '${p1}' ValueFrom: !Ref ${p2}Secret `; } static insertAtTemplate(template, insertionKey, insertion) { const index = template.search(insertionKey) + insertionKey.length + '\n'.length; template = [template.slice(0, index), insertion, template.slice(index)].join(''); return template; } static readTaskCloudFormationTemplate() { return fs.readFileSync(`${__dirname}/cloud-formations/task-def-formation.yml`, 'utf8'); } } exports.AWSTemplates = AWSTemplates; /***/ }), /***/ 37569: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const SDK = __importStar(__webpack_require__(71786)); const aws_task_runner_1 = __importDefault(__webpack_require__(74668)); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const aws_job_stack_1 = __webpack_require__(85819); const aws_base_stack_1 = __webpack_require__(28730); const __1 = __webpack_require__(41359); class AWSBuildEnvironment { constructor(buildParameters) { this.baseStackName = buildParameters.awsBaseStackName; } cleanupSharedResources( // eslint-disable-next-line no-unused-vars buildGuid, // eslint-disable-next-line no-unused-vars buildParameters, // eslint-disable-next-line no-unused-vars branchName, // eslint-disable-next-line no-unused-vars defaultSecretsArray) { return __awaiter(this, void 0, void 0, function* () { }); } setupSharedResources( // eslint-disable-next-line no-unused-vars buildGuid, // eslint-disable-next-line no-unused-vars buildParameters, // eslint-disable-next-line no-unused-vars branchName, // eslint-disable-next-line no-unused-vars defaultSecretsArray) { return __awaiter(this, void 0, void 0, function* () { }); } runTask(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { return __awaiter(this, void 0, void 0, function* () { process.env.AWS_REGION = __1.Input.region; const ECS = new SDK.ECS(); const CF = new SDK.CloudFormation(); cloud_runner_logger_1.default.log(`AWS Region: ${CF.config.region}`); const entrypoint = ['/bin/sh']; const startTimeMs = Date.now(); yield new aws_base_stack_1.AWSBaseStack(this.baseStackName).setupBaseStack(CF); const taskDef = yield new aws_job_stack_1.AWSJobStack(this.baseStackName).setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets); let postRunTaskTimeMs; let output = ''; try { const postSetupStacksTimeMs = Date.now(); cloud_runner_logger_1.default.log(`Setup job time: ${Math.floor((postSetupStacksTimeMs - startTimeMs) / 1000)}s`); output = yield aws_task_runner_1.default.runTask(taskDef, ECS, CF, environment, buildGuid, commands); postRunTaskTimeMs = Date.now(); cloud_runner_logger_1.default.log(`Run job time: ${Math.floor((postRunTaskTimeMs - postSetupStacksTimeMs) / 1000)}s`); } finally { yield this.cleanupResources(CF, taskDef); const postCleanupTimeMs = Date.now(); if (postRunTaskTimeMs !== undefined) cloud_runner_logger_1.default.log(`Cleanup job time: ${Math.floor((postCleanupTimeMs - postRunTaskTimeMs) / 1000)}s`); } return output; }); } cleanupResources(CF, taskDef) { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.log('Cleanup starting'); yield CF.deleteStack({ StackName: taskDef.taskDefStackName, }).promise(); yield CF.waitFor('stackDeleteComplete', { StackName: taskDef.taskDefStackName, }).promise(); cloud_runner_logger_1.default.log(`Deleted Stack: ${taskDef.taskDefStackName}`); cloud_runner_logger_1.default.log('Cleanup complete'); }); } } exports.default = AWSBuildEnvironment; /***/ }), /***/ 90828: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CloudRunnerStatics = void 0; class CloudRunnerStatics { } exports.CloudRunnerStatics = CloudRunnerStatics; CloudRunnerStatics.logPrefix = `Cloud-Runner-System`; /***/ }), /***/ 79144: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const aws_1 = __importDefault(__webpack_require__(37569)); const cloud_runner_state_1 = __webpack_require__(70912); const k8s_1 = __importDefault(__webpack_require__(25107)); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cloud_runner_step_state_1 = __webpack_require__(64854); const workflow_composition_root_1 = __webpack_require__(54204); const cloud_runner_error_1 = __webpack_require__(2600); const task_parameter_serializer_1 = __webpack_require__(35346); const core = __importStar(__webpack_require__(42186)); class CloudRunner { static setup(buildParameters) { cloud_runner_logger_1.default.setup(); cloud_runner_state_1.CloudRunnerState.setup(buildParameters); CloudRunner.setupBuildPlatform(); const parameters = task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(); for (const element of parameters) { core.setOutput(element.name, element.value); } } static setupBuildPlatform() { switch (cloud_runner_state_1.CloudRunnerState.buildParams.cloudRunnerCluster) { case 'k8s': cloud_runner_logger_1.default.log('Cloud Runner platform selected Kubernetes'); cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform = new k8s_1.default(cloud_runner_state_1.CloudRunnerState.buildParams); break; default: case 'aws': cloud_runner_logger_1.default.log('Cloud Runner platform selected AWS'); cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform = new aws_1.default(cloud_runner_state_1.CloudRunnerState.buildParams); break; } } static run(buildParameters, baseImage) { return __awaiter(this, void 0, void 0, function* () { CloudRunner.setup(buildParameters); try { core.startGroup('Setup remote runner'); yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.setupSharedResources(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, cloud_runner_state_1.CloudRunnerState.buildParams, cloud_runner_state_1.CloudRunnerState.branchName, cloud_runner_state_1.CloudRunnerState.defaultSecrets); core.endGroup(); const output = yield new workflow_composition_root_1.WorkflowCompositionRoot().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets)); core.startGroup('Cleanup'); yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.cleanupSharedResources(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, cloud_runner_state_1.CloudRunnerState.buildParams, cloud_runner_state_1.CloudRunnerState.branchName, cloud_runner_state_1.CloudRunnerState.defaultSecrets); cloud_runner_logger_1.default.log(`Cleanup complete`); core.endGroup(); return output; } catch (error) { core.endGroup(); yield cloud_runner_error_1.CloudRunnerError.handleException(error); throw error; } }); } } exports.default = CloudRunner; /***/ }), /***/ 2600: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CloudRunnerError = void 0; const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cloud_runner_state_1 = __webpack_require__(70912); const core = __importStar(__webpack_require__(42186)); class CloudRunnerError { static handleException(error) { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.error(JSON.stringify(error, undefined, 4)); core.setFailed('Cloud Runner failed'); yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.cleanupSharedResources(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, cloud_runner_state_1.CloudRunnerState.buildParams, cloud_runner_state_1.CloudRunnerState.branchName, cloud_runner_state_1.CloudRunnerState.defaultSecrets); }); } } exports.CloudRunnerError = CloudRunnerError; /***/ }), /***/ 25107: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const k8s = __importStar(__webpack_require__(89679)); const __1 = __webpack_require__(41359); const core = __importStar(__webpack_require__(42186)); const kubernetes_storage_1 = __importDefault(__webpack_require__(43951)); const kubernetes_task_runner_1 = __importDefault(__webpack_require__(7181)); const kubernetes_secret_1 = __importDefault(__webpack_require__(71586)); const async_wait_until_1 = __importDefault(__webpack_require__(41299)); const kubernetes_job_spec_factory_1 = __importDefault(__webpack_require__(1739)); const kubernetes_service_account_1 = __importDefault(__webpack_require__(42915)); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); class Kubernetes { constructor(buildParameters) { this.buildGuid = ''; this.pvcName = ''; this.secretName = ''; this.jobName = ''; this.podName = ''; this.containerName = ''; this.cleanupCronJobName = ''; this.serviceAccountName = ''; this.kubeConfig = new k8s.KubeConfig(); this.kubeConfig.loadFromDefault(); this.kubeClient = this.kubeConfig.makeApiClient(k8s.CoreV1Api); this.kubeClientBatch = this.kubeConfig.makeApiClient(k8s.BatchV1Api); cloud_runner_logger_1.default.log('Loaded default Kubernetes configuration for this environment'); this.namespace = 'default'; this.buildParameters = buildParameters; } setupSharedResources(buildGuid, buildParameters, // eslint-disable-next-line no-unused-vars branchName, // eslint-disable-next-line no-unused-vars defaultSecretsArray) { return __awaiter(this, void 0, void 0, function* () { try { this.pvcName = `unity-builder-pvc-${buildGuid}`; this.cleanupCronJobName = `unity-builder-cronjob-${buildGuid}`; this.serviceAccountName = `service-account-${buildGuid}`; yield kubernetes_storage_1.default.createPersistentVolumeClaim(buildParameters, this.pvcName, this.kubeClient, this.namespace); yield kubernetes_service_account_1.default.createServiceAccount(this.serviceAccountName, this.namespace, this.kubeClient); } catch (error) { throw error; } }); } runTask(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { return __awaiter(this, void 0, void 0, function* () { try { // setup this.buildGuid = buildGuid; this.secretName = `build-credentials-${buildGuid}`; this.jobName = `unity-builder-job-${buildGuid}`; this.containerName = `main`; yield kubernetes_secret_1.default.createSecret(secrets, this.secretName, this.namespace, this.kubeClient); const jobSpec = kubernetes_job_spec_factory_1.default.getJobSpec(commands, image, mountdir, workingdir, environment, secrets, this.buildGuid, this.buildParameters, this.secretName, this.pvcName, this.jobName, k8s); //run const jobResult = yield this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec); cloud_runner_logger_1.default.log(`Creating build job ${JSON.stringify(jobResult.body.metadata, undefined, 4)}`); yield new Promise((promise) => setTimeout(promise, 5000)); cloud_runner_logger_1.default.log('Job created'); this.setPodNameAndContainerName(yield Kubernetes.findPodFromJob(this.kubeClient, this.jobName, this.namespace)); cloud_runner_logger_1.default.log('Watching pod until running'); let output = ''; // eslint-disable-next-line no-constant-condition while (true) { try { yield kubernetes_task_runner_1.default.watchUntilPodRunning(this.kubeClient, this.podName, this.namespace); cloud_runner_logger_1.default.log('Pod running, streaming logs'); output = yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace, cloud_runner_logger_1.default.log); break; } catch (error) { if (error.message.includes(`HTTP`)) { continue; } else { throw error; } } } yield this.cleanupTaskResources(); return output; } catch (error) { cloud_runner_logger_1.default.log('Running job failed'); core.error(JSON.stringify(error, undefined, 4)); yield this.cleanupTaskResources(); throw error; } }); } setPodNameAndContainerName(pod) { var _a, _b, _c; this.podName = ((_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name) || ''; this.containerName = ((_c = (_b = pod.status) === null || _b === void 0 ? void 0 : _b.containerStatuses) === null || _c === void 0 ? void 0 : _c[0].name) || ''; } cleanupTaskResources() { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.log('cleaning up'); try { yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace); yield this.kubeClient.deleteNamespacedPod(this.podName, this.namespace); yield this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace); yield new Promise((promise) => setTimeout(promise, 5000)); } catch (error) { cloud_runner_logger_1.default.log('Failed to cleanup, error:'); core.error(JSON.stringify(error, undefined, 4)); cloud_runner_logger_1.default.log('Abandoning cleanup, build error:'); throw error; } try { yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () { var _b; const jobBody = (yield this.kubeClientBatch.readNamespacedJob(this.jobName, this.namespace)).body; const podBody = (yield this.kubeClient.readNamespacedPod(this.podName, this.namespace)).body; return (jobBody === null || ((_b = jobBody.status) === null || _b === void 0 ? void 0 : _b.active) === 0) && podBody === null; }), { timeout: 500000, intervalBetweenAttempts: 15000, }); // eslint-disable-next-line no-empty } catch (_a) { } }); } cleanupSharedResources(buildGuid, buildParameters, // eslint-disable-next-line no-unused-vars branchName, // eslint-disable-next-line no-unused-vars defaultSecretsArray) { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.log(`deleting PVC`); yield this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace); yield __1.Output.setBuildVersion(buildParameters.buildVersion); // eslint-disable-next-line unicorn/no-process-exit process.exit(); }); } static findPodFromJob(kubeClient, jobName, namespace) { return __awaiter(this, void 0, void 0, function* () { const namespacedPods = yield kubeClient.listNamespacedPod(namespace); const pod = namespacedPods.body.items.find((x) => { var _a, _b; return ((_b = (_a = x.metadata) === null || _a === void 0 ? void 0 : _a.labels) === null || _b === void 0 ? void 0 : _b['job-name']) === jobName; }); if (pod === undefined) { throw new Error("pod with job-name label doesn't exist"); } return pod; }); } } exports.default = Kubernetes; /***/ }), /***/ 1739: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const client_node_1 = __webpack_require__(89679); const cloud_runner_build_command_process_1 = __webpack_require__(71899); const cloud_runner_state_1 = __webpack_require__(70912); class KubernetesJobSpecFactory { static getJobSpec(command, image, mountdir, workingDirectory, environment, secrets, buildGuid, buildParameters, secretName, pvcName, jobName, k8s) { environment.push(...[ { name: 'GITHUB_SHA', value: buildGuid, }, { name: 'GITHUB_WORKSPACE', value: '/data/repo', }, { name: 'PROJECT_PATH', value: buildParameters.projectPath, }, { name: 'BUILD_PATH', value: buildParameters.buildPath, }, { name: 'BUILD_FILE', value: buildParameters.buildFile, }, { name: 'BUILD_NAME', value: buildParameters.buildName, }, { name: 'BUILD_METHOD', value: buildParameters.buildMethod, }, { name: 'CUSTOM_PARAMETERS', value: buildParameters.customParameters, }, { name: 'CHOWN_FILES_TO', value: buildParameters.chownFilesTo, }, { name: 'BUILD_TARGET', value: buildParameters.platform, }, { name: 'ANDROID_VERSION_CODE', value: buildParameters.androidVersionCode.toString(), }, { name: 'ANDROID_KEYSTORE_NAME', value: buildParameters.androidKeystoreName, }, { name: 'ANDROID_KEYALIAS_NAME', value: buildParameters.androidKeyaliasName, }, ]); const job = new k8s.V1Job(); job.apiVersion = 'batch/v1'; job.kind = 'Job'; job.metadata = { name: jobName, labels: { app: 'unity-builder', buildGuid, }, }; job.spec = { backoffLimit: 0, template: { spec: { volumes: [ { name: 'build-mount', persistentVolumeClaim: { claimName: pvcName, }, }, ], containers: [ { name: 'main', image, command: ['/bin/sh'], args: ['-c', cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.ProcessCommands(command, cloud_runner_state_1.CloudRunnerState.buildParams)], workingDir: `${workingDirectory}`, resources: { requests: { memory: buildParameters.cloudRunnerMemory, cpu: buildParameters.cloudRunnerCpu, }, }, env: [ ...environment.map((x) => { const environmentVariable = new client_node_1.V1EnvVar(); environmentVariable.name = x.name; environmentVariable.value = x.value; return environmentVariable; }), ...secrets.map((x) => { const secret = new client_node_1.V1EnvVarSource(); secret.secretKeyRef = new client_node_1.V1SecretKeySelector(); secret.secretKeyRef.key = x.ParameterKey; secret.secretKeyRef.name = secretName; const environmentVariable = new client_node_1.V1EnvVar(); environmentVariable.name = x.EnvironmentVariable; environmentVariable.valueFrom = secret; return environmentVariable; }), ], volumeMounts: [ { name: 'build-mount', mountPath: `/${mountdir}`, }, ], lifecycle: { preStop: { exec: { command: [ 'bin/bash', '-c', `cd /data/builder/action/steps; chmod +x /return_license.sh; /return_license.sh;`, ], }, }, }, }, ], restartPolicy: 'Never', }, }, }; return job; } } exports.default = KubernetesJobSpecFactory; /***/ }), /***/ 71586: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const k8s = __importStar(__webpack_require__(89679)); const base64 = __webpack_require__(85848); class KubernetesSecret { static createSecret(secrets, secretName, namespace, kubeClient) { return __awaiter(this, void 0, void 0, function* () { const secret = new k8s.V1Secret(); secret.apiVersion = 'v1'; secret.kind = 'Secret'; secret.type = 'Opaque'; secret.metadata = { name: secretName, }; secret.data = {}; for (const buildSecret of secrets) { secret.data[buildSecret.ParameterKey] = base64.encode(buildSecret.ParameterValue); } return kubeClient.createNamespacedSecret(namespace, secret); }); } } exports.default = KubernetesSecret; /***/ }), /***/ 42915: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const k8s = __importStar(__webpack_require__(89679)); class KubernetesServiceAccount { static createServiceAccount(serviceAccountName, namespace, kubeClient) { return __awaiter(this, void 0, void 0, function* () { const serviceAccount = new k8s.V1ServiceAccount(); serviceAccount.apiVersion = 'v1'; serviceAccount.kind = 'ServiceAccount'; serviceAccount.metadata = { name: serviceAccountName, }; serviceAccount.automountServiceAccountToken = false; return kubeClient.createNamespacedServiceAccount(namespace, serviceAccount); }); } } exports.default = KubernetesServiceAccount; /***/ }), /***/ 43951: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const async_wait_until_1 = __importDefault(__webpack_require__(41299)); const core = __importStar(__webpack_require__(42186)); const k8s = __importStar(__webpack_require__(89679)); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const yaml_1 = __importDefault(__webpack_require__(13552)); class KubernetesStorage { static createPersistentVolumeClaim(buildParameters, pvcName, kubeClient, namespace) { return __awaiter(this, void 0, void 0, function* () { if (buildParameters.kubeVolume) { cloud_runner_logger_1.default.log(buildParameters.kubeVolume); pvcName = buildParameters.kubeVolume; return; } const pvcList = (yield kubeClient.listNamespacedPersistentVolumeClaim(namespace)).body.items.map((x) => { var _a; return (_a = x.metadata) === null || _a === void 0 ? void 0 : _a.name; }); cloud_runner_logger_1.default.log(`Current PVCs in namespace ${namespace}`); cloud_runner_logger_1.default.log(JSON.stringify(pvcList, undefined, 4)); if (pvcList.includes(pvcName)) { cloud_runner_logger_1.default.log(`pvc ${pvcName} already exists`); core.setOutput('volume', pvcName); return; } cloud_runner_logger_1.default.log(`Creating PVC ${pvcName} (does not exist)`); const result = yield KubernetesStorage.createPVC(pvcName, buildParameters, kubeClient, namespace); yield KubernetesStorage.handleResult(result, kubeClient, namespace, pvcName); }); } static getPVCPhase(kubeClient, name, namespace) { var _a; return __awaiter(this, void 0, void 0, function* () { try { return (_a = (yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body.status) === null || _a === void 0 ? void 0 : _a.phase; } catch (error) { core.error('Failed to get PVC phase'); core.error(JSON.stringify(error, undefined, 4)); throw error; } }); } static watchUntilPVCNotPending(kubeClient, name, namespace) { return __awaiter(this, void 0, void 0, function* () { try { cloud_runner_logger_1.default.log(`watch Until PVC Not Pending ${name} ${namespace}`); cloud_runner_logger_1.default.log(`${yield this.getPVCPhase(kubeClient, name, namespace)}`); yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () { return (yield this.getPVCPhase(kubeClient, name, namespace)) !== 'Pending'; }), { timeout: 500000, intervalBetweenAttempts: 15000, }); } catch (error) { core.error('Failed to watch PVC'); core.error(error.toString()); core.error(`PVC Body: ${JSON.stringify((yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body, undefined, 4)}`); throw error; } }); } static createPVC(pvcName, buildParameters, kubeClient, namespace) { return __awaiter(this, void 0, void 0, function* () { const pvc = new k8s.V1PersistentVolumeClaim(); pvc.apiVersion = 'v1'; pvc.kind = 'PersistentVolumeClaim'; pvc.metadata = { name: pvcName, }; pvc.spec = { accessModes: ['ReadWriteOnce'], storageClassName: process.env.K8s_STORAGE_CLASS || 'standard', resources: { requests: { storage: buildParameters.kubeVolumeSize, }, }, }; if (process.env.K8s_STORAGE_PVC_SPEC) { yaml_1.default.parse(process.env.K8s_STORAGE_PVC_SPEC); } const result = yield kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc); return result; }); } static handleResult(result, kubeClient, namespace, pvcName) { var _a; return __awaiter(this, void 0, void 0, function* () { const name = ((_a = result.body.metadata) === null || _a === void 0 ? void 0 : _a.name) || ''; cloud_runner_logger_1.default.log(`PVC ${name} created`); yield this.watchUntilPVCNotPending(kubeClient, name, namespace); cloud_runner_logger_1.default.log(`PVC ${name} is ready and not pending`); core.setOutput('volume', pvcName); }); } } exports.default = KubernetesStorage; /***/ }), /***/ 7181: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const client_node_1 = __webpack_require__(89679); const stream_1 = __webpack_require__(92413); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const core = __importStar(__webpack_require__(42186)); const cloud_runner_statics_1 = __webpack_require__(90828); const async_wait_until_1 = __importDefault(__webpack_require__(41299)); const __1 = __webpack_require__(41359); class KubernetesTaskRunner { static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, logCallback) { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.log(`Streaming logs from pod: ${podName} container: ${containerName} namespace: ${namespace}`); const stream = new stream_1.Writable(); let output = ''; let didStreamAnyLogs = false; stream._write = (chunk, encoding, next) => { didStreamAnyLogs = true; let message = chunk.toString().trimRight(`\n`); message = `[${cloud_runner_statics_1.CloudRunnerStatics.logPrefix}] ${message}`; if (__1.Input.cloudRunnerTests) { output += message; } logCallback(message); next(); }; const logOptions = { follow: true, pretty: false, previous: false, }; try { const resultError = yield new Promise((resolve) => new client_node_1.Log(kubeConfig).log(namespace, podName, containerName, stream, resolve, logOptions)); stream.destroy(); if (resultError) { throw resultError; } if (!didStreamAnyLogs) { core.error('Failed to stream any logs, listing namespace events, check for an error with the container'); core.error(JSON.stringify({ events: (yield kubeClient.listNamespacedEvent(namespace)).body.items .filter((x) => { return x.involvedObject.name === podName || x.involvedObject.name === jobName; }) .map((x) => { return { type: x.involvedObject.kind, name: x.involvedObject.name, message: x.message, }; }), }, undefined, 4)); throw new Error(`No logs streamed from k8s`); } } catch (error) { if (stream) { stream.destroy(); } throw error; } cloud_runner_logger_1.default.log('end of log stream'); return output; }); } static watchUntilPodRunning(kubeClient, podName, namespace) { return __awaiter(this, void 0, void 0, function* () { let success = false; cloud_runner_logger_1.default.log(`Watching ${podName} ${namespace}`); yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () { var _a, _b, _c, _d, _e, _f; const status = yield kubeClient.readNamespacedPodStatus(podName, namespace); const phase = (_a = status === null || status === void 0 ? void 0 : status.body.status) === null || _a === void 0 ? void 0 : _a.phase; success = phase === 'Running'; cloud_runner_logger_1.default.log(`${(_b = status.body.status) === null || _b === void 0 ? void 0 : _b.phase} ${((_d = (_c = status.body.status) === null || _c === void 0 ? void 0 : _c.conditions) === null || _d === void 0 ? void 0 : _d[0].reason) || ''} ${((_f = (_e = status.body.status) === null || _e === void 0 ? void 0 : _e.conditions) === null || _f === void 0 ? void 0 : _f[0].message) || ''}`); if (success || phase !== 'Pending') return true; return false; }), { timeout: 2000000, intervalBetweenAttempts: 15000, }); return success; }); } } exports.default = KubernetesTaskRunner; /***/ }), /***/ 71899: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Hook = exports.CloudRunnerBuildCommandProcessor = void 0; const __1 = __webpack_require__(41359); const yaml_1 = __importDefault(__webpack_require__(13552)); class CloudRunnerBuildCommandProcessor { static ProcessCommands(commands, buildParameters) { const hooks = CloudRunnerBuildCommandProcessor.getHooks().filter((x) => x.step.includes(`all`)); return `echo "---" echo "start cloud runner init" ${__1.Input.cloudRunnerTests ? '' : '#'} printenv echo "start cloud runner job" ${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} ${commands} ${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '} echo "end of cloud runner job ---${buildParameters.logId}" `; } static getHooks() { const experimentHooks = process.env.EXPERIMENTAL_HOOKS; let output = new Array(); if (experimentHooks && experimentHooks !== '') { try { output = yaml_1.default.parse(experimentHooks); } catch (error) { throw error; } } return output.filter((x) => x.step !== undefined && x.hook !== undefined && x.hook.length > 0); } } exports.CloudRunnerBuildCommandProcessor = CloudRunnerBuildCommandProcessor; class Hook { constructor() { this.secrets = new Array(); } } exports.Hook = Hook; /***/ }), /***/ 91311: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class CloudRunnerConstants { } CloudRunnerConstants.alphabet = '0123456789abcdefghijklmnopqrstuvwxyz'; exports.default = CloudRunnerConstants; /***/ }), /***/ 22855: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); class CloudRunnerLogger { static setup() { this.timestamp = this.createTimestamp(); this.globalTimestamp = this.timestamp; } static log(message) { core.info(message); } static logWarning(message) { core.warning(message); } static logLine(message) { core.info(`${message}\n`); } static error(message) { core.error(message); } static logWithTime(message) { const newTimestamp = this.createTimestamp(); core.info(`${message} (Since previous: ${this.calculateTimeDiff(newTimestamp, this.timestamp)}, Total time: ${this.calculateTimeDiff(newTimestamp, this.globalTimestamp)})`); this.timestamp = newTimestamp; } static calculateTimeDiff(x, y) { return Math.floor((x - y) / 1000); } static createTimestamp() { return Date.now(); } } exports.default = CloudRunnerLogger; /***/ }), /***/ 63287: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const nanoid_1 = __webpack_require__(39140); const cloud_runner_constants_1 = __importDefault(__webpack_require__(91311)); class CloudRunnerNamespace { static generateBuildName(runNumber, platform) { const nanoid = nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 4); return `${runNumber}-${platform.toLowerCase().replace('standalone', '')}-${nanoid()}`; } } exports.default = CloudRunnerNamespace; /***/ }), /***/ 35346: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TaskParameterSerializer = void 0; const __1 = __webpack_require__(41359); const image_environment_factory_1 = __importDefault(__webpack_require__(25145)); const cloud_runner_state_1 = __webpack_require__(70912); const cloud_runner_build_command_process_1 = __webpack_require__(71899); class TaskParameterSerializer { static readBuildEnvironmentVariables() { TaskParameterSerializer.setupDefaultSecrets(); return [ { name: 'ContainerMemory', value: cloud_runner_state_1.CloudRunnerState.buildParams.cloudRunnerMemory, }, { name: 'ContainerCpu', value: cloud_runner_state_1.CloudRunnerState.buildParams.cloudRunnerCpu, }, { name: 'BUILD_TARGET', value: cloud_runner_state_1.CloudRunnerState.buildParams.platform, }, ...TaskParameterSerializer.serializeBuildParamsAndInput, ]; } static get serializeBuildParamsAndInput() { let array = new Array(); array = TaskParameterSerializer.readBuildParameters(array); array = TaskParameterSerializer.readInput(array); const configurableHooks = cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.getHooks(); const secrets = configurableHooks.map((x) => x.secrets).filter((x) => x !== undefined && x.length > 0); if (secrets.length > 0) { // eslint-disable-next-line unicorn/no-array-reduce array.push(secrets.reduce((x, y) => [...x, ...y])); } array = array.filter((x) => x.value !== undefined && x.name !== '0' && x.value !== '' && x.name !== 'prototype' && x.name !== 'length'); array = array.map((x) => { x.name = __1.Input.ToEnvVarFormat(x.name); x.value = `${x.value}`; return x; }); return array; } static readBuildParameters(array) { const keys = Object.keys(cloud_runner_state_1.CloudRunnerState.buildParams); for (const element of keys) { array.push({ name: element, value: cloud_runner_state_1.CloudRunnerState.buildParams[element], }); } array.push({ name: 'buildParameters', value: JSON.stringify(cloud_runner_state_1.CloudRunnerState.buildParams) }); return array; } static readInput(array) { const input = Object.getOwnPropertyNames(__1.Input); for (const element of input) { if (typeof __1.Input[element] !== 'function' && array.filter((x) => x.name === element).length === 0) { array.push({ name: element, value: `${__1.Input[element]}`, }); } } return array; } static setupDefaultSecrets() { if (cloud_runner_state_1.CloudRunnerState.defaultSecrets === undefined) cloud_runner_state_1.CloudRunnerState.defaultSecrets = image_environment_factory_1.default.getEnvironmentVariables(cloud_runner_state_1.CloudRunnerState.buildParams).map((x) => { return { ParameterKey: x.name, EnvironmentVariable: x.name, ParameterValue: x.value, }; }); } } exports.TaskParameterSerializer = TaskParameterSerializer; /***/ }), /***/ 70912: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CloudRunnerState = void 0; const path_1 = __importDefault(__webpack_require__(85622)); class CloudRunnerState { // only the following paths that do not start a path.join with another "Full" suffixed property need to start with an absolute / static get buildPathFull() { return path_1.default.join(`/`, CloudRunnerState.buildVolumeFolder, CloudRunnerState.buildParams.buildGuid); } static get cacheFolderFull() { return path_1.default.join('/', CloudRunnerState.buildVolumeFolder, CloudRunnerState.cacheFolder, CloudRunnerState.branchName); } static setup(buildParameters) { CloudRunnerState.buildParams = buildParameters; } static get branchName() { return CloudRunnerState.buildParams.branch; } static get builderPathFull() { return path_1.default.join(CloudRunnerState.buildPathFull, `builder`); } static get repoPathFull() { return path_1.default.join(CloudRunnerState.buildPathFull, CloudRunnerState.repositoryFolder); } static get projectPathFull() { return path_1.default.join(CloudRunnerState.repoPathFull, CloudRunnerState.buildParams.projectPath); } static get libraryFolderFull() { return path_1.default.join(CloudRunnerState.projectPathFull, `Library`); } static get lfsDirectoryFull() { return path_1.default.join(CloudRunnerState.repoPathFull, `.git`, `lfs`); } static get purgeRemoteCaching() { return process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined; } static get lfsCacheFolderFull() { return path_1.default.join(CloudRunnerState.cacheFolderFull, `lfs`); } static get libraryCacheFolderFull() { return path_1.default.join(CloudRunnerState.cacheFolderFull, `Library`); } static get unityBuilderRepoUrl() { return `https://${CloudRunnerState.buildParams.githubToken}@github.com/game-ci/unity-builder.git`; } static get targetBuildRepoUrl() { return `https://${CloudRunnerState.buildParams.githubToken}@github.com/${CloudRunnerState.buildParams.githubRepo}.git`; } static get buildVolumeFolder() { return 'data'; } static get cacheFolder() { return 'cache'; } } exports.CloudRunnerState = CloudRunnerState; CloudRunnerState.repositoryFolder = 'repo'; /***/ }), /***/ 64854: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CloudRunnerStepState = void 0; class CloudRunnerStepState { constructor(image, environmentVariables, secrets) { this.image = image; this.environment = environmentVariables; this.secrets = secrets; } } exports.CloudRunnerStepState = CloudRunnerStepState; /***/ }), /***/ 91491: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BuildStep = void 0; const path_1 = __importDefault(__webpack_require__(85622)); const __1 = __webpack_require__(41359); const cloud_runner_build_command_process_1 = __webpack_require__(71899); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cloud_runner_state_1 = __webpack_require__(70912); class BuildStep { run(cloudRunnerStepState) { return __awaiter(this, void 0, void 0, function* () { return yield BuildStep.BuildStep(cloudRunnerStepState.image, cloudRunnerStepState.environment, cloudRunnerStepState.secrets); }); } static BuildStep(image, environmentVariables, secrets) { return __awaiter(this, void 0, void 0, function* () { cloud_runner_logger_1.default.logLine(` `); cloud_runner_logger_1.default.logLine('Starting part 2/2 (build unity project)'); const hooks = cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.getHooks().filter((x) => x.step.includes(`setup`)); return yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, image, `${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} export GITHUB_WORKSPACE="${cloud_runner_state_1.CloudRunnerState.repoPathFull}" cp -r "${path_1.default .join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', 'default-build-script') .replace(/\\/g, `/`)}" "/UnityBuilderAction" cp -r "${path_1.default .join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', 'platforms', 'ubuntu', 'entrypoint.sh') .replace(/\\/g, `/`)}" "/entrypoint.sh" cp -r "${path_1.default .join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', 'platforms', 'ubuntu', 'steps') .replace(/\\/g, `/`)}" "/steps" chmod -R +x "/entrypoint.sh" chmod -R +x "/steps" /entrypoint.sh apt-get update apt-get install -y -q zip tree cd "${cloud_runner_state_1.CloudRunnerState.libraryFolderFull.replace(/\\/g, `/`)}/.." zip -r "lib-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "Library" mv "lib-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}/Library" cd "${cloud_runner_state_1.CloudRunnerState.repoPathFull.replace(/\\/g, `/`)}" ${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh zip -r "build-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "build" ${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh ${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}" mv "build-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}" chmod +x ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`).replace(/\\/g, `/`)} node ${path_1.default .join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`) .replace(/\\/g, `/`)} -m cache-push "Library" "lib-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}/Library" ${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}" ${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '} `, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.projectPathFull}`, environmentVariables, secrets); }); } } exports.BuildStep = BuildStep; /***/ }), /***/ 58923: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SetupStep = void 0; const path_1 = __importDefault(__webpack_require__(85622)); const __1 = __webpack_require__(41359); const cloud_runner_build_command_process_1 = __webpack_require__(71899); const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cloud_runner_state_1 = __webpack_require__(70912); class SetupStep { run(cloudRunnerStepState) { return __awaiter(this, void 0, void 0, function* () { try { return yield SetupStep.downloadRepository(cloudRunnerStepState.image, cloudRunnerStepState.environment, cloudRunnerStepState.secrets); } catch (error) { throw error; } }); } static downloadRepository(image, environmentVariables, secrets) { return __awaiter(this, void 0, void 0, function* () { try { cloud_runner_logger_1.default.log(` `); cloud_runner_logger_1.default.logLine('Starting step 1/2 (setup game files from repository)'); const hooks = cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.getHooks().filter((x) => x.step.includes(`setup`)); return yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, image, `apk update -q apk add git-lfs jq tree zip unzip nodejs -q ${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 mkdir -p ${cloud_runner_state_1.CloudRunnerState.builderPathFull.replace(/\\/g, `/`)} git clone -q -b ${cloud_runner_state_1.CloudRunnerState.branchName} ${cloud_runner_state_1.CloudRunnerState.unityBuilderRepoUrl} "${cloud_runner_state_1.CloudRunnerState.builderPathFull.replace(/\\/g, `/`)}" ${__1.Input.cloudRunnerTests ? '' : '#'} tree ${cloud_runner_state_1.CloudRunnerState.builderPathFull.replace(/\\/g, `/`)} chmod +x ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`).replace(/\\/g, `/`)} node ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`).replace(/\\/g, `/`)} -m remote-cli ${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '} `, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}/`, environmentVariables, secrets); } catch (error) { cloud_runner_logger_1.default.logLine(`Failed download repository step 1/2`); throw error; } }); } } exports.SetupStep = SetupStep; /***/ }), /***/ 94655: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BuildAutomationWorkflow = void 0; const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const task_parameter_serializer_1 = __webpack_require__(35346); const cloud_runner_state_1 = __webpack_require__(70912); const cloud_runner_step_state_1 = __webpack_require__(64854); const build_step_1 = __webpack_require__(91491); const setup_step_1 = __webpack_require__(58923); const custom_workflow_1 = __webpack_require__(3786); const core = __importStar(__webpack_require__(42186)); class BuildAutomationWorkflow { run(cloudRunnerStepState) { return __awaiter(this, void 0, void 0, function* () { try { return yield BuildAutomationWorkflow.standardBuildAutomation(cloudRunnerStepState.image); } catch (error) { throw error; } }); } static standardBuildAutomation(baseImage) { return __awaiter(this, void 0, void 0, function* () { try { cloud_runner_logger_1.default.log(`Cloud Runner is running standard build automation`); core.startGroup('pre build steps'); let output = ''; if (cloud_runner_state_1.CloudRunnerState.buildParams.preBuildSteps !== '') { output += yield custom_workflow_1.CustomWorkflow.runCustomJob(cloud_runner_state_1.CloudRunnerState.buildParams.preBuildSteps); } core.endGroup(); cloud_runner_logger_1.default.logWithTime('Configurable pre build step(s) time'); core.startGroup('setup'); output += yield new setup_step_1.SetupStep().run(new cloud_runner_step_state_1.CloudRunnerStepState('alpine/git', task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets)); core.endGroup(); cloud_runner_logger_1.default.logWithTime('Download repository step time'); core.startGroup('build'); output += yield new build_step_1.BuildStep().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets)); core.endGroup(); cloud_runner_logger_1.default.logWithTime('Build time'); core.startGroup('post build steps'); if (cloud_runner_state_1.CloudRunnerState.buildParams.postBuildSteps !== '') { output += yield custom_workflow_1.CustomWorkflow.runCustomJob(cloud_runner_state_1.CloudRunnerState.buildParams.postBuildSteps); } core.endGroup(); cloud_runner_logger_1.default.logWithTime('Configurable post build step(s) time'); cloud_runner_logger_1.default.log(`Cloud Runner finished running standard build automation`); return output; } catch (error) { throw error; } }); } } exports.BuildAutomationWorkflow = BuildAutomationWorkflow; /***/ }), /***/ 3786: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CustomWorkflow = void 0; const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855)); const cloud_runner_state_1 = __webpack_require__(70912); const yaml_1 = __importDefault(__webpack_require__(13552)); const __1 = __webpack_require__(41359); const task_parameter_serializer_1 = __webpack_require__(35346); class CustomWorkflow { static runCustomJob(buildSteps) { return __awaiter(this, void 0, void 0, function* () { try { cloud_runner_logger_1.default.log(`Cloud Runner is running in custom job mode`); if (__1.Input.cloudRunnerTests) { cloud_runner_logger_1.default.log(`Parsing build steps: ${buildSteps}`); } try { buildSteps = yaml_1.default.parse(buildSteps); let output = ''; for (const step of buildSteps) { const stepSecrets = step.secrets.map((x) => { const secret = { ParameterKey: x.name, EnvironmentVariable: __1.Input.ToEnvVarFormat(x.name), ParameterValue: x.value, }; return secret; }); output += yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, step['image'], step['commands'], `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}/`, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), [...cloud_runner_state_1.CloudRunnerState.defaultSecrets, ...stepSecrets]); } return output; } catch (error) { cloud_runner_logger_1.default.log(`failed to parse a custom job "${buildSteps}"`); throw error; } } catch (error) { throw error; } }); } } exports.CustomWorkflow = CustomWorkflow; /***/ }), /***/ 54204: /***/ (function(__unused_webpack_module, exports, __webpack_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.WorkflowCompositionRoot = void 0; const cloud_runner_state_1 = __webpack_require__(70912); const cloud_runner_step_state_1 = __webpack_require__(64854); const custom_workflow_1 = __webpack_require__(3786); const build_automation_workflow_1 = __webpack_require__(94655); const task_parameter_serializer_1 = __webpack_require__(35346); const setup_step_1 = __webpack_require__(58923); class WorkflowCompositionRoot { run(cloudRunnerStepState) { return __awaiter(this, void 0, void 0, function* () { try { return yield WorkflowCompositionRoot.runJob(cloudRunnerStepState.image.toString()); } catch (error) { throw error; } }); } static runJob(baseImage) { return __awaiter(this, void 0, void 0, function* () { try { if (cloud_runner_state_1.CloudRunnerState.buildParams.customJob === `setup`) { return yield new setup_step_1.SetupStep().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets)); } else if (cloud_runner_state_1.CloudRunnerState.buildParams.customJob !== '') { return yield custom_workflow_1.CustomWorkflow.runCustomJob(cloud_runner_state_1.CloudRunnerState.buildParams.customJob); } return yield new build_automation_workflow_1.BuildAutomationWorkflow().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets)); } catch (error) { throw error; } }); } } exports.WorkflowCompositionRoot = WorkflowCompositionRoot; /***/ }), /***/ 16934: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const exec_1 = __webpack_require__(71514); const image_tag_1 = __importDefault(__webpack_require__(57648)); const image_environment_factory_1 = __importDefault(__webpack_require__(25145)); class Docker { static build(buildParameters, silent = false) { return __awaiter(this, void 0, void 0, function* () { const { path, dockerfile, baseImage } = buildParameters; const { version, platform } = baseImage; const tag = new image_tag_1.default({ repository: '', name: 'unity-builder', version, platform }); const command = `docker build ${path} \ --file ${dockerfile} \ --build-arg IMAGE=${baseImage} \ --tag ${tag}`; yield exec_1.exec(command, undefined, { silent }); return tag; }); } static run(image, parameters, silent = false) { return __awaiter(this, void 0, void 0, function* () { const { workspace, unitySerial, runnerTempPath, sshAgent } = parameters; const baseOsSpecificArguments = this.getBaseOsSpecificArguments(process.platform, workspace, unitySerial, runnerTempPath, sshAgent); const runCommand = `docker run \ --workdir /github/workspace \ --rm \ ${image_environment_factory_1.default.getEnvVarString(parameters)} \ ${baseOsSpecificArguments} \ ${image}`; yield exec_1.exec(runCommand, undefined, { silent }); }); } static getBaseOsSpecificArguments(baseOs, workspace, unitySerial, runnerTemporaryPath, sshAgent) { switch (baseOs) { case 'linux': return `--env UNITY_SERIAL \ --env GITHUB_WORKSPACE=/github/workspace \ ${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \ --volume "/var/run/docker.sock":"/var/run/docker.sock" \ --volume "${runnerTemporaryPath}/_github_home":"/root" \ --volume "${runnerTemporaryPath}/_github_workflow":"/github/workflow" \ --volume "${workspace}":"/github/workspace" \ ${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \ ${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''}`; case 'win32': return `--env UNITY_SERIAL="${unitySerial}" \ --env GITHUB_WORKSPACE=c:/github/workspace \ --volume "${workspace}":"c:/github/workspace" \ --volume "c:/regkeys":"c:/regkeys" \ --volume "C:/Program Files (x86)/Microsoft Visual Studio":"C:/Program Files (x86)/Microsoft Visual Studio" \ --volume "C:/Program Files (x86)/Windows Kits":"C:/Program Files (x86)/Windows Kits" \ --volume "C:/ProgramData/Microsoft/VisualStudio":"C:/ProgramData/Microsoft/VisualStudio"`; //Note: When upgrading to Server 2022, we will need to move to just "program files" since VS will be 64-bit } return ''; } } exports.default = Docker; /***/ }), /***/ 26574: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class NotImplementedException extends Error { constructor(message = '') { super(message); this.name = 'NotImplementedException'; } } exports.default = NotImplementedException; /***/ }), /***/ 97266: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class ValidationError extends Error { constructor(message = '') { super(message); this.name = 'ValidationError'; } } exports.default = ValidationError; /***/ }), /***/ 25145: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const test_license_reader_1 = __webpack_require__(13963); class Parameter { } class ImageEnvironmentFactory { static getEnvVarString(parameters) { const environmentVariables = ImageEnvironmentFactory.getEnvironmentVariables(parameters); let string = ''; for (const p of environmentVariables) { if (p.value === '' || p.value === undefined) { continue; } if (p.value.toString().includes(`\n`)) { string += `--env ${p.name} `; continue; } string += `--env ${p.name}="${p.value}" `; } return string; } static getEnvironmentVariables(parameters) { const environmentVariables = [ { name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || test_license_reader_1.ReadLicense() }, { name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE }, { name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL }, { name: 'UNITY_PASSWORD', value: process.env.UNITY_PASSWORD }, { name: 'UNITY_SERIAL', value: parameters.unitySerial }, { name: 'UNITY_VERSION', value: parameters.version }, { name: 'USYM_UPLOAD_AUTH_TOKEN', value: process.env.USYM_UPLOAD_AUTH_TOKEN }, { name: 'PROJECT_PATH', value: parameters.projectPath }, { name: 'BUILD_TARGET', value: parameters.platform }, { name: 'BUILD_NAME', value: parameters.buildName }, { name: 'BUILD_PATH', value: parameters.buildPath }, { name: 'BUILD_FILE', value: parameters.buildFile }, { name: 'BUILD_METHOD', value: parameters.buildMethod }, { name: 'VERSION', value: parameters.buildVersion }, { name: 'ANDROID_VERSION_CODE', value: parameters.androidVersionCode }, { name: 'ANDROID_KEYSTORE_NAME', value: parameters.androidKeystoreName }, { name: 'ANDROID_KEYSTORE_BASE64', value: parameters.androidKeystoreBase64 }, { name: 'ANDROID_KEYSTORE_PASS', value: parameters.androidKeystorePass }, { name: 'ANDROID_KEYALIAS_NAME', value: parameters.androidKeyaliasName }, { name: 'ANDROID_KEYALIAS_PASS', value: parameters.androidKeyaliasPass }, { name: 'CUSTOM_PARAMETERS', value: parameters.customParameters }, { name: 'CHOWN_FILES_TO', value: parameters.chownFilesTo }, { name: 'GITHUB_REF', value: process.env.GITHUB_REF }, { name: 'GITHUB_SHA', value: process.env.GITHUB_SHA }, { name: 'GITHUB_REPOSITORY', value: process.env.GITHUB_REPOSITORY }, { name: 'GITHUB_ACTOR', value: process.env.GITHUB_ACTOR }, { name: 'GITHUB_WORKFLOW', value: process.env.GITHUB_WORKFLOW }, { name: 'GITHUB_HEAD_REF', value: process.env.GITHUB_HEAD_REF }, { name: 'GITHUB_BASE_REF', value: process.env.GITHUB_BASE_REF }, { name: 'GITHUB_EVENT_NAME', value: process.env.GITHUB_EVENT_NAME }, { name: 'GITHUB_WORKSPACE', value: '/github/workspace' }, { name: 'GITHUB_ACTION', value: process.env.GITHUB_ACTION }, { name: 'GITHUB_EVENT_PATH', value: process.env.GITHUB_EVENT_PATH }, { name: 'RUNNER_OS', value: process.env.RUNNER_OS }, { name: 'RUNNER_TOOL_CACHE', value: process.env.RUNNER_TOOL_CACHE }, { name: 'RUNNER_TEMP', value: process.env.RUNNER_TEMP }, { name: 'RUNNER_WORKSPACE', value: process.env.RUNNER_WORKSPACE }, ]; if (parameters.sshAgent) environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' }); return environmentVariables; } } exports.default = ImageEnvironmentFactory; /***/ }), /***/ 57648: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const platform_1 = __importDefault(__webpack_require__(9707)); class ImageTag { constructor(imageProperties) { const { repository = 'unityci', name = 'editor', version = '2019.2.11f1', platform, customImage } = imageProperties; if (!ImageTag.versionPattern.test(version)) { throw new Error(`Invalid version "${version}".`); } const builderPlatform = ImageTag.getTargetPlatformToImageSuffixMap(platform, version); this.repository = repository; this.name = name; this.version = version; this.platform = platform; this.builderPlatform = builderPlatform; this.customImage = customImage; } static get versionPattern() { return /^20\d{2}\.\d\.\w{3,4}|3$/; } static get imageSuffixes() { return { generic: '', webgl: 'webgl', mac: 'mac-mono', windows: 'windows-mono', windowsIl2cpp: 'windows-il2cpp', wsaPlayer: 'universal-windows-platform', linux: 'base', linuxIl2cpp: 'linux-il2cpp', android: 'android', ios: 'ios', tvos: 'appletv', facebook: 'facebook', }; } static getTargetPlatformToImageSuffixMap(platform, version) { const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook, } = ImageTag.imageSuffixes; const [major, minor] = version.split('.').map((digit) => Number(digit)); // @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html switch (platform) { case platform_1.default.types.StandaloneOSX: return mac; case platform_1.default.types.StandaloneWindows: case platform_1.default.types.StandaloneWindows64: // Can only build windows-il2cpp on a windows based system if (process.platform === 'win32') { // Unity versions before 2019.3 do not support il2cpp if (major >= 2020 || (major === 2019 && minor >= 3)) { return windowsIl2cpp; } else { throw new Error(`Windows-based builds are only supported on 2019.3.X+ versions of Unity. If you are trying to build for windows-mono, please use a Linux based OS.`); } } return windows; case platform_1.default.types.StandaloneLinux64: { // Unity versions before 2019.3 do not support il2cpp if (major >= 2020 || (major === 2019 && minor >= 3)) { return linuxIl2cpp; } return linux; } case platform_1.default.types.iOS: return ios; case platform_1.default.types.Android: return android; case platform_1.default.types.WebGL: return webgl; case platform_1.default.types.WSAPlayer: if (process.platform !== 'win32') { throw new Error(`WSAPlayer can only be built on a windows base OS`); } return wsaPlayer; case platform_1.default.types.PS4: return windows; case platform_1.default.types.XboxOne: return windows; case platform_1.default.types.tvOS: if (process.platform !== 'win32') { throw new Error(`tvOS can only be built on a windows base OS`); } return tvos; case platform_1.default.types.Switch: return windows; // Unsupported case platform_1.default.types.Lumin: return windows; case platform_1.default.types.BJM: return windows; case platform_1.default.types.Stadia: return windows; case platform_1.default.types.Facebook: return facebook; case platform_1.default.types.NoTarget: return generic; // Test specific case platform_1.default.types.Test: return generic; default: throw new Error(` Platform must be one of the ones described in the documentation. "${platform}" is currently not supported.`); } } get tag() { //We check the host os so we know what type of the images we need to pull switch (process.platform) { case 'win32': return `windows-${this.version}-${this.builderPlatform}`.replace(/-+$/, ''); case 'linux': return `${this.version}-${this.builderPlatform}`.replace(/-+$/, ''); default: break; } } get image() { return `${this.repository}/${this.name}`.replace(/^\/+/, ''); } toString() { const { image, tag, customImage } = this; if (customImage && customImage !== '') { return customImage; } return `${image}:${tag}-0`; // '0' here represents the docker repo version } } exports.default = ImageTag; /***/ }), /***/ 41359: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CloudRunner = exports.Versioning = exports.Unity = exports.Project = exports.Platform = exports.Output = exports.ImageTag = exports.Input = exports.Docker = exports.Cache = exports.BuildParameters = exports.Action = void 0; const action_1 = __importDefault(__webpack_require__(89088)); exports.Action = action_1.default; const build_parameters_1 = __importDefault(__webpack_require__(80787)); exports.BuildParameters = build_parameters_1.default; const cache_1 = __importDefault(__webpack_require__(97134)); exports.Cache = cache_1.default; const docker_1 = __importDefault(__webpack_require__(16934)); exports.Docker = docker_1.default; const input_1 = __importDefault(__webpack_require__(91933)); exports.Input = input_1.default; const image_tag_1 = __importDefault(__webpack_require__(57648)); exports.ImageTag = image_tag_1.default; const output_1 = __importDefault(__webpack_require__(85487)); exports.Output = output_1.default; const platform_1 = __importDefault(__webpack_require__(9707)); exports.Platform = platform_1.default; const project_1 = __importDefault(__webpack_require__(88666)); exports.Project = project_1.default; const unity_1 = __importDefault(__webpack_require__(70498)); exports.Unity = unity_1.default; const versioning_1 = __importDefault(__webpack_require__(88729)); exports.Versioning = versioning_1.default; const cloud_runner_1 = __importDefault(__webpack_require__(79144)); exports.CloudRunner = cloud_runner_1.default; /***/ }), /***/ 11091: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ActionYamlReader = void 0; const fs_1 = __importDefault(__webpack_require__(35747)); const path_1 = __importDefault(__webpack_require__(85622)); const yaml_1 = __importDefault(__webpack_require__(13552)); class ActionYamlReader { constructor() { let filename = `action.yml`; if (!fs_1.default.existsSync(filename)) { filename = path_1.default.join(__dirname, `..`, filename); } this.actionYamlParsed = yaml_1.default.parse(fs_1.default.readFileSync(filename).toString()); } GetActionYamlValue(key) { var _a; return ((_a = this.actionYamlParsed.inputs[key]) === null || _a === void 0 ? void 0 : _a.description) || 'No description found in action.yml'; } } exports.ActionYamlReader = ActionYamlReader; /***/ }), /***/ 24271: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.GitRepoReader = void 0; const console_1 = __webpack_require__(57082); const system_1 = __importDefault(__webpack_require__(62177)); const fs_1 = __importDefault(__webpack_require__(35747)); const cloud_runner_system_1 = __webpack_require__(66879); class GitRepoReader { static GetSha() { return ''; } static GetRemote() { return __awaiter(this, void 0, void 0, function* () { return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`git remote -v`)) .split(' ')[1] .split('https://github.com/')[1] .split('.git')[0]; }); } static GetBranch() { return __awaiter(this, void 0, void 0, function* () { console_1.assert(fs_1.default.existsSync(`.git`)); return (yield system_1.default.run(`git branch`, [], {}, false)).split('*')[1].split(`\n`)[0].replace(/ /g, ``); }); } } exports.GitRepoReader = GitRepoReader; /***/ }), /***/ 44990: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.GithubCliReader = void 0; const cloud_runner_system_1 = __webpack_require__(66879); const core = __importStar(__webpack_require__(42186)); class GithubCliReader { static GetGitHubAuthToken() { return __awaiter(this, void 0, void 0, function* () { try { const authStatus = yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status`, true); if (authStatus.includes('You are not logged') || authStatus === '') { return ''; } return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`)) .split(`Token: `)[1] .replace(/ /g, '') .replace(/\n/g, ''); } catch (error) { core.info(error || 'Failed to get github auth token from gh cli'); return ''; } }); } } exports.GithubCliReader = GithubCliReader; /***/ }), /***/ 13963: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReadLicense = void 0; const path_1 = __importDefault(__webpack_require__(85622)); const fs_1 = __importDefault(__webpack_require__(35747)); const yaml_1 = __importDefault(__webpack_require__(13552)); function ReadLicense() { const pipelineFile = path_1.default.join(__dirname, `.github`, `workflows`, `cloud-runner-k8s-pipeline.yml`); return fs_1.default.existsSync(pipelineFile) ? yaml_1.default.parse(fs_1.default.readFileSync(pipelineFile, 'utf8')).env.UNITY_LICENSE : ''; } exports.ReadLicense = ReadLicense; /***/ }), /***/ 91933: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs_1 = __importDefault(__webpack_require__(35747)); const path_1 = __importDefault(__webpack_require__(85622)); const git_repo_1 = __webpack_require__(24271); const github_cli_1 = __webpack_require__(44990); const platform_1 = __importDefault(__webpack_require__(9707)); const core = __webpack_require__(42186); /** * Input variables specified in workflows using "with" prop. * * Note that input is always passed as a string, even booleans. */ class Input { // also enabled debug logging for cloud runner static get cloudRunnerTests() { return Input.getInput(`cloudRunnerTests`) || Input.getInput(`CloudRunnerTests`) || false; } static getInput(query) { const coreInput = core.getInput(query); if (Input.githubInputEnabled && coreInput && coreInput !== '') { return coreInput; } return Input.cliOptions !== undefined && Input.cliOptions[query] !== undefined ? Input.cliOptions[query] : process.env[query] !== undefined ? process.env[query] : process.env[Input.ToEnvVarFormat(query)] ? process.env[Input.ToEnvVarFormat(query)] : ''; } static get region() { return Input.getInput('region') || 'eu-west-2'; } static githubRepo() { return __awaiter(this, void 0, void 0, function* () { return (Input.getInput('GITHUB_REPOSITORY') || Input.getInput('GITHUB_REPO') || (yield git_repo_1.GitRepoReader.GetRemote()) || 'game-ci/unity-builder'); }); } static branch() { return __awaiter(this, void 0, void 0, function* () { if (yield git_repo_1.GitRepoReader.GetBranch()) { return yield git_repo_1.GitRepoReader.GetBranch(); } else if (Input.getInput(`GITHUB_REF`)) { return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, ''); } else if (Input.getInput('branch')) { return Input.getInput('branch'); } else { return 'main'; } }); } static get gitSha() { if (Input.getInput(`GITHUB_SHA`)) { return Input.getInput(`GITHUB_SHA`); } else if (Input.getInput(`GitSHA`)) { return Input.getInput(`GitSHA`); } else if (git_repo_1.GitRepoReader.GetSha()) { return git_repo_1.GitRepoReader.GetSha(); } } static get runNumber() { return Input.getInput('GITHUB_RUN_NUMBER') || '0'; } static get unityVersion() { return Input.getInput('unityVersion') || 'auto'; } static get customImage() { return Input.getInput('customImage'); } static get targetPlatform() { return Input.getInput('targetPlatform') || platform_1.default.default; } static get projectPath() { const input = Input.getInput('projectPath'); const rawProjectPath = input ? input : fs_1.default.existsSync(path_1.default.join('test-project', 'ProjectSettings', 'ProjectVersion.txt')) && !fs_1.default.existsSync(path_1.default.join('ProjectSettings', 'ProjectVersion.txt')) ? 'test-project' : '.'; return rawProjectPath.replace(/\/$/, ''); } static get buildName() { return Input.getInput('buildName') || this.targetPlatform; } static get buildsPath() { return Input.getInput('buildsPath') || 'build'; } static get buildMethod() { return Input.getInput('buildMethod') || ''; // processed in docker file } static get versioningStrategy() { return Input.getInput('versioning') || 'Semantic'; } static get specifiedVersion() { return Input.getInput('version') || ''; } static get androidVersionCode() { return Input.getInput('androidVersionCode'); } static get androidAppBundle() { const input = Input.getInput('androidAppBundle') || false; return input === 'true'; } static get androidKeystoreName() { return Input.getInput('androidKeystoreName') || ''; } static get androidKeystoreBase64() { return Input.getInput('androidKeystoreBase64') || ''; } static get androidKeystorePass() { return Input.getInput('androidKeystorePass') || ''; } static get androidKeyaliasName() { return Input.getInput('androidKeyaliasName') || ''; } static get androidKeyaliasPass() { return Input.getInput('androidKeyaliasPass') || ''; } static get androidTargetSdkVersion() { return core.getInput('androidTargetSdkVersion') || ''; } static get allowDirtyBuild() { const input = Input.getInput('allowDirtyBuild') || false; return input === 'true'; } static get customParameters() { return Input.getInput('customParameters') || ''; } static get sshAgent() { return Input.getInput('sshAgent') || ''; } static githubToken() { return __awaiter(this, void 0, void 0, function* () { return Input.getInput('githubToken') || (yield github_cli_1.GithubCliReader.GetGitHubAuthToken()) || ''; }); } static gitPrivateToken() { return __awaiter(this, void 0, void 0, function* () { return core.getInput('gitPrivateToken') || (yield Input.githubToken()); }); } static get chownFilesTo() { return Input.getInput('chownFilesTo') || ''; } static get postBuildSteps() { return Input.getInput('postBuildSteps') || ''; } static get preBuildSteps() { return Input.getInput('preBuildSteps') || ''; } static get customJob() { return Input.getInput('customJob') || ''; } static get cloudRunnerCluster() { return Input.getInput('cloudRunnerCluster') || ''; } static get awsBaseStackName() { return Input.getInput('awsBaseStackName') || 'game-ci'; } static get kubeConfig() { return Input.getInput('kubeConfig') || ''; } static get cloudRunnerMemory() { return Input.getInput('cloudRunnerMemory') || '750M'; } static get cloudRunnerCpu() { return Input.getInput('cloudRunnerCpu') || '1.0'; } static get kubeVolumeSize() { return Input.getInput('kubeVolumeSize') || '5Gi'; } static get kubeVolume() { return Input.getInput('kubeVolume') || ''; } static ToEnvVarFormat(input) { return input .replace(/([A-Z])/g, ' $1') .trim() .toUpperCase() .replace(/ /g, '_'); } } Input.githubInputEnabled = true; exports.default = Input; /***/ }), /***/ 39364: /***/ (function(__unused_webpack_module, exports, __webpack_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 })); const exec_1 = __webpack_require__(71514); class MacBuilder { static run(actionFolder, workspace, buildParameters, silent = false) { return __awaiter(this, void 0, void 0, function* () { yield exec_1.exec('bash', [`${actionFolder}/platforms/mac/entrypoint.sh`], { silent, ignoreReturnCode: true, }); }); } } exports.default = MacBuilder; /***/ }), /***/ 85487: /***/ (function(__unused_webpack_module, exports, __webpack_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 })); const core = __webpack_require__(42186); class Output { static setBuildVersion(buildVersion) { return __awaiter(this, void 0, void 0, function* () { yield core.setOutput('buildVersion', buildVersion); }); } } exports.default = Output; /***/ }), /***/ 64423: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const platform_setup_1 = __webpack_require__(2014); const validate_windows_1 = __importDefault(__webpack_require__(41563)); class PlatformSetup { static setup(buildParameters, actionFolder) { return __awaiter(this, void 0, void 0, function* () { switch (process.platform) { case 'win32': validate_windows_1.default.validate(buildParameters); platform_setup_1.SetupWindows.setup(buildParameters); break; case 'darwin': yield platform_setup_1.SetupMac.setup(buildParameters, actionFolder); break; //Add other baseOS's here } }); } } exports.default = PlatformSetup; /***/ }), /***/ 2014: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SetupMac = exports.SetupWindows = void 0; const setup_windows_1 = __importDefault(__webpack_require__(37449)); exports.SetupWindows = setup_windows_1.default; const setup_mac_1 = __importDefault(__webpack_require__(22466)); exports.SetupMac = setup_mac_1.default; /***/ }), /***/ 22466: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const unity_changeset_1 = __webpack_require__(4635); const exec_1 = __webpack_require__(71514); const fs_1 = __importDefault(__webpack_require__(35747)); class SetupMac { static setup(buildParameters, actionFolder) { return __awaiter(this, void 0, void 0, function* () { const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.version}/Unity.app/Contents/MacOS/Unity`; // Only install unity if the editor doesn't already exist if (!fs_1.default.existsSync(unityEditorPath)) { yield SetupMac.installUnityHub(); yield SetupMac.installUnity(buildParameters); } yield SetupMac.setEnvironmentVariables(buildParameters, actionFolder); }); } static installUnityHub(silent = false) { return __awaiter(this, void 0, void 0, function* () { const command = 'brew install unity-hub'; if (!fs_1.default.existsSync(this.unityHubPath)) { // Ignoring return code because the log seems to overflow the internal buffer which triggers // a false error const errorCode = yield exec_1.exec(command, undefined, { silent, ignoreReturnCode: true }); if (errorCode) { throw new Error(`There was an error installing the Unity Editor. See logs above for details.`); } } }); } static installUnity(buildParameters, silent = false) { return __awaiter(this, void 0, void 0, function* () { const unityChangeset = yield unity_changeset_1.getUnityChangeset(buildParameters.version); const command = `${this.unityHubPath} -- --headless install \ --version ${buildParameters.version} \ --changeset ${unityChangeset.changeset} \ --module mac-il2cpp \ --childModules`; // Ignoring return code because the log seems to overflow the internal buffer which triggers // a false error const errorCode = yield exec_1.exec(command, undefined, { silent, ignoreReturnCode: true }); if (errorCode) { throw new Error(`There was an error installing the Unity Editor. See logs above for details.`); } }); } static setEnvironmentVariables(buildParameters, actionFolder) { return __awaiter(this, void 0, void 0, function* () { // Need to set environment variables from here because we execute // the scripts on the host for mac process.env.ACTION_FOLDER = actionFolder; process.env.UNITY_VERSION = buildParameters.version; process.env.UNITY_SERIAL = buildParameters.unitySerial; process.env.PROJECT_PATH = buildParameters.projectPath; process.env.BUILD_TARGET = buildParameters.platform; process.env.BUILD_NAME = buildParameters.buildName; process.env.BUILD_PATH = buildParameters.buildPath; process.env.BUILD_FILE = buildParameters.buildFile; process.env.BUILD_METHOD = buildParameters.buildMethod; process.env.VERSION = buildParameters.buildVersion; process.env.ANDROID_VERSION_CODE = buildParameters.androidVersionCode; process.env.ANDROID_KEYSTORE_NAME = buildParameters.androidKeystoreName; process.env.ANDROID_KEYSTORE_BASE64 = buildParameters.androidKeystoreBase64; process.env.ANDROID_KEYSTORE_PASS = buildParameters.androidKeystorePass; process.env.ANDROID_KEYALIAS_NAME = buildParameters.androidKeyaliasName; process.env.ANDROID_KEYALIAS_PASS = buildParameters.androidKeyaliasPass; process.env.ANDROID_TARGET_SDK_VERSION = buildParameters.androidTargetSdkVersion; process.env.ANDROID_SDK_MANAGER_PARAMETERS = buildParameters.androidSdkManagerParameters; process.env.CUSTOM_PARAMETERS = buildParameters.customParameters; process.env.CHOWN_FILES_TO = buildParameters.chownFilesTo; }); } } SetupMac.unityHubPath = `"/Applications/Unity Hub.app/Contents/MacOS/Unity Hub"`; exports.default = SetupMac; /***/ }), /***/ 37449: /***/ (function(__unused_webpack_module, exports, __webpack_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 __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const exec_1 = __webpack_require__(71514); const fs_1 = __importDefault(__webpack_require__(35747)); class SetupWindows { static setup(buildParameters) { return __awaiter(this, void 0, void 0, function* () { yield SetupWindows.setupWindowsRun(buildParameters.platform); }); } //Setup prerequisite files/folders for a windows-based docker run static setupWindowsRun(platform, silent = false) { return __awaiter(this, void 0, void 0, function* () { if (!fs_1.default.existsSync('c:/regkeys')) { fs_1.default.mkdirSync('c:/regkeys'); } switch (platform) { //These all need the Windows 10 SDK case 'StandaloneWindows': case 'StandaloneWindows64': case 'WSAPlayer': this.generateWinSDKRegKeys(silent); break; } }); } static generateWinSDKRegKeys(silent = false) { return __awaiter(this, void 0, void 0, function* () { // Export registry keys that point to the location of the windows 10 sdk const exportWinSDKRegKeysCommand = 'reg export "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0" c:/regkeys/winsdk.reg /y'; yield exec_1.exec(exportWinSDKRegKeysCommand, undefined, { silent }); }); } } exports.default = SetupWindows; /***/ }), /***/ 41563: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs_1 = __importDefault(__webpack_require__(35747)); class ValidateWindows { static validate(buildParameters) { ValidateWindows.validateWindowsPlatformRequirements(buildParameters.platform); if (!(process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD)) { throw new Error(`Unity email and password must be set for Windows based builds to authenticate the license. Make sure to set them inside UNITY_EMAIL and UNITY_PASSWORD in Github Secrets and pass them into the environment.`); } } static validateWindowsPlatformRequirements(platform) { switch (platform) { case 'StandaloneWindows': this.checkForVisualStudio(); this.checkForWin10SDK(); break; case 'StandaloneWindows64': this.checkForVisualStudio(); this.checkForWin10SDK(); break; case 'WSAPlayer': this.checkForVisualStudio(); this.checkForWin10SDK(); break; case 'tvOS': this.checkForVisualStudio(); break; } } static checkForWin10SDK() { //Check for Windows 10 SDK on runner const windows10SDKPathExists = fs_1.default.existsSync('C:/Program Files (x86)/Windows Kits'); if (!windows10SDKPathExists) { throw new Error(`Windows 10 SDK not found in default location. Make sure the runner has a Windows 10 SDK installed in the default location.`); } } static checkForVisualStudio() { //Note: When upgrading to Server 2022, we will need to move to just "program files" since VS will be 64-bit const visualStudioInstallPathExists = fs_1.default.existsSync('C:/Program Files (x86)/Microsoft Visual Studio'); const visualStudioDataPathExists = fs_1.default.existsSync('C:/ProgramData/Microsoft/VisualStudio'); if (!visualStudioInstallPathExists || !visualStudioDataPathExists) { throw new Error(`Visual Studio not found at the default location. Make sure the runner has Visual Studio installed in the default location`); } } } exports.default = ValidateWindows; /***/ }), /***/ 9707: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class Platform { static get default() { return Platform.types.StandaloneWindows64; } static get types() { return { StandaloneOSX: 'StandaloneOSX', StandaloneWindows: 'StandaloneWindows', StandaloneWindows64: 'StandaloneWindows64', StandaloneLinux64: 'StandaloneLinux64', iOS: 'iOS', Android: 'Android', WebGL: 'WebGL', WSAPlayer: 'WSAPlayer', PS4: 'PS4', XboxOne: 'XboxOne', tvOS: 'tvOS', Switch: 'Switch', // Unsupported Lumin: 'Lumin', BJM: 'BJM', Stadia: 'Stadia', Facebook: 'Facebook', NoTarget: 'NoTarget', // Test specific Test: 'Test', }; } static isWindows(platform) { switch (platform) { case Platform.types.StandaloneWindows: case Platform.types.StandaloneWindows64: return true; default: return false; } } static isAndroid(platform) { switch (platform) { case Platform.types.Android: return true; default: return false; } } } exports.default = Platform; /***/ }), /***/ 88666: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const input_1 = __importDefault(__webpack_require__(91933)); const unity_1 = __importDefault(__webpack_require__(70498)); const action_1 = __importDefault(__webpack_require__(89088)); class Project { static get relativePath() { const { projectPath } = input_1.default; return `${projectPath}`; } static get absolutePath() { const { workspace } = action_1.default; return `${workspace}/${this.relativePath}`; } static get libraryFolder() { return `${this.relativePath}/${unity_1.default.libraryFolder}`; } } exports.default = Project; /***/ }), /***/ 62177: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); const exec_1 = __webpack_require__(71514); class System { static run(command, arguments_ = [], options = {}, shouldLog = true) { return __awaiter(this, void 0, void 0, function* () { let result = ''; let error = ''; let debug = ''; const listeners = { stdout: (dataBuffer) => { result += dataBuffer.toString(); }, stderr: (dataBuffer) => { error += dataBuffer.toString(); }, debug: (dataString) => { debug += dataString.toString(); }, }; const showOutput = () => { if (debug !== '' && shouldLog) { core.debug(debug); } if (result !== '' && shouldLog) { core.info(result); } if (error !== '' && shouldLog) { core.warning(error); } }; const throwContextualError = (message) => { let commandAsString = command; if (Array.isArray(arguments_)) { commandAsString += ` ${arguments_.join(' ')}`; } else if (typeof arguments_ === 'string') { commandAsString += ` ${arguments_}`; } throw new Error(`Failed to run "${commandAsString}".\n ${message}`); }; try { const exitCode = yield exec_1.exec(command, arguments_, Object.assign({ silent: true, listeners }, options)); showOutput(); if (exitCode !== 0) { throwContextualError(`Command returned non-zero exit code.\nError: ${error}`); } } catch (inCommandError) { showOutput(); throwContextualError(`In-command error caught: ${inCommandError}`); } return result; }); } } exports.default = System; /***/ }), /***/ 17146: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs = __importStar(__webpack_require__(35747)); const path_1 = __importDefault(__webpack_require__(85622)); class UnityVersioning { static get versionPattern() { return /20\d{2}\.\d\.\w{3,4}|3/; } static determineUnityVersion(projectPath, unityVersion) { if (unityVersion === 'auto') { return UnityVersioning.read(projectPath); } return unityVersion; } static read(projectPath) { const filePath = path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt'); if (!fs.existsSync(filePath)) { throw new Error(`Project settings file not found at "${filePath}". Have you correctly set the projectPath?`); } return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8')); } static parse(projectVersionTxt) { const matches = projectVersionTxt.match(UnityVersioning.versionPattern); if (!matches || matches.length === 0) { throw new Error(`Failed to parse version from "${projectVersionTxt}".`); } return matches[0]; } } exports.default = UnityVersioning; /***/ }), /***/ 70498: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class Unity { static get libraryFolder() { return 'Library'; } } exports.default = Unity; /***/ }), /***/ 88729: /***/ (function(__unused_webpack_module, exports, __webpack_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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); const not_implemented_exception_1 = __importDefault(__webpack_require__(26574)); const validation_error_1 = __importDefault(__webpack_require__(97266)); const input_1 = __importDefault(__webpack_require__(91933)); const system_1 = __importDefault(__webpack_require__(62177)); class Versioning { static get projectPath() { return input_1.default.projectPath; } static get isDirtyAllowed() { return input_1.default.allowDirtyBuild; } static get strategies() { return { None: 'None', Semantic: 'Semantic', Tag: 'Tag', Custom: 'Custom' }; } /** * Get the branch name of the (related) branch */ static get branch() { // Todo - use optional chaining (https://github.com/zeit/ncc/issues/534) return this.headRef || (this.ref && this.ref.slice(11)); } /** * For pull requests we can reliably use GITHUB_HEAD_REF */ static get headRef() { return process.env.GITHUB_HEAD_REF; } /** * For branches GITHUB_REF will have format `refs/heads/feature-branch-1` */ static get ref() { return process.env.GITHUB_REF; } /** * The commit SHA that triggered the workflow run. */ static get sha() { return process.env.GITHUB_SHA; } /** * Maximum number of lines to print when logging the git diff */ static get maxDiffLines() { return 60; } /** * Log up to maxDiffLines of the git diff. */ static logDiff() { return __awaiter(this, void 0, void 0, function* () { const diffCommand = `git --no-pager diff | head -n ${this.maxDiffLines.toString()}`; yield system_1.default.run('sh', undefined, { input: Buffer.from(diffCommand), silent: true, }); }); } /** * Regex to parse version description into separate fields */ static get descriptionRegex1() { return /^v?([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g; } static get descriptionRegex2() { return /^v?([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g; } static get descriptionRegex3() { return /^v?([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g; } static determineVersion(strategy, inputVersion) { return __awaiter(this, void 0, void 0, function* () { // Validate input if (!Object.hasOwnProperty.call(this.strategies, strategy)) { throw new validation_error_1.default(`Versioning strategy should be one of ${Object.values(this.strategies).join(', ')}.`); } let version; switch (strategy) { case this.strategies.None: version = 'none'; break; case this.strategies.Custom: version = inputVersion; break; case this.strategies.Semantic: version = yield this.generateSemanticVersion(); break; case this.strategies.Tag: version = yield this.generateTagVersion(); break; default: throw new not_implemented_exception_1.default(`Strategy ${strategy} is not implemented.`); } return version; }); } /** * Automatically generates a version based on SemVer out of the box. * * The version works as follows: `..` for example `0.1.2`. * * The latest tag dictates `.` * The number of commits since that tag dictates``. * * @See: https://semver.org/ */ static generateSemanticVersion() { return __awaiter(this, void 0, void 0, function* () { if (yield this.isShallow()) { yield this.fetch(); } yield this.logDiff(); if ((yield this.isDirty()) && !this.isDirtyAllowed) { throw new Error('Branch is dirty. Refusing to base semantic version on uncommitted changes'); } if (!(yield this.hasAnyVersionTags())) { const version = `0.0.${yield this.getTotalNumberOfCommits()}`; core.info(`Generated version ${version} (no version tags found).`); return version; } const versionDescriptor = yield this.parseSemanticVersion(); if (versionDescriptor) { const { tag, commits, hash } = versionDescriptor; // Ensure 3 digits (commits should always be patch level) const [major, minor, patch] = `${tag}.${commits}`.split('.'); const threeDigitVersion = /^\d+$/.test(patch) ? `${major}.${minor}.${patch}` : `${major}.0.${minor}`; core.info(`Found semantic version ${threeDigitVersion} for ${this.branch}@${hash}`); return `${threeDigitVersion}`; } const version = `0.0.${yield this.getTotalNumberOfCommits()}`; core.info(`Generated version ${version} (semantic version couldn't be determined).`); return version; }); } /** * Generate the proper version for unity based on an existing tag. */ static generateTagVersion() { return __awaiter(this, void 0, void 0, function* () { let tag = yield this.getTag(); if (tag.charAt(0) === 'v') { tag = tag.slice(1); } return tag; }); } /** * Parses the versionDescription into their named parts. */ static parseSemanticVersion() { return __awaiter(this, void 0, void 0, function* () { const description = yield this.getVersionDescription(); try { const [match, tag, commits, hash] = this.descriptionRegex1.exec(description); return { match, tag, commits, hash, }; } catch (_a) { try { const [match, tag, commits, hash] = this.descriptionRegex2.exec(description); return { match, tag, commits, hash, }; } catch (_b) { try { const [match, tag, commits, hash] = this.descriptionRegex3.exec(description); return { match, tag, commits, hash, }; } catch (_c) { core.warning(`Failed to parse git describe output or version can not be determined through: "${description}".`); return false; } } } }); } /** * Returns whether the repository is shallow. */ static isShallow() { return __awaiter(this, void 0, void 0, function* () { const output = yield this.git(['rev-parse', '--is-shallow-repository']); return output !== 'false\n'; }); } /** * Retrieves refs from the configured remote. * * Fetch unshallow for incomplete repository, but fall back to normal fetch. * * Note: `--all` should not be used, and would break fetching for push event. */ static fetch() { return __awaiter(this, void 0, void 0, function* () { try { yield this.git(['fetch', '--unshallow']); } catch (error) { core.warning(`Fetch --unshallow caught: ${error}`); yield this.git(['fetch']); } }); } /** * Retrieves information about the branch. * * Format: `v0.12-24-gd2198ab` * * In this format v0.12 is the latest tag, 24 are the number of commits since, and gd2198ab * identifies the current commit. */ static getVersionDescription() { return __awaiter(this, void 0, void 0, function* () { return this.git(['describe', '--long', '--tags', '--always', this.sha]); }); } /** * Returns whether there are uncommitted changes that are not ignored. */ static isDirty() { return __awaiter(this, void 0, void 0, function* () { const output = yield this.git(['status', '--porcelain']); const isDirty = output !== ''; if (isDirty) { core.warning('Changes were made to the following files and folders:\n'); core.warning(output); } return isDirty; }); } /** * Get the tag if there is one pointing at HEAD */ static getTag() { return __awaiter(this, void 0, void 0, function* () { return (yield this.git(['tag', '--points-at', 'HEAD'])).trim(); }); } /** * Whether or not the repository has any version tags yet. */ static hasAnyVersionTags() { return __awaiter(this, void 0, void 0, function* () { const numberOfCommitsAsString = yield system_1.default.run('sh', undefined, { input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'), cwd: this.projectPath, silent: false, }); const numberOfCommits = Number.parseInt(numberOfCommitsAsString, 10); return numberOfCommits !== 0; }); } /** * Get the total number of commits on head. * * Note: HEAD should not be used, as it may be detached, resulting in an additional count. */ static getTotalNumberOfCommits() { return __awaiter(this, void 0, void 0, function* () { const numberOfCommitsAsString = yield this.git(['rev-list', '--count', this.sha]); return Number.parseInt(numberOfCommitsAsString, 10); }); } /** * Run git in the specified project path */ static git(arguments_, options = {}) { return __awaiter(this, void 0, void 0, function* () { return system_1.default.run('git', arguments_, Object.assign({ cwd: this.projectPath }, options)); }); } } exports.default = Versioning; /***/ }), /***/ 87351: /***/ (function(__unused_webpack_module, exports, __webpack_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(__webpack_require__(12087)); const utils_1 = __webpack_require__(5278); /** * 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 /***/ }), /***/ 42186: /***/ (function(__unused_webpack_module, exports, __webpack_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 = __webpack_require__(87351); const file_command_1 = __webpack_require__(717); const utils_1 = __webpack_require__(5278); const os = __importStar(__webpack_require__(12087)); const path = __importStar(__webpack_require__(85622)); /** * 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) { process.stdout.write(os.EOL); command_1.issueCommand('set-output', { name }, value); } exports.setOutput = setOutput; /** * Enables or disables the echoing of commands into stdout for the rest of the step. * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. * */ function setCommandEcho(enabled) { command_1.issue('echo', enabled ? 'on' : 'off'); } exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- // Results //----------------------------------------------------------------------- /** * Sets the action status to failed. * When the action exits it will be with an exit code of 1 * @param message add error issue message */ function setFailed(message) { process.exitCode = ExitCode.Failure; error(message); } exports.setFailed = setFailed; //----------------------------------------------------------------------- // Logging Commands //----------------------------------------------------------------------- /** * Gets whether Actions Step Debug is on or not */ function isDebug() { return process.env['RUNNER_DEBUG'] === '1'; } exports.isDebug = isDebug; /** * Writes debug message to user log * @param message debug message */ function debug(message) { command_1.issueCommand('debug', {}, message); } exports.debug = debug; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() */ 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 /***/ }), /***/ 717: /***/ (function(__unused_webpack_module, exports, __webpack_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(__webpack_require__(35747)); const os = __importStar(__webpack_require__(12087)); const utils_1 = __webpack_require__(5278); 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 /***/ }), /***/ 5278: /***/ ((__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 /***/ }), /***/ 71514: /***/ (function(__unused_webpack_module, exports, __webpack_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 tr = __importStar(__webpack_require__(88159)); /** * Exec a command. * Output will be streamed to the live console. * Returns promise with return code * * @param commandLine command to execute (can include additional args). Must be correctly escaped. * @param args optional arguments for tool. Escaping is handled by the lib. * @param options optional exec options. See ExecOptions * @returns Promise exit code */ function exec(commandLine, args, options) { return __awaiter(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); } // Path to tool to execute should be first arg const toolPath = commandArgs[0]; args = commandArgs.slice(1).concat(args || []); const runner = new tr.ToolRunner(toolPath, args, options); return runner.exec(); }); } exports.exec = exec; //# sourceMappingURL=exec.js.map /***/ }), /***/ 88159: /***/ (function(__unused_webpack_module, exports, __webpack_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 os = __importStar(__webpack_require__(12087)); const events = __importStar(__webpack_require__(28614)); const child = __importStar(__webpack_require__(63129)); const path = __importStar(__webpack_require__(85622)); const io = __importStar(__webpack_require__(47351)); const ioUtil = __importStar(__webpack_require__(81962)); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. */ class ToolRunner extends events.EventEmitter { constructor(toolPath, args, options) { super(); if (!toolPath) { throw new Error("Parameter 'toolPath' cannot be null or empty."); } this.toolPath = toolPath; this.args = args || []; this.options = options || {}; } _debug(message) { if (this.options.listeners && this.options.listeners.debug) { this.options.listeners.debug(message); } } _getCommandString(options, noPrefix) { const toolPath = this._getSpawnFileName(); const args = this._getSpawnArgs(options); let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool if (IS_WINDOWS) { // Windows + cmd file if (this._isCmdFile()) { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } // Windows + verbatim else if (options.windowsVerbatimArguments) { cmd += `"${toolPath}"`; for (const a of args) { cmd += ` ${a}`; } } // Windows (regular) else { cmd += this._windowsQuoteCmdArg(toolPath); for (const a of args) { cmd += ` ${this._windowsQuoteCmdArg(a)}`; } } } else { // OSX/Linux - this can likely be improved with some form of quoting. // creating processes on Unix is fundamentally different than Windows. // on Unix, execvp() takes an arg array. cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } return cmd; } _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); let n = s.indexOf(os.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); // the rest of the string ... s = s.substring(n + os.EOL.length); n = s.indexOf(os.EOL); } strBuffer = s; } catch (err) { // streaming lines to console is best effort. Don't fail a build. this._debug(`error processing line. Failed with error ${err}`); } } _getSpawnFileName() { if (IS_WINDOWS) { if (this._isCmdFile()) { return process.env['COMSPEC'] || 'cmd.exe'; } } return this.toolPath; } _getSpawnArgs(options) { if (IS_WINDOWS) { if (this._isCmdFile()) { let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; for (const a of this.args) { argline += ' '; argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); } argline += '"'; return [argline]; } } return this.args; } _endsWith(str, end) { return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); return (this._endsWith(upperToolPath, '.CMD') || this._endsWith(upperToolPath, '.BAT')); } _windowsQuoteCmdArg(arg) { // for .exe, apply the normal quoting rules that libuv applies if (!this._isCmdFile()) { return this._uvQuoteCmdArg(arg); } // otherwise apply quoting rules specific to the cmd.exe command line parser. // the libuv rules are generic and are not designed specifically for cmd.exe // command line parser. // // for a detailed description of the cmd.exe command line parser, refer to // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 // need quotes for empty arg if (!arg) { return '""'; } // determine whether the arg needs to be quoted const cmdSpecialChars = [ ' ', '\t', '&', '(', ')', '[', ']', '{', '}', '^', '=', ';', '!', "'", '+', ',', '`', '~', '|', '<', '>', '"' ]; let needsQuotes = false; for (const char of arg) { if (cmdSpecialChars.some(x => x === char)) { needsQuotes = true; break; } } // short-circuit if quotes not needed if (!needsQuotes) { return arg; } // the following quoting rules are very similar to the rules that by libuv applies. // // 1) wrap the string in quotes // // 2) double-up quotes - i.e. " => "" // // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately // doesn't work well with a cmd.exe command line. // // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. // for example, the command line: // foo.exe "myarg:""my val""" // is parsed by a .NET console app into an arg array: // [ "myarg:\"my val\"" ] // which is the same end result when applying libuv quoting rules. although the actual // command line from libuv quoting rules would look like: // foo.exe "myarg:\"my val\"" // // 3) double-up slashes that precede a quote, // e.g. hello \world => "hello \world" // hello\"world => "hello\\""world" // hello\\"world => "hello\\\\""world" // hello world\ => "hello world\\" // // technically this is not required for a cmd.exe command line, or the batch argument parser. // the reasons for including this as a .cmd quoting rule are: // // a) this is optimized for the scenario where the argument is passed from the .cmd file to an // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. // // b) it's what we've been doing previously (by deferring to node default behavior) and we // haven't heard any complaints about that aspect. // // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be // escaped when used on the command line directly - even though within a .cmd file % can be escaped // by using %%. // // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. // // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args // to an external program. // // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. // % can be escaped within a .cmd file. let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { // walk the string in reverse reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === '\\') { reverse += '\\'; // double the slash } else if (arg[i - 1] === '"') { quoteHit = true; reverse += '"'; // double the quote } else { quoteHit = false; } } reverse += '"'; return reverse .split('') .reverse() .join(''); } _uvQuoteCmdArg(arg) { // Tool runner wraps child_process.spawn() and needs to apply the same quoting as // Node in certain cases where the undocumented spawn option windowsVerbatimArguments // is used. // // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), // pasting copyright notice from Node within this function: // // Copyright Joyent, Inc. and other Node contributors. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. if (!arg) { // Need double quotation for empty argument return '""'; } if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { // No quotation needed return arg; } if (!arg.includes('"') && !arg.includes('\\')) { // No embedded double quotes or backslashes, so I can just wrap // quote marks around the whole thing. return `"${arg}"`; } // Expected input/output: // input : hello"world // output: "hello\"world" // input : hello""world // output: "hello\"\"world" // input : hello\world // output: hello\world // input : hello\\world // output: hello\\world // input : hello\"world // output: "hello\\\"world" // input : hello\\"world // output: "hello\\\\\"world" // input : hello world\ // output: "hello world\\" - note the comment in libuv actually reads "hello world\" // but it appears the comment is wrong, it should be "hello world\\" let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { // walk the string in reverse reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === '\\') { reverse += '\\'; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += '\\'; } else { quoteHit = false; } } reverse += '"'; return reverse .split('') .reverse() .join(''); } _cloneExecOptions(options) { options = options || {}; const result = { cwd: options.cwd || process.cwd(), env: options.env || process.env, silent: options.silent || false, windowsVerbatimArguments: options.windowsVerbatimArguments || false, failOnStdErr: options.failOnStdErr || false, ignoreReturnCode: options.ignoreReturnCode || false, delay: options.delay || 10000 }; result.outStream = options.outStream || process.stdout; result.errStream = options.errStream || process.stderr; return result; } _getSpawnOptions(options, toolPath) { options = options || {}; const result = {}; result.cwd = options.cwd; result.env = options.env; result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile(); if (options.windowsVerbatimArguments) { result.argv0 = `"${toolPath}"`; } return result; } /** * Exec a tool. * Output will be streamed to the live console. * Returns promise with return code * * @param tool path to tool to exec * @param options optional exec options. See ExecOptions * @returns number */ exec() { return __awaiter(this, void 0, void 0, function* () { // root the tool path if it is unrooted and contains relative pathing if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes('/') || (IS_WINDOWS && this.toolPath.includes('\\')))) { // prefer options.cwd if it is specified, however options.cwd may also need to be rooted this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } // if the tool is only a file name, then resolve it from the PATH // otherwise verify it exists (add extension on Windows if necessary) this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => { this._debug(`exec tool: ${this.toolPath}`); this._debug('arguments:'); for (const arg of this.args) { this._debug(` ${arg}`); } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on('debug', (message) => { this._debug(message); }); const fileName = this._getSpawnFileName(); const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); const stdbuffer = ''; if (cp.stdout) { cp.stdout.on('data', (data) => { if (this.options.listeners && this.options.listeners.stdout) { this.options.listeners.stdout(data); } if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(data); } this._processLineBuffer(data, stdbuffer, (line) => { if (this.options.listeners && this.options.listeners.stdline) { this.options.listeners.stdline(line); } }); }); } const errbuffer = ''; if (cp.stderr) { cp.stderr.on('data', (data) => { state.processStderr = true; if (this.options.listeners && this.options.listeners.stderr) { this.options.listeners.stderr(data); } if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; s.write(data); } this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { this.options.listeners.errline(line); } }); }); } cp.on('error', (err) => { state.processError = err.message; state.processExited = true; state.processClosed = true; state.CheckComplete(); }); cp.on('exit', (code) => { state.processExitCode = code; state.processExited = true; this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); state.CheckComplete(); }); cp.on('close', (code) => { state.processExitCode = code; state.processExited = true; state.processClosed = true; this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); state.on('done', (error, exitCode) => { if (stdbuffer.length > 0) { this.emit('stdline', stdbuffer); } if (errbuffer.length > 0) { this.emit('errline', errbuffer); } cp.removeAllListeners(); if (error) { reject(error); } else { resolve(exitCode); } }); if (this.options.input) { if (!cp.stdin) { throw new Error('child process missing stdin'); } cp.stdin.end(this.options.input); } }); }); } } exports.ToolRunner = ToolRunner; /** * Convert an arg string to an array of args. Handles escaping * * @param argString string of arguments * @returns string[] array of arguments */ function argStringToArray(argString) { const args = []; let inQuotes = false; let escaped = false; let arg = ''; function append(c) { // we only escape double quotes. if (escaped && c !== '"') { arg += '\\'; } arg += c; escaped = false; } for (let i = 0; i < argString.length; i++) { const c = argString.charAt(i); if (c === '"') { if (!escaped) { inQuotes = !inQuotes; } else { append(c); } continue; } if (c === '\\' && escaped) { append(c); continue; } if (c === '\\' && inQuotes) { escaped = true; continue; } if (c === ' ' && !inQuotes) { if (arg.length > 0) { args.push(arg); arg = ''; } continue; } append(c); } if (arg.length > 0) { args.push(arg.trim()); } return args; } exports.argStringToArray = argStringToArray; class ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); this.processClosed = false; // tracks whether the process has exited and stdio is closed this.processError = ''; this.processExitCode = 0; this.processExited = false; // tracks whether the process has exited this.processStderr = false; // tracks whether stderr was written to this.delay = 10000; // 10 seconds this.done = false; this.timeout = null; if (!toolPath) { throw new Error('toolPath must not be empty'); } this.options = options; this.toolPath = toolPath; if (options.delay) { this.delay = options.delay; } } CheckComplete() { if (this.done) { return; } if (this.processClosed) { this._setResult(); } else if (this.processExited) { this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); } } _debug(message) { this.emit('debug', message); } _setResult() { // determine whether there is an error let error; if (this.processExited) { if (this.processError) { error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } // clear the timeout if (this.timeout) { clearTimeout(this.timeout); this.timeout = null; } this.done = true; this.emit('done', error, this.processExitCode); } static HandleTimeout(state) { if (state.done) { return; } if (!state.processClosed && state.processExited) { const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; state._debug(message); } state._setResult(); } } //# sourceMappingURL=toolrunner.js.map /***/ }), /***/ 81962: /***/ (function(__unused_webpack_module, exports, __webpack_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; }; var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); const assert_1 = __webpack_require__(42357); const fs = __importStar(__webpack_require__(35747)); const path = __importStar(__webpack_require__(85622)); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === 'win32'; function exists(fsPath) { return __awaiter(this, void 0, void 0, function* () { try { yield exports.stat(fsPath); } catch (err) { if (err.code === 'ENOENT') { return false; } throw err; } return true; }); } exports.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter(this, void 0, void 0, function* () { const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); return stats.isDirectory(); }); } exports.isDirectory = isDirectory; /** * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). */ function isRooted(p) { p = normalizeSeparators(p); if (!p) { throw new Error('isRooted() parameter "p" cannot be empty'); } if (exports.IS_WINDOWS) { return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello ); // e.g. C: or C:\hello } return p.startsWith('/'); } exports.isRooted = isRooted; /** * Recursively create a directory at `fsPath`. * * This implementation is optimistic, meaning it attempts to create the full * path first, and backs up the path stack from there. * * @param fsPath The path to create * @param maxDepth The maximum recursion depth * @param depth The current recursion depth */ function mkdirP(fsPath, maxDepth = 1000, depth = 1) { return __awaiter(this, void 0, void 0, function* () { assert_1.ok(fsPath, 'a path argument must be provided'); fsPath = path.resolve(fsPath); if (depth >= maxDepth) return exports.mkdir(fsPath); try { yield exports.mkdir(fsPath); return; } catch (err) { switch (err.code) { case 'ENOENT': { yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1); yield exports.mkdir(fsPath); return; } default: { let stats; try { stats = yield exports.stat(fsPath); } catch (err2) { throw err; } if (!stats.isDirectory()) throw err; } } } }); } exports.mkdirP = mkdirP; /** * Best effort attempt to determine whether a file exists and is executable. * @param filePath file path to check * @param extensions additional file extensions to try * @return if file exists and is executable, returns the file path. otherwise empty string. */ function tryGetExecutablePath(filePath, extensions) { return __awaiter(this, void 0, void 0, function* () { let stats = undefined; try { // test file exists stats = yield exports.stat(filePath); } catch (err) { if (err.code !== 'ENOENT') { // eslint-disable-next-line no-console console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { // on Windows, test for valid extension const upperExt = path.extname(filePath).toUpperCase(); if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { return filePath; } } else { if (isUnixExecutable(stats)) { return filePath; } } } // try each extension const originalFilePath = filePath; for (const extension of extensions) { filePath = originalFilePath + extension; stats = undefined; try { stats = yield exports.stat(filePath); } catch (err) { if (err.code !== 'ENOENT') { // eslint-disable-next-line no-console console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { // preserve the case of the actual file (since an extension was appended) try { const directory = path.dirname(filePath); const upperName = path.basename(filePath).toUpperCase(); for (const actualName of yield exports.readdir(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path.join(directory, actualName); break; } } } catch (err) { // eslint-disable-next-line no-console console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); } return filePath; } else { if (isUnixExecutable(stats)) { return filePath; } } } } return ''; }); } exports.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ''; if (exports.IS_WINDOWS) { // convert slashes on Windows p = p.replace(/\//g, '\\'); // remove redundant slashes return p.replace(/\\\\+/g, '\\'); } // remove redundant slashes return p.replace(/\/\/+/g, '/'); } // on Mac/Linux, test the execute bit // R W X R W X R W X // 256 128 64 32 16 8 4 2 1 function isUnixExecutable(stats) { return ((stats.mode & 1) > 0 || ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || ((stats.mode & 64) > 0 && stats.uid === process.getuid())); } //# sourceMappingURL=io-util.js.map /***/ }), /***/ 47351: /***/ (function(__unused_webpack_module, exports, __webpack_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 childProcess = __importStar(__webpack_require__(63129)); const path = __importStar(__webpack_require__(85622)); const util_1 = __webpack_require__(31669); const ioUtil = __importStar(__webpack_require__(81962)); const exec = util_1.promisify(childProcess.exec); /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js * * @param source source path * @param dest destination path * @param options optional. See CopyOptions. */ function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { const { force, recursive } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; // Dest is an existing file, but not forcing if (destStat && destStat.isFile() && !force) { return; } // If dest is an existing directory, should copy inside. const newDest = destStat && destStat.isDirectory() ? path.join(dest, path.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } const sourceStat = yield ioUtil.stat(source); if (sourceStat.isDirectory()) { if (!recursive) { throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); } else { yield cpDirRecursive(source, newDest, 0, force); } } else { if (path.relative(source, newDest) === '') { // a file cannot be copied to itself throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); } }); } exports.cp = cp; /** * Moves a path. * * @param source source path * @param dest destination path * @param options optional. See MoveOptions. */ function mv(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { // If dest is directory copy src into dest dest = path.join(dest, path.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { if (options.force == null || options.force) { yield rmRF(dest); } else { throw new Error('Destination already exists'); } } } yield mkdirP(path.dirname(dest)); yield ioUtil.rename(source, dest); }); } exports.mv = mv; /** * Remove a path recursively with force * * @param inputPath path to remove */ function rmRF(inputPath) { return __awaiter(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. try { if (yield ioUtil.isDirectory(inputPath, true)) { yield exec(`rd /s /q "${inputPath}"`); } else { yield exec(`del /f /a "${inputPath}"`); } } catch (err) { // if you try to delete a file that doesn't exist, desired result is achieved // other errors are valid if (err.code !== 'ENOENT') throw err; } // Shelling out fails to remove a symlink folder with missing source, this unlink catches that try { yield ioUtil.unlink(inputPath); } catch (err) { // if you try to delete a file that doesn't exist, desired result is achieved // other errors are valid if (err.code !== 'ENOENT') throw err; } } else { let isDir = false; try { isDir = yield ioUtil.isDirectory(inputPath); } catch (err) { // if you try to delete a file that doesn't exist, desired result is achieved // other errors are valid if (err.code !== 'ENOENT') throw err; return; } if (isDir) { yield exec(`rm -rf "${inputPath}"`); } else { yield ioUtil.unlink(inputPath); } } }); } exports.rmRF = rmRF; /** * Make a directory. Creates the full path with folders in between * Will throw if it fails * * @param fsPath path to create * @returns Promise */ function mkdirP(fsPath) { return __awaiter(this, void 0, void 0, function* () { yield ioUtil.mkdirP(fsPath); }); } exports.mkdirP = mkdirP; /** * Returns path of a tool had the tool actually been invoked. Resolves via paths. * If you check and the tool does not exist, it will throw. * * @param tool name of the tool * @param check whether to check if tool exists * @returns Promise path to tool */ function which(tool, check) { return __awaiter(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } // recursive when check=true if (check) { const result = yield which(tool, false); if (!result) { if (ioUtil.IS_WINDOWS) { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } return result; } const matches = yield findInPath(tool); if (matches && matches.length > 0) { return matches[0]; } return ''; }); } exports.which = which; /** * Returns a list of all occurrences of the given tool on the system path. * * @returns Promise the paths of the tool */ function findInPath(tool) { return __awaiter(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } // build the list of extensions to try const extensions = []; if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { for (const extension of process.env['PATHEXT'].split(path.delimiter)) { if (extension) { extensions.push(extension); } } } // if it's rooted, return it if exists. otherwise return empty. if (ioUtil.isRooted(tool)) { const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); if (filePath) { return [filePath]; } return []; } // if any path separators, return empty if (tool.includes(path.sep)) { return []; } // build the list of directories // // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, // it feels like we should not do this. Checking the current directory seems like more of a use // case of a shell, and the which() function exposed by the toolkit should strive for consistency // across platforms. const directories = []; if (process.env.PATH) { for (const p of process.env.PATH.split(path.delimiter)) { if (p) { directories.push(p); } } } // find all matches const matches = []; for (const directory of directories) { const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } } return matches; }); } exports.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); return { force, recursive }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter(this, void 0, void 0, function* () { // Ensure there is not a run away recursive copy if (currentDepth >= 255) return; currentDepth++; yield mkdirP(destDir); const files = yield ioUtil.readdir(sourceDir); for (const fileName of files) { const srcFile = `${sourceDir}/${fileName}`; const destFile = `${destDir}/${fileName}`; const srcFileStat = yield ioUtil.lstat(srcFile); if (srcFileStat.isDirectory()) { // Recurse yield cpDirRecursive(srcFile, destFile, currentDepth, force); } else { yield copyFile(srcFile, destFile, force); } } // Change the mode for the newly created directory yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); } // Buffered file copy function copyFile(srcFile, destFile, force) { return __awaiter(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { // unlink/re-link it try { yield ioUtil.lstat(destFile); yield ioUtil.unlink(destFile); } catch (e) { // Try to override file permission if (e.code === 'EPERM') { yield ioUtil.chmod(destFile, '0666'); yield ioUtil.unlink(destFile); } // other errors = it doesn't exist, no work to do } // Copy over symlink const symlinkFull = yield ioUtil.readlink(srcFile); yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); } else if (!(yield ioUtil.exists(destFile)) || force) { yield ioUtil.copyFile(srcFile, destFile); } }); } //# sourceMappingURL=io.js.map /***/ }), /***/ 56664: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(75636); tslib_1.__exportStar(__webpack_require__(37233), exports); //# sourceMappingURL=api.js.map /***/ }), /***/ 61041: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Attach = void 0; const tslib_1 = __webpack_require__(75636); const querystring = __webpack_require__(71191); const terminal_size_queue_1 = __webpack_require__(76023); const web_socket_handler_1 = __webpack_require__(47581); class Attach { constructor(config, websocketInterface) { this.handler = websocketInterface || new web_socket_handler_1.WebSocketHandler(config); } attach(namespace, podName, containerName, stdout, stderr, stdin, tty) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = yield 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 /***/ }), /***/ 5434: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.deleteObject = exports.addOrUpdateObject = exports.deleteItems = exports.ListWatch = void 0; const tslib_1 = __webpack_require__(75636); const informer_1 = __webpack_require__(88029); class ListWatch { constructor(path, watch, listFn, autoStart = true) { this.path = path; this.watch = watch; this.listFn = listFn; 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.resourceVersion = ''; if (autoStart) { this.doneHandler(null); } } start() { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.stopped = false; yield this.doneHandler(null); }); } stop() { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.stopped = true; this._stop(); }); } on(verb, cb) { if (verb === informer_1.CHANGE) { this.on(informer_1.ADD, cb); this.on(informer_1.UPDATE, cb); this.on(informer_1.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(informer_1.ADD, cb); this.off(informer_1.UPDATE, cb); this.off(informer_1.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; } } doneHandler(err) { return tslib_1.__awaiter(this, void 0, void 0, function* () { this._stop(); if (err) { this.callbackCache[informer_1.ERROR].forEach((elt) => elt(err)); return; } if (this.stopped) { // do not auto-restart return; } // 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 = yield 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); this.request = yield this.watch.watch(this.path, { resourceVersion: list.metadata.resourceVersion }, 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 /***/ }), /***/ 10032: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CloudAuth = void 0; const tslib_1 = __webpack_require__(75636); const proc = __webpack_require__(63129); const jsonpath = __webpack_require__(63269); class CloudAuth { isAuthProvider(user) { if (!user || !user.authProvider) { return false; } return user.authProvider.name === 'azure' || user.authProvider.name === 'gcp'; } applyAuthentication(user, opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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.CloudAuth = CloudAuth; //# sourceMappingURL=cloud_auth.js.map /***/ }), /***/ 14958: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findObject = exports.findHomeDir = exports.bufferFromFileOrString = exports.makeAbsolutePath = exports.Config = exports.KubeConfig = void 0; const tslib_1 = __webpack_require__(75636); const execa = __webpack_require__(55447); const fs = __webpack_require__(35747); const net = __webpack_require__(11631); const path = __webpack_require__(85622); const yaml = __webpack_require__(21917); const shelljs = __webpack_require__(33516); const api = __webpack_require__(56664); const cloud_auth_1 = __webpack_require__(10032); const config_types_1 = __webpack_require__(86218); const exec_auth_1 = __webpack_require__(18325); const file_auth_1 = __webpack_require__(38572); const oidc_auth_1 = __webpack_require__(41691); // 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); } applytoHTTPSOptions(opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const user = this.getCurrentUser(); yield this.applyOptions(opts); if (user && user.username) { opts.auth = `${user.username}:${user.password}`; } }); } applyToRequest(opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const cluster = this.getCurrentCluster(); const user = this.getCurrentUser(); yield 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.safeLoad(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}`, }, }, }, ]; this.contexts = [ { cluster: clusterName, name: contextName, user: userName, }, ]; 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')) { // TODO: Handle if someome set $KUBECONFIG in wsl here... try { const result = execa.sync('wsl.exe', ['cat', shelljs.homedir() + '/.kube/config']); if (result.code === 0) { this.loadFromString(result.std, 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; } } applyAuthorizationHeader(opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const user = this.getCurrentUser(); if (!user) { return; } const authenticator = KubeConfig.authenticators.find((elt) => { return elt.isAuthProvider(user); }); if (!opts.headers) { opts.headers = {}; } if (authenticator) { yield authenticator.applyAuthentication(user, opts); } if (user.token) { opts.headers.Authorization = `Bearer ${user.token}`; } }); } applyOptions(opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.applyHTTPSOptions(opts); yield this.applyAuthorizationHeader(opts); }); } } exports.KubeConfig = KubeConfig; KubeConfig.authenticators = [ new cloud_auth_1.CloudAuth(), 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'; 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 /***/ }), /***/ 86218: /***/ ((__unused_webpack_module, exports, __webpack_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 = __webpack_require__(35747); const _ = __webpack_require__(83571); 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 /***/ }), /***/ 54815: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Cp = void 0; const tslib_1 = __webpack_require__(75636); const fs = __webpack_require__(35747); const stream_buffers_1 = __webpack_require__(48168); const tar = __webpack_require__(74674); const tmp = __webpack_require__(68065); const exec_1 = __webpack_require__(62864); 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 */ cpFromPod(namespace, podName, containerName, srcPath, tgtPath) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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, () => tslib_1.__awaiter(this, void 0, void 0, function* () { if (errStream.size()) { throw new Error(`Error from cpFromPod - details: \n ${errStream.getContentsAsString()}`); } yield 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 */ cpToPod(namespace, podName, containerName, srcPath, tgtPath) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const tmpFile = tmp.fileSync(); const tmpFileName = tmpFile.name; const command = ['tar', 'xf', '-', '-C', tgtPath]; yield 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, () => tslib_1.__awaiter(this, void 0, void 0, function* () { if (errStream.size()) { throw new Error(`Error from cpToPod - details: \n ${errStream.getContentsAsString()}`); } })); }); } } exports.Cp = Cp; //# sourceMappingURL=cp.js.map /***/ }), /***/ 62864: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Exec = void 0; const tslib_1 = __webpack_require__(75636); const querystring = __webpack_require__(71191); const terminal_size_queue_1 = __webpack_require__(76023); const web_socket_handler_1 = __webpack_require__(47581); 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 */ exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = yield 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 /***/ }), /***/ 18325: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ExecAuth = void 0; const tslib_1 = __webpack_require__(75636); const execa = __webpack_require__(55447); 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)); } applyAuthentication(user, opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = Object.assign(Object.assign({}, opts), { env }); } const result = this.execFn(exec.command, exec.args, opts); if (result.code === 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 /***/ }), /***/ 38572: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.FileAuth = void 0; const tslib_1 = __webpack_require__(75636); const fs = __webpack_require__(35747); class FileAuth { constructor() { this.token = null; this.lastRead = null; } isAuthProvider(user) { return user.authProvider && user.authProvider.config && user.authProvider.config.tokenFile; } applyAuthentication(user, opts) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 37233: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(75636); // This is the entrypoint for the package tslib_1.__exportStar(__webpack_require__(25997), exports); tslib_1.__exportStar(__webpack_require__(15158), exports); //# sourceMappingURL=api.js.map /***/ }), /***/ 79893: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 69218: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readMutatingWebhookConfiguration(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readValidatingWebhookConfiguration(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 62794: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readMutatingWebhookConfiguration(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readValidatingWebhookConfiguration(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 67758: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 91294: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCustomResourceDefinition(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 7074: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCustomResourceDefinition(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 99722: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 99365: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readAPIService(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readAPIServiceStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 48244: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readAPIService(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readAPIServiceStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 25997: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.APIS = exports.HttpError = void 0; const tslib_1 = __webpack_require__(75636); tslib_1.__exportStar(__webpack_require__(79893), exports); const admissionregistrationApi_1 = __webpack_require__(79893); tslib_1.__exportStar(__webpack_require__(69218), exports); const admissionregistrationV1Api_1 = __webpack_require__(69218); tslib_1.__exportStar(__webpack_require__(62794), exports); const admissionregistrationV1beta1Api_1 = __webpack_require__(62794); tslib_1.__exportStar(__webpack_require__(67758), exports); const apiextensionsApi_1 = __webpack_require__(67758); tslib_1.__exportStar(__webpack_require__(91294), exports); const apiextensionsV1Api_1 = __webpack_require__(91294); tslib_1.__exportStar(__webpack_require__(7074), exports); const apiextensionsV1beta1Api_1 = __webpack_require__(7074); tslib_1.__exportStar(__webpack_require__(99722), exports); const apiregistrationApi_1 = __webpack_require__(99722); tslib_1.__exportStar(__webpack_require__(99365), exports); const apiregistrationV1Api_1 = __webpack_require__(99365); tslib_1.__exportStar(__webpack_require__(48244), exports); const apiregistrationV1beta1Api_1 = __webpack_require__(48244); tslib_1.__exportStar(__webpack_require__(59536), exports); const apisApi_1 = __webpack_require__(59536); tslib_1.__exportStar(__webpack_require__(99869), exports); const appsApi_1 = __webpack_require__(99869); tslib_1.__exportStar(__webpack_require__(10588), exports); const appsV1Api_1 = __webpack_require__(10588); tslib_1.__exportStar(__webpack_require__(61226), exports); const authenticationApi_1 = __webpack_require__(61226); tslib_1.__exportStar(__webpack_require__(17421), exports); const authenticationV1Api_1 = __webpack_require__(17421); tslib_1.__exportStar(__webpack_require__(53150), exports); const authenticationV1beta1Api_1 = __webpack_require__(53150); tslib_1.__exportStar(__webpack_require__(75154), exports); const authorizationApi_1 = __webpack_require__(75154); tslib_1.__exportStar(__webpack_require__(97999), exports); const authorizationV1Api_1 = __webpack_require__(97999); tslib_1.__exportStar(__webpack_require__(87078), exports); const authorizationV1beta1Api_1 = __webpack_require__(87078); tslib_1.__exportStar(__webpack_require__(94692), exports); const autoscalingApi_1 = __webpack_require__(94692); tslib_1.__exportStar(__webpack_require__(47098), exports); const autoscalingV1Api_1 = __webpack_require__(47098); tslib_1.__exportStar(__webpack_require__(15872), exports); const autoscalingV2beta1Api_1 = __webpack_require__(15872); tslib_1.__exportStar(__webpack_require__(76982), exports); const autoscalingV2beta2Api_1 = __webpack_require__(76982); tslib_1.__exportStar(__webpack_require__(91445), exports); const batchApi_1 = __webpack_require__(91445); tslib_1.__exportStar(__webpack_require__(78246), exports); const batchV1Api_1 = __webpack_require__(78246); tslib_1.__exportStar(__webpack_require__(71101), exports); const batchV1beta1Api_1 = __webpack_require__(71101); tslib_1.__exportStar(__webpack_require__(23668), exports); const batchV2alpha1Api_1 = __webpack_require__(23668); tslib_1.__exportStar(__webpack_require__(92076), exports); const certificatesApi_1 = __webpack_require__(92076); tslib_1.__exportStar(__webpack_require__(32593), exports); const certificatesV1Api_1 = __webpack_require__(32593); tslib_1.__exportStar(__webpack_require__(23732), exports); const certificatesV1beta1Api_1 = __webpack_require__(23732); tslib_1.__exportStar(__webpack_require__(69209), exports); const coordinationApi_1 = __webpack_require__(69209); tslib_1.__exportStar(__webpack_require__(52653), exports); const coordinationV1Api_1 = __webpack_require__(52653); tslib_1.__exportStar(__webpack_require__(82017), exports); const coordinationV1beta1Api_1 = __webpack_require__(82017); tslib_1.__exportStar(__webpack_require__(51489), exports); const coreApi_1 = __webpack_require__(51489); tslib_1.__exportStar(__webpack_require__(4738), exports); const coreV1Api_1 = __webpack_require__(4738); tslib_1.__exportStar(__webpack_require__(36522), exports); const customObjectsApi_1 = __webpack_require__(36522); tslib_1.__exportStar(__webpack_require__(44310), exports); const discoveryApi_1 = __webpack_require__(44310); tslib_1.__exportStar(__webpack_require__(10420), exports); const discoveryV1beta1Api_1 = __webpack_require__(10420); tslib_1.__exportStar(__webpack_require__(89829), exports); const eventsApi_1 = __webpack_require__(89829); tslib_1.__exportStar(__webpack_require__(15621), exports); const eventsV1Api_1 = __webpack_require__(15621); tslib_1.__exportStar(__webpack_require__(5821), exports); const eventsV1beta1Api_1 = __webpack_require__(5821); tslib_1.__exportStar(__webpack_require__(71817), exports); const extensionsApi_1 = __webpack_require__(71817); tslib_1.__exportStar(__webpack_require__(63382), exports); const extensionsV1beta1Api_1 = __webpack_require__(63382); tslib_1.__exportStar(__webpack_require__(16001), exports); const flowcontrolApiserverApi_1 = __webpack_require__(16001); tslib_1.__exportStar(__webpack_require__(95091), exports); const flowcontrolApiserverV1alpha1Api_1 = __webpack_require__(95091); tslib_1.__exportStar(__webpack_require__(58365), exports); const flowcontrolApiserverV1beta1Api_1 = __webpack_require__(58365); tslib_1.__exportStar(__webpack_require__(31857), exports); const internalApiserverApi_1 = __webpack_require__(31857); tslib_1.__exportStar(__webpack_require__(76012), exports); const internalApiserverV1alpha1Api_1 = __webpack_require__(76012); tslib_1.__exportStar(__webpack_require__(88382), exports); const logsApi_1 = __webpack_require__(88382); tslib_1.__exportStar(__webpack_require__(48169), exports); const networkingApi_1 = __webpack_require__(48169); tslib_1.__exportStar(__webpack_require__(97534), exports); const networkingV1Api_1 = __webpack_require__(97534); tslib_1.__exportStar(__webpack_require__(71097), exports); const networkingV1beta1Api_1 = __webpack_require__(71097); tslib_1.__exportStar(__webpack_require__(31466), exports); const nodeApi_1 = __webpack_require__(31466); tslib_1.__exportStar(__webpack_require__(9090), exports); const nodeV1Api_1 = __webpack_require__(9090); tslib_1.__exportStar(__webpack_require__(17374), exports); const nodeV1alpha1Api_1 = __webpack_require__(17374); tslib_1.__exportStar(__webpack_require__(78504), exports); const nodeV1beta1Api_1 = __webpack_require__(78504); tslib_1.__exportStar(__webpack_require__(5381), exports); const openidApi_1 = __webpack_require__(5381); tslib_1.__exportStar(__webpack_require__(37284), exports); const policyApi_1 = __webpack_require__(37284); tslib_1.__exportStar(__webpack_require__(80228), exports); const policyV1beta1Api_1 = __webpack_require__(80228); tslib_1.__exportStar(__webpack_require__(73316), exports); const rbacAuthorizationApi_1 = __webpack_require__(73316); tslib_1.__exportStar(__webpack_require__(93149), exports); const rbacAuthorizationV1Api_1 = __webpack_require__(93149); tslib_1.__exportStar(__webpack_require__(44056), exports); const rbacAuthorizationV1alpha1Api_1 = __webpack_require__(44056); tslib_1.__exportStar(__webpack_require__(81543), exports); const rbacAuthorizationV1beta1Api_1 = __webpack_require__(81543); tslib_1.__exportStar(__webpack_require__(29389), exports); const schedulingApi_1 = __webpack_require__(29389); tslib_1.__exportStar(__webpack_require__(26757), exports); const schedulingV1Api_1 = __webpack_require__(26757); tslib_1.__exportStar(__webpack_require__(91655), exports); const schedulingV1alpha1Api_1 = __webpack_require__(91655); tslib_1.__exportStar(__webpack_require__(49324), exports); const schedulingV1beta1Api_1 = __webpack_require__(49324); tslib_1.__exportStar(__webpack_require__(91143), exports); const storageApi_1 = __webpack_require__(91143); tslib_1.__exportStar(__webpack_require__(922), exports); const storageV1Api_1 = __webpack_require__(922); tslib_1.__exportStar(__webpack_require__(30769), exports); const storageV1alpha1Api_1 = __webpack_require__(30769); tslib_1.__exportStar(__webpack_require__(15325), exports); const storageV1beta1Api_1 = __webpack_require__(15325); tslib_1.__exportStar(__webpack_require__(4441), exports); const versionApi_1 = __webpack_require__(4441); tslib_1.__exportStar(__webpack_require__(19868), exports); const wellKnownApi_1 = __webpack_require__(19868); 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, batchV2alpha1Api_1.BatchV2alpha1Api, 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, discoveryV1beta1Api_1.DiscoveryV1beta1Api, eventsApi_1.EventsApi, eventsV1Api_1.EventsV1Api, eventsV1beta1Api_1.EventsV1beta1Api, extensionsApi_1.ExtensionsApi, extensionsV1beta1Api_1.ExtensionsV1beta1Api, flowcontrolApiserverApi_1.FlowcontrolApiserverApi, flowcontrolApiserverV1alpha1Api_1.FlowcontrolApiserverV1alpha1Api, 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, 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 /***/ }), /***/ 59536: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIVersions(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 99869: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 10588: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedDaemonSetStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedDeployment(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedDeploymentScale(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedDeploymentStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedReplicaSetScale(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedReplicaSetStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedStatefulSetScale(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedStatefulSetStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 61226: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 17421: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 53150: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 75154: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 97999: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 87078: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 94692: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 47098: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 15872: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 76982: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 91445: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 78246: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 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. */ createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 */ deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 */ deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedJob(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedJobStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 71101: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedCronJob(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 23668: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BatchV2alpha1Api = exports.BatchV2alpha1ApiApiKeys = void 0; const tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); let defaultBasePath = 'http://localhost'; // =============================================== // This file is autogenerated - Please do not edit // =============================================== var BatchV2alpha1ApiApiKeys; (function (BatchV2alpha1ApiApiKeys) { BatchV2alpha1ApiApiKeys[BatchV2alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(BatchV2alpha1ApiApiKeys = exports.BatchV2alpha1ApiApiKeys || (exports.BatchV2alpha1ApiApiKeys = {})); class BatchV2alpha1Api { 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[BatchV2alpha1ApiApiKeys[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. */ createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJob") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V2alpha1CronJob"); 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 */ deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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 */ deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this._defaultHeaders); const produces = ['application/json', 'application/yaml', 'application/vnd.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. */ listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJobList"); 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. */ listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJobList"); 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. */ patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJob"); 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. */ patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJob"); 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedCronJob(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "V2alpha1CronJob"); 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. */ readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJob"); 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. */ replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJob") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V2alpha1CronJob"); 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. */ replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/batch/v2alpha1/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, "V2alpha1CronJob") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V2alpha1CronJob"); 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.BatchV2alpha1Api = BatchV2alpha1Api; //# sourceMappingURL=batchV2alpha1Api.js.map /***/ }), /***/ 92076: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 32593: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCertificateSigningRequest(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 23732: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCertificateSigningRequest(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 69209: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 52653: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedLease(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 82017: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedLease(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 51489: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIVersions(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 4738: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ connectDeleteNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectDeleteNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectDeleteNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectDeleteNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ connectGetNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectGetNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectHeadNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectHeadNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectHeadNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectHeadNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectOptionsNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectOptionsNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectOptionsNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectOptionsNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPatchNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPatchNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPatchNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPatchNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ connectPostNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPostNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPutNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPutNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPutNodeProxy(name, path, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ connectPutNodeProxyWithPath(name, path, path2, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespace(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedBinding(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedService(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createPersistentVolume(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespace(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNodeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPersistentVolume(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readComponentStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespace(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespaceStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedConfigMap(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedEndpoints(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedEvent(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedLimitRange(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedPersistentVolumeClaim(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedPod(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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 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. */ readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedPodStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedPodTemplate(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedReplicationController(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedReplicationControllerScale(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedReplicationControllerStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedResourceQuota(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedResourceQuotaStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedSecret(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedService(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedServiceAccount(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedServiceStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNode(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNodeStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPersistentVolume(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readPersistentVolumeStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespace(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespaceFinalize(name, body, dryRun, fieldManager, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNodeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replacePersistentVolume(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 36522: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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). */ createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterCustomObject(group, version, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getClusterCustomObject(group, version, plural, name, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getClusterCustomObjectScale(group, version, plural, name, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getClusterCustomObjectStatus(group, version, plural, name, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getNamespacedCustomObject(group, version, namespace, plural, name, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterCustomObject(group, version, plural, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedCustomObject(group, version, namespace, plural, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 44310: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 10420: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedEndpointSlice(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 89829: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 15621: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedEvent(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 5821: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedEvent(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 71817: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 63382: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedIngress(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 16001: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 95091: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.FlowcontrolApiserverV1alpha1Api = exports.FlowcontrolApiserverV1alpha1ApiApiKeys = void 0; const tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); let defaultBasePath = 'http://localhost'; // =============================================== // This file is autogenerated - Please do not edit // =============================================== var FlowcontrolApiserverV1alpha1ApiApiKeys; (function (FlowcontrolApiserverV1alpha1ApiApiKeys) { FlowcontrolApiserverV1alpha1ApiApiKeys[FlowcontrolApiserverV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(FlowcontrolApiserverV1alpha1ApiApiKeys = exports.FlowcontrolApiserverV1alpha1ApiApiKeys || (exports.FlowcontrolApiserverV1alpha1ApiApiKeys = {})); class FlowcontrolApiserverV1alpha1Api { 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[FlowcontrolApiserverV1alpha1ApiApiKeys[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. */ createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchema") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V1alpha1FlowSchema"); 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. */ createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfiguration") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityLevelConfiguration"); 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 */ deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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 */ deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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 */ deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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 */ deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.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 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. */ listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchemaList"); 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. */ listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfigurationList"); 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. */ patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchema"); 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. */ patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchema"); 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. */ patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfiguration"); 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. */ patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfiguration"); 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readFlowSchema(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "V1alpha1FlowSchema"); 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. */ readFlowSchemaStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchema"); 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPriorityLevelConfiguration(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "V1alpha1PriorityLevelConfiguration"); 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. */ readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfiguration"); 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. */ replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchema") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V1alpha1FlowSchema"); 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. */ replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1FlowSchema") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V1alpha1FlowSchema"); 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. */ replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfiguration") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityLevelConfiguration"); 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. */ replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1alpha1/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, "V1alpha1PriorityLevelConfiguration") }; let authenticationPromise = Promise.resolve(); if (this.authentications.BearerToken.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityLevelConfiguration"); 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.FlowcontrolApiserverV1alpha1Api = FlowcontrolApiserverV1alpha1Api; //# sourceMappingURL=flowcontrolApiserverV1alpha1Api.js.map /***/ }), /***/ 58365: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readFlowSchema(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readFlowSchemaStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPriorityLevelConfiguration(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 31857: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 76012: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createStorageVersion(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchStorageVersion(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readStorageVersion(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readStorageVersionStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceStorageVersion(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 88382: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); /* tslint:disable:no-unused-locals */ const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ logFileHandler(logpath, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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)); } } }); }); }); }); } /** * */ logFileListHandler(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 48169: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 97534: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readIngressClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedIngress(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedNetworkPolicy(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 71097: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readIngressClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedIngress(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 31466: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 9090: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readRuntimeClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 17374: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readRuntimeClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 78504: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readRuntimeClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 5381: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); /* tslint:disable:no-unused-locals */ const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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) */ getServiceAccountIssuerOpenIDKeyset(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 37284: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 80228: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createPodSecurityPolicy(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionPodSecurityPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deletePodSecurityPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPodSecurityPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPodSecurityPolicy(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readNamespacedPodDisruptionBudget(name, namespace, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPodSecurityPolicy(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replacePodSecurityPolicy(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 73316: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 93149: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readClusterRole(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readClusterRoleBinding(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 44056: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readClusterRole(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readClusterRoleBinding(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 81543: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readClusterRole(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readClusterRoleBinding(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 29389: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 26757: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPriorityClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 91655: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPriorityClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 49324: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readPriorityClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 91143: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getAPIGroup(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 922: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCSIDriver(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCSINode(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readStorageClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readVolumeAttachment(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ readVolumeAttachmentStatus(name, pretty, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 30769: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 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. */ createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 */ deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 */ deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 VolumeAttachment * @param name name of the VolumeAttachment * @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 _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readVolumeAttachment(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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 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. */ replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 15325: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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. */ createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 */ deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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 */ deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 */ getAPIResources(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCSIDriver(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readCSINode(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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 StorageClass * @param name name of the StorageClass * @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 _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readStorageClass(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. * @param exact Should the export be exact. Exact export maintains cluster-specific fields like \'Namespace\'. Deprecated. Planned for removal in 1.18. * @param _export Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. */ readVolumeAttachment(name, pretty, exact, _export, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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"); } if (exact !== undefined) { localVarQueryParameters['exact'] = models_1.ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = models_1.ObjectSerializer.serialize(_export, "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, "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. */ replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 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. */ replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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. */ replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 4441: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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 */ getCode(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 19868: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 tslib_1 = __webpack_require__(75636); const localVarRequest = __webpack_require__(48699); /* tslint:disable:no-unused-locals */ const models_1 = __webpack_require__(15158); const models_2 = __webpack_require__(15158); const apis_1 = __webpack_require__(25997); 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\' */ getServiceAccountIssuerOpenIDConfiguration(options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 /***/ }), /***/ 21616: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7818: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96408: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90959: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 63536: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22775: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7588: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96116: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37492: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67098: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25429: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 42735: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 12368: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 70438: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 52191: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 1051: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 6933: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 73491: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 77652: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 30621: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 29393: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67169: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98849: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89144: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 11652: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 30613: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 43525: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.FlowcontrolV1alpha1Subject = 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 FlowcontrolV1alpha1Subject { static getAttributeTypeMap() { return FlowcontrolV1alpha1Subject.attributeTypeMap; } } exports.FlowcontrolV1alpha1Subject = FlowcontrolV1alpha1Subject; FlowcontrolV1alpha1Subject.discriminator = undefined; FlowcontrolV1alpha1Subject.attributeTypeMap = [ { "name": "group", "baseName": "group", "type": "V1alpha1GroupSubject" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "serviceAccount", "baseName": "serviceAccount", "type": "V1alpha1ServiceAccountSubject" }, { "name": "user", "baseName": "user", "type": "V1alpha1UserSubject" } ]; //# sourceMappingURL=flowcontrolV1alpha1Subject.js.map /***/ }), /***/ 88186: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 15158: /***/ ((__unused_webpack_module, exports, __webpack_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 = __webpack_require__(75636); tslib_1.__exportStar(__webpack_require__(21616), exports); tslib_1.__exportStar(__webpack_require__(7818), exports); tslib_1.__exportStar(__webpack_require__(96408), exports); tslib_1.__exportStar(__webpack_require__(90959), exports); tslib_1.__exportStar(__webpack_require__(63536), exports); tslib_1.__exportStar(__webpack_require__(22775), exports); tslib_1.__exportStar(__webpack_require__(7588), exports); tslib_1.__exportStar(__webpack_require__(96116), exports); tslib_1.__exportStar(__webpack_require__(37492), exports); tslib_1.__exportStar(__webpack_require__(67098), exports); tslib_1.__exportStar(__webpack_require__(25429), exports); tslib_1.__exportStar(__webpack_require__(42735), exports); tslib_1.__exportStar(__webpack_require__(12368), exports); tslib_1.__exportStar(__webpack_require__(70438), exports); tslib_1.__exportStar(__webpack_require__(52191), exports); tslib_1.__exportStar(__webpack_require__(1051), exports); tslib_1.__exportStar(__webpack_require__(6933), exports); tslib_1.__exportStar(__webpack_require__(73491), exports); tslib_1.__exportStar(__webpack_require__(77652), exports); tslib_1.__exportStar(__webpack_require__(30621), exports); tslib_1.__exportStar(__webpack_require__(29393), exports); tslib_1.__exportStar(__webpack_require__(67169), exports); tslib_1.__exportStar(__webpack_require__(98849), exports); tslib_1.__exportStar(__webpack_require__(89144), exports); tslib_1.__exportStar(__webpack_require__(11652), exports); tslib_1.__exportStar(__webpack_require__(30613), exports); tslib_1.__exportStar(__webpack_require__(43525), exports); tslib_1.__exportStar(__webpack_require__(88186), exports); tslib_1.__exportStar(__webpack_require__(27197), exports); tslib_1.__exportStar(__webpack_require__(41668), exports); tslib_1.__exportStar(__webpack_require__(64660), exports); tslib_1.__exportStar(__webpack_require__(36453), exports); tslib_1.__exportStar(__webpack_require__(95951), exports); tslib_1.__exportStar(__webpack_require__(4157), exports); tslib_1.__exportStar(__webpack_require__(61752), exports); tslib_1.__exportStar(__webpack_require__(50369), exports); tslib_1.__exportStar(__webpack_require__(13517), exports); tslib_1.__exportStar(__webpack_require__(19573), exports); tslib_1.__exportStar(__webpack_require__(99229), exports); tslib_1.__exportStar(__webpack_require__(25958), exports); tslib_1.__exportStar(__webpack_require__(44481), exports); tslib_1.__exportStar(__webpack_require__(52906), exports); tslib_1.__exportStar(__webpack_require__(89033), exports); tslib_1.__exportStar(__webpack_require__(5454), exports); tslib_1.__exportStar(__webpack_require__(99042), exports); tslib_1.__exportStar(__webpack_require__(58352), exports); tslib_1.__exportStar(__webpack_require__(87198), exports); tslib_1.__exportStar(__webpack_require__(61496), exports); tslib_1.__exportStar(__webpack_require__(17883), exports); tslib_1.__exportStar(__webpack_require__(93135), exports); tslib_1.__exportStar(__webpack_require__(39808), exports); tslib_1.__exportStar(__webpack_require__(61957), exports); tslib_1.__exportStar(__webpack_require__(90312), exports); tslib_1.__exportStar(__webpack_require__(97069), exports); tslib_1.__exportStar(__webpack_require__(91312), exports); tslib_1.__exportStar(__webpack_require__(23694), exports); tslib_1.__exportStar(__webpack_require__(95073), exports); tslib_1.__exportStar(__webpack_require__(48551), exports); tslib_1.__exportStar(__webpack_require__(68849), exports); tslib_1.__exportStar(__webpack_require__(34144), exports); tslib_1.__exportStar(__webpack_require__(84881), exports); tslib_1.__exportStar(__webpack_require__(11582), exports); tslib_1.__exportStar(__webpack_require__(74315), exports); tslib_1.__exportStar(__webpack_require__(90288), exports); tslib_1.__exportStar(__webpack_require__(24000), exports); tslib_1.__exportStar(__webpack_require__(93142), exports); tslib_1.__exportStar(__webpack_require__(98367), exports); tslib_1.__exportStar(__webpack_require__(87598), exports); tslib_1.__exportStar(__webpack_require__(82975), exports); tslib_1.__exportStar(__webpack_require__(14268), exports); tslib_1.__exportStar(__webpack_require__(84957), exports); tslib_1.__exportStar(__webpack_require__(99084), exports); tslib_1.__exportStar(__webpack_require__(92932), exports); tslib_1.__exportStar(__webpack_require__(31530), exports); tslib_1.__exportStar(__webpack_require__(37759), exports); tslib_1.__exportStar(__webpack_require__(38285), exports); tslib_1.__exportStar(__webpack_require__(41888), exports); tslib_1.__exportStar(__webpack_require__(19111), exports); tslib_1.__exportStar(__webpack_require__(33913), exports); tslib_1.__exportStar(__webpack_require__(61458), exports); tslib_1.__exportStar(__webpack_require__(32315), exports); tslib_1.__exportStar(__webpack_require__(21181), exports); tslib_1.__exportStar(__webpack_require__(95532), exports); tslib_1.__exportStar(__webpack_require__(30578), exports); tslib_1.__exportStar(__webpack_require__(2047), exports); tslib_1.__exportStar(__webpack_require__(38596), exports); tslib_1.__exportStar(__webpack_require__(34990), exports); tslib_1.__exportStar(__webpack_require__(42874), exports); tslib_1.__exportStar(__webpack_require__(99685), exports); tslib_1.__exportStar(__webpack_require__(62892), exports); tslib_1.__exportStar(__webpack_require__(80512), exports); tslib_1.__exportStar(__webpack_require__(56709), exports); tslib_1.__exportStar(__webpack_require__(61682), exports); tslib_1.__exportStar(__webpack_require__(59708), exports); tslib_1.__exportStar(__webpack_require__(52865), exports); tslib_1.__exportStar(__webpack_require__(13501), exports); tslib_1.__exportStar(__webpack_require__(50217), exports); tslib_1.__exportStar(__webpack_require__(83765), exports); tslib_1.__exportStar(__webpack_require__(89767), exports); tslib_1.__exportStar(__webpack_require__(27892), exports); tslib_1.__exportStar(__webpack_require__(19716), exports); tslib_1.__exportStar(__webpack_require__(35980), exports); tslib_1.__exportStar(__webpack_require__(78405), exports); tslib_1.__exportStar(__webpack_require__(66304), exports); tslib_1.__exportStar(__webpack_require__(34233), exports); tslib_1.__exportStar(__webpack_require__(94346), exports); tslib_1.__exportStar(__webpack_require__(9731), exports); tslib_1.__exportStar(__webpack_require__(40325), exports); tslib_1.__exportStar(__webpack_require__(32791), exports); tslib_1.__exportStar(__webpack_require__(10486), exports); tslib_1.__exportStar(__webpack_require__(69798), exports); tslib_1.__exportStar(__webpack_require__(20486), exports); tslib_1.__exportStar(__webpack_require__(25713), exports); tslib_1.__exportStar(__webpack_require__(82283), exports); tslib_1.__exportStar(__webpack_require__(98087), exports); tslib_1.__exportStar(__webpack_require__(94579), exports); tslib_1.__exportStar(__webpack_require__(25408), exports); tslib_1.__exportStar(__webpack_require__(37060), exports); tslib_1.__exportStar(__webpack_require__(32699), exports); tslib_1.__exportStar(__webpack_require__(77063), exports); tslib_1.__exportStar(__webpack_require__(173), exports); tslib_1.__exportStar(__webpack_require__(44560), exports); tslib_1.__exportStar(__webpack_require__(87510), exports); tslib_1.__exportStar(__webpack_require__(48451), exports); tslib_1.__exportStar(__webpack_require__(18029), exports); tslib_1.__exportStar(__webpack_require__(65310), exports); tslib_1.__exportStar(__webpack_require__(95602), exports); tslib_1.__exportStar(__webpack_require__(81364), exports); tslib_1.__exportStar(__webpack_require__(41298), exports); tslib_1.__exportStar(__webpack_require__(55398), exports); tslib_1.__exportStar(__webpack_require__(34981), exports); tslib_1.__exportStar(__webpack_require__(38099), exports); tslib_1.__exportStar(__webpack_require__(78901), exports); tslib_1.__exportStar(__webpack_require__(19493), exports); tslib_1.__exportStar(__webpack_require__(11672), exports); tslib_1.__exportStar(__webpack_require__(57151), exports); tslib_1.__exportStar(__webpack_require__(37917), exports); tslib_1.__exportStar(__webpack_require__(31925), exports); tslib_1.__exportStar(__webpack_require__(13449), exports); tslib_1.__exportStar(__webpack_require__(95223), exports); tslib_1.__exportStar(__webpack_require__(23074), exports); tslib_1.__exportStar(__webpack_require__(36874), exports); tslib_1.__exportStar(__webpack_require__(17205), exports); tslib_1.__exportStar(__webpack_require__(32671), exports); tslib_1.__exportStar(__webpack_require__(90017), exports); tslib_1.__exportStar(__webpack_require__(97764), exports); tslib_1.__exportStar(__webpack_require__(13313), exports); tslib_1.__exportStar(__webpack_require__(77213), exports); tslib_1.__exportStar(__webpack_require__(35093), exports); tslib_1.__exportStar(__webpack_require__(91874), exports); tslib_1.__exportStar(__webpack_require__(16690), exports); tslib_1.__exportStar(__webpack_require__(10414), exports); tslib_1.__exportStar(__webpack_require__(1016), exports); tslib_1.__exportStar(__webpack_require__(27584), exports); tslib_1.__exportStar(__webpack_require__(97617), exports); tslib_1.__exportStar(__webpack_require__(37426), exports); tslib_1.__exportStar(__webpack_require__(87855), exports); tslib_1.__exportStar(__webpack_require__(16636), exports); tslib_1.__exportStar(__webpack_require__(3437), exports); tslib_1.__exportStar(__webpack_require__(86769), exports); tslib_1.__exportStar(__webpack_require__(56219), exports); tslib_1.__exportStar(__webpack_require__(95179), exports); tslib_1.__exportStar(__webpack_require__(93652), exports); tslib_1.__exportStar(__webpack_require__(17024), exports); tslib_1.__exportStar(__webpack_require__(49823), exports); tslib_1.__exportStar(__webpack_require__(50910), exports); tslib_1.__exportStar(__webpack_require__(72796), exports); tslib_1.__exportStar(__webpack_require__(69225), exports); tslib_1.__exportStar(__webpack_require__(49202), exports); tslib_1.__exportStar(__webpack_require__(83570), exports); tslib_1.__exportStar(__webpack_require__(68021), exports); tslib_1.__exportStar(__webpack_require__(32492), exports); tslib_1.__exportStar(__webpack_require__(44340), exports); tslib_1.__exportStar(__webpack_require__(93865), exports); tslib_1.__exportStar(__webpack_require__(76125), exports); tslib_1.__exportStar(__webpack_require__(92069), exports); tslib_1.__exportStar(__webpack_require__(43693), exports); tslib_1.__exportStar(__webpack_require__(89541), exports); tslib_1.__exportStar(__webpack_require__(62476), exports); tslib_1.__exportStar(__webpack_require__(59689), exports); tslib_1.__exportStar(__webpack_require__(45830), exports); tslib_1.__exportStar(__webpack_require__(23037), exports); tslib_1.__exportStar(__webpack_require__(63580), exports); tslib_1.__exportStar(__webpack_require__(91260), exports); tslib_1.__exportStar(__webpack_require__(94069), exports); tslib_1.__exportStar(__webpack_require__(13366), exports); tslib_1.__exportStar(__webpack_require__(93114), exports); tslib_1.__exportStar(__webpack_require__(57345), exports); tslib_1.__exportStar(__webpack_require__(23549), exports); tslib_1.__exportStar(__webpack_require__(22567), exports); tslib_1.__exportStar(__webpack_require__(50993), exports); tslib_1.__exportStar(__webpack_require__(98844), exports); tslib_1.__exportStar(__webpack_require__(76838), exports); tslib_1.__exportStar(__webpack_require__(44603), exports); tslib_1.__exportStar(__webpack_require__(41500), exports); tslib_1.__exportStar(__webpack_require__(86280), exports); tslib_1.__exportStar(__webpack_require__(91128), exports); tslib_1.__exportStar(__webpack_require__(82578), exports); tslib_1.__exportStar(__webpack_require__(83039), exports); tslib_1.__exportStar(__webpack_require__(88593), exports); tslib_1.__exportStar(__webpack_require__(25667), exports); tslib_1.__exportStar(__webpack_require__(46630), exports); tslib_1.__exportStar(__webpack_require__(12229), exports); tslib_1.__exportStar(__webpack_require__(31674), exports); tslib_1.__exportStar(__webpack_require__(72729), exports); tslib_1.__exportStar(__webpack_require__(82187), exports); tslib_1.__exportStar(__webpack_require__(95354), exports); tslib_1.__exportStar(__webpack_require__(2006), exports); tslib_1.__exportStar(__webpack_require__(22665), exports); tslib_1.__exportStar(__webpack_require__(35432), exports); tslib_1.__exportStar(__webpack_require__(95469), exports); tslib_1.__exportStar(__webpack_require__(314), exports); tslib_1.__exportStar(__webpack_require__(22366), exports); tslib_1.__exportStar(__webpack_require__(49076), exports); tslib_1.__exportStar(__webpack_require__(8833), exports); tslib_1.__exportStar(__webpack_require__(47995), exports); tslib_1.__exportStar(__webpack_require__(60886), exports); tslib_1.__exportStar(__webpack_require__(89952), exports); tslib_1.__exportStar(__webpack_require__(74436), exports); tslib_1.__exportStar(__webpack_require__(22173), exports); tslib_1.__exportStar(__webpack_require__(71056), exports); tslib_1.__exportStar(__webpack_require__(63061), exports); tslib_1.__exportStar(__webpack_require__(3667), exports); tslib_1.__exportStar(__webpack_require__(84893), exports); tslib_1.__exportStar(__webpack_require__(10627), exports); tslib_1.__exportStar(__webpack_require__(11740), exports); tslib_1.__exportStar(__webpack_require__(4272), exports); tslib_1.__exportStar(__webpack_require__(10912), exports); tslib_1.__exportStar(__webpack_require__(24894), exports); tslib_1.__exportStar(__webpack_require__(42762), exports); tslib_1.__exportStar(__webpack_require__(32293), exports); tslib_1.__exportStar(__webpack_require__(85161), exports); tslib_1.__exportStar(__webpack_require__(51128), exports); tslib_1.__exportStar(__webpack_require__(41752), exports); tslib_1.__exportStar(__webpack_require__(21656), exports); tslib_1.__exportStar(__webpack_require__(33645), exports); tslib_1.__exportStar(__webpack_require__(70019), exports); tslib_1.__exportStar(__webpack_require__(99191), exports); tslib_1.__exportStar(__webpack_require__(86171), exports); tslib_1.__exportStar(__webpack_require__(44696), exports); tslib_1.__exportStar(__webpack_require__(19051), exports); tslib_1.__exportStar(__webpack_require__(90114), exports); tslib_1.__exportStar(__webpack_require__(7924), exports); tslib_1.__exportStar(__webpack_require__(25570), exports); tslib_1.__exportStar(__webpack_require__(89974), exports); tslib_1.__exportStar(__webpack_require__(32966), exports); tslib_1.__exportStar(__webpack_require__(78594), exports); tslib_1.__exportStar(__webpack_require__(99911), exports); tslib_1.__exportStar(__webpack_require__(42951), exports); tslib_1.__exportStar(__webpack_require__(92114), exports); tslib_1.__exportStar(__webpack_require__(69811), exports); tslib_1.__exportStar(__webpack_require__(86312), exports); tslib_1.__exportStar(__webpack_require__(86628), exports); tslib_1.__exportStar(__webpack_require__(19839), exports); tslib_1.__exportStar(__webpack_require__(51817), exports); tslib_1.__exportStar(__webpack_require__(99975), exports); tslib_1.__exportStar(__webpack_require__(509), exports); tslib_1.__exportStar(__webpack_require__(65970), exports); tslib_1.__exportStar(__webpack_require__(19574), exports); tslib_1.__exportStar(__webpack_require__(78045), exports); tslib_1.__exportStar(__webpack_require__(67831), exports); tslib_1.__exportStar(__webpack_require__(74548), exports); tslib_1.__exportStar(__webpack_require__(76774), exports); tslib_1.__exportStar(__webpack_require__(71948), exports); tslib_1.__exportStar(__webpack_require__(84135), exports); tslib_1.__exportStar(__webpack_require__(79850), exports); tslib_1.__exportStar(__webpack_require__(58881), exports); tslib_1.__exportStar(__webpack_require__(42892), exports); tslib_1.__exportStar(__webpack_require__(39894), exports); tslib_1.__exportStar(__webpack_require__(88279), exports); tslib_1.__exportStar(__webpack_require__(97621), exports); tslib_1.__exportStar(__webpack_require__(74625), exports); tslib_1.__exportStar(__webpack_require__(85571), exports); tslib_1.__exportStar(__webpack_require__(3317), exports); tslib_1.__exportStar(__webpack_require__(85751), exports); tslib_1.__exportStar(__webpack_require__(50837), exports); tslib_1.__exportStar(__webpack_require__(35698), exports); tslib_1.__exportStar(__webpack_require__(80966), exports); tslib_1.__exportStar(__webpack_require__(43933), exports); tslib_1.__exportStar(__webpack_require__(54662), exports); tslib_1.__exportStar(__webpack_require__(16954), exports); tslib_1.__exportStar(__webpack_require__(70634), exports); tslib_1.__exportStar(__webpack_require__(26573), exports); tslib_1.__exportStar(__webpack_require__(69009), exports); tslib_1.__exportStar(__webpack_require__(14870), exports); tslib_1.__exportStar(__webpack_require__(40475), exports); tslib_1.__exportStar(__webpack_require__(90975), exports); tslib_1.__exportStar(__webpack_require__(66859), exports); tslib_1.__exportStar(__webpack_require__(64888), exports); tslib_1.__exportStar(__webpack_require__(36376), exports); tslib_1.__exportStar(__webpack_require__(8350), exports); tslib_1.__exportStar(__webpack_require__(21782), exports); tslib_1.__exportStar(__webpack_require__(19870), exports); tslib_1.__exportStar(__webpack_require__(94221), exports); tslib_1.__exportStar(__webpack_require__(10936), exports); tslib_1.__exportStar(__webpack_require__(5827), exports); tslib_1.__exportStar(__webpack_require__(48994), exports); tslib_1.__exportStar(__webpack_require__(55397), exports); tslib_1.__exportStar(__webpack_require__(91686), exports); tslib_1.__exportStar(__webpack_require__(22421), exports); tslib_1.__exportStar(__webpack_require__(1581), exports); tslib_1.__exportStar(__webpack_require__(61114), exports); tslib_1.__exportStar(__webpack_require__(77568), exports); tslib_1.__exportStar(__webpack_require__(55014), exports); tslib_1.__exportStar(__webpack_require__(67214), exports); tslib_1.__exportStar(__webpack_require__(56149), exports); tslib_1.__exportStar(__webpack_require__(46136), exports); tslib_1.__exportStar(__webpack_require__(70215), exports); tslib_1.__exportStar(__webpack_require__(37088), exports); tslib_1.__exportStar(__webpack_require__(1824), exports); tslib_1.__exportStar(__webpack_require__(31828), exports); tslib_1.__exportStar(__webpack_require__(96736), exports); tslib_1.__exportStar(__webpack_require__(99411), exports); tslib_1.__exportStar(__webpack_require__(9764), exports); tslib_1.__exportStar(__webpack_require__(21058), exports); tslib_1.__exportStar(__webpack_require__(31382), exports); tslib_1.__exportStar(__webpack_require__(15895), exports); tslib_1.__exportStar(__webpack_require__(56891), exports); tslib_1.__exportStar(__webpack_require__(79991), exports); tslib_1.__exportStar(__webpack_require__(60711), exports); tslib_1.__exportStar(__webpack_require__(25888), exports); tslib_1.__exportStar(__webpack_require__(845), exports); tslib_1.__exportStar(__webpack_require__(49696), exports); tslib_1.__exportStar(__webpack_require__(7056), exports); tslib_1.__exportStar(__webpack_require__(3884), exports); tslib_1.__exportStar(__webpack_require__(4248), exports); tslib_1.__exportStar(__webpack_require__(39203), exports); tslib_1.__exportStar(__webpack_require__(33725), exports); tslib_1.__exportStar(__webpack_require__(19078), exports); tslib_1.__exportStar(__webpack_require__(98113), exports); tslib_1.__exportStar(__webpack_require__(15598), exports); tslib_1.__exportStar(__webpack_require__(39191), exports); tslib_1.__exportStar(__webpack_require__(84279), exports); tslib_1.__exportStar(__webpack_require__(56581), exports); tslib_1.__exportStar(__webpack_require__(30254), exports); tslib_1.__exportStar(__webpack_require__(87928), exports); tslib_1.__exportStar(__webpack_require__(9350), exports); tslib_1.__exportStar(__webpack_require__(38169), exports); tslib_1.__exportStar(__webpack_require__(18640), exports); tslib_1.__exportStar(__webpack_require__(25927), exports); tslib_1.__exportStar(__webpack_require__(26839), exports); tslib_1.__exportStar(__webpack_require__(46881), exports); tslib_1.__exportStar(__webpack_require__(96339), exports); tslib_1.__exportStar(__webpack_require__(62890), exports); tslib_1.__exportStar(__webpack_require__(69127), exports); tslib_1.__exportStar(__webpack_require__(76275), exports); tslib_1.__exportStar(__webpack_require__(49545), exports); tslib_1.__exportStar(__webpack_require__(9927), exports); tslib_1.__exportStar(__webpack_require__(18622), exports); tslib_1.__exportStar(__webpack_require__(95926), exports); tslib_1.__exportStar(__webpack_require__(48971), exports); tslib_1.__exportStar(__webpack_require__(31592), exports); tslib_1.__exportStar(__webpack_require__(83459), exports); tslib_1.__exportStar(__webpack_require__(9077), exports); tslib_1.__exportStar(__webpack_require__(70127), exports); tslib_1.__exportStar(__webpack_require__(53615), exports); tslib_1.__exportStar(__webpack_require__(14610), exports); tslib_1.__exportStar(__webpack_require__(60878), exports); tslib_1.__exportStar(__webpack_require__(1655), exports); tslib_1.__exportStar(__webpack_require__(87717), exports); tslib_1.__exportStar(__webpack_require__(34417), exports); tslib_1.__exportStar(__webpack_require__(62967), exports); tslib_1.__exportStar(__webpack_require__(41434), exports); tslib_1.__exportStar(__webpack_require__(55885), exports); tslib_1.__exportStar(__webpack_require__(20317), exports); tslib_1.__exportStar(__webpack_require__(65055), exports); tslib_1.__exportStar(__webpack_require__(46022), exports); tslib_1.__exportStar(__webpack_require__(38664), exports); tslib_1.__exportStar(__webpack_require__(93238), exports); tslib_1.__exportStar(__webpack_require__(6538), exports); tslib_1.__exportStar(__webpack_require__(94719), exports); tslib_1.__exportStar(__webpack_require__(26379), exports); tslib_1.__exportStar(__webpack_require__(14361), exports); tslib_1.__exportStar(__webpack_require__(86872), exports); tslib_1.__exportStar(__webpack_require__(89521), exports); tslib_1.__exportStar(__webpack_require__(6602), exports); tslib_1.__exportStar(__webpack_require__(75476), exports); tslib_1.__exportStar(__webpack_require__(67027), exports); tslib_1.__exportStar(__webpack_require__(98205), exports); tslib_1.__exportStar(__webpack_require__(3099), exports); tslib_1.__exportStar(__webpack_require__(61999), exports); tslib_1.__exportStar(__webpack_require__(96086), exports); tslib_1.__exportStar(__webpack_require__(50793), exports); tslib_1.__exportStar(__webpack_require__(81906), exports); tslib_1.__exportStar(__webpack_require__(92848), exports); tslib_1.__exportStar(__webpack_require__(69489), exports); tslib_1.__exportStar(__webpack_require__(12040), exports); tslib_1.__exportStar(__webpack_require__(67225), exports); tslib_1.__exportStar(__webpack_require__(6290), exports); tslib_1.__exportStar(__webpack_require__(33698), exports); tslib_1.__exportStar(__webpack_require__(3991), exports); tslib_1.__exportStar(__webpack_require__(59985), exports); tslib_1.__exportStar(__webpack_require__(52589), exports); tslib_1.__exportStar(__webpack_require__(67377), exports); tslib_1.__exportStar(__webpack_require__(5757), exports); tslib_1.__exportStar(__webpack_require__(49592), exports); tslib_1.__exportStar(__webpack_require__(35568), exports); tslib_1.__exportStar(__webpack_require__(5287), exports); tslib_1.__exportStar(__webpack_require__(33927), exports); tslib_1.__exportStar(__webpack_require__(65276), exports); tslib_1.__exportStar(__webpack_require__(83787), exports); tslib_1.__exportStar(__webpack_require__(90989), exports); tslib_1.__exportStar(__webpack_require__(80263), exports); tslib_1.__exportStar(__webpack_require__(70914), exports); tslib_1.__exportStar(__webpack_require__(85050), exports); tslib_1.__exportStar(__webpack_require__(43969), exports); tslib_1.__exportStar(__webpack_require__(31462), exports); tslib_1.__exportStar(__webpack_require__(65), exports); tslib_1.__exportStar(__webpack_require__(50767), exports); tslib_1.__exportStar(__webpack_require__(77238), exports); tslib_1.__exportStar(__webpack_require__(52888), exports); tslib_1.__exportStar(__webpack_require__(44901), exports); tslib_1.__exportStar(__webpack_require__(8070), exports); tslib_1.__exportStar(__webpack_require__(61014), exports); tslib_1.__exportStar(__webpack_require__(15062), exports); tslib_1.__exportStar(__webpack_require__(89642), exports); tslib_1.__exportStar(__webpack_require__(15220), exports); tslib_1.__exportStar(__webpack_require__(10932), exports); tslib_1.__exportStar(__webpack_require__(73101), exports); tslib_1.__exportStar(__webpack_require__(78760), exports); tslib_1.__exportStar(__webpack_require__(3464), exports); tslib_1.__exportStar(__webpack_require__(47008), exports); tslib_1.__exportStar(__webpack_require__(1850), exports); tslib_1.__exportStar(__webpack_require__(62558), exports); tslib_1.__exportStar(__webpack_require__(49471), exports); tslib_1.__exportStar(__webpack_require__(45910), exports); tslib_1.__exportStar(__webpack_require__(32036), exports); tslib_1.__exportStar(__webpack_require__(53079), exports); tslib_1.__exportStar(__webpack_require__(39479), exports); tslib_1.__exportStar(__webpack_require__(56871), exports); tslib_1.__exportStar(__webpack_require__(66602), exports); tslib_1.__exportStar(__webpack_require__(41934), exports); tslib_1.__exportStar(__webpack_require__(3593), exports); tslib_1.__exportStar(__webpack_require__(12511), exports); tslib_1.__exportStar(__webpack_require__(47647), exports); tslib_1.__exportStar(__webpack_require__(23984), exports); tslib_1.__exportStar(__webpack_require__(54349), exports); tslib_1.__exportStar(__webpack_require__(20058), exports); tslib_1.__exportStar(__webpack_require__(53792), exports); tslib_1.__exportStar(__webpack_require__(20970), exports); tslib_1.__exportStar(__webpack_require__(88064), exports); tslib_1.__exportStar(__webpack_require__(88392), exports); tslib_1.__exportStar(__webpack_require__(49929), exports); tslib_1.__exportStar(__webpack_require__(23402), exports); tslib_1.__exportStar(__webpack_require__(49584), exports); tslib_1.__exportStar(__webpack_require__(94030), exports); tslib_1.__exportStar(__webpack_require__(39991), exports); tslib_1.__exportStar(__webpack_require__(48676), exports); tslib_1.__exportStar(__webpack_require__(53943), exports); tslib_1.__exportStar(__webpack_require__(44271), exports); tslib_1.__exportStar(__webpack_require__(99792), exports); tslib_1.__exportStar(__webpack_require__(43425), exports); tslib_1.__exportStar(__webpack_require__(7806), exports); tslib_1.__exportStar(__webpack_require__(7724), exports); tslib_1.__exportStar(__webpack_require__(66666), exports); tslib_1.__exportStar(__webpack_require__(29863), exports); tslib_1.__exportStar(__webpack_require__(23519), exports); tslib_1.__exportStar(__webpack_require__(68738), exports); tslib_1.__exportStar(__webpack_require__(24519), exports); tslib_1.__exportStar(__webpack_require__(92663), exports); tslib_1.__exportStar(__webpack_require__(37328), exports); tslib_1.__exportStar(__webpack_require__(16242), exports); tslib_1.__exportStar(__webpack_require__(25978), exports); tslib_1.__exportStar(__webpack_require__(16589), exports); tslib_1.__exportStar(__webpack_require__(91864), exports); tslib_1.__exportStar(__webpack_require__(97720), exports); tslib_1.__exportStar(__webpack_require__(52843), exports); tslib_1.__exportStar(__webpack_require__(63675), exports); tslib_1.__exportStar(__webpack_require__(34506), exports); tslib_1.__exportStar(__webpack_require__(72413), exports); tslib_1.__exportStar(__webpack_require__(58847), exports); tslib_1.__exportStar(__webpack_require__(38268), exports); tslib_1.__exportStar(__webpack_require__(21270), exports); tslib_1.__exportStar(__webpack_require__(9165), exports); tslib_1.__exportStar(__webpack_require__(64672), exports); tslib_1.__exportStar(__webpack_require__(60049), exports); tslib_1.__exportStar(__webpack_require__(15358), exports); tslib_1.__exportStar(__webpack_require__(9944), exports); tslib_1.__exportStar(__webpack_require__(18555), exports); tslib_1.__exportStar(__webpack_require__(49145), exports); tslib_1.__exportStar(__webpack_require__(87178), exports); tslib_1.__exportStar(__webpack_require__(86145), exports); tslib_1.__exportStar(__webpack_require__(52618), exports); tslib_1.__exportStar(__webpack_require__(18241), exports); tslib_1.__exportStar(__webpack_require__(67694), exports); tslib_1.__exportStar(__webpack_require__(41365), exports); tslib_1.__exportStar(__webpack_require__(13153), exports); tslib_1.__exportStar(__webpack_require__(27347), exports); tslib_1.__exportStar(__webpack_require__(61730), exports); tslib_1.__exportStar(__webpack_require__(37085), exports); tslib_1.__exportStar(__webpack_require__(7423), exports); tslib_1.__exportStar(__webpack_require__(34706), exports); tslib_1.__exportStar(__webpack_require__(98830), exports); tslib_1.__exportStar(__webpack_require__(93967), exports); tslib_1.__exportStar(__webpack_require__(64484), exports); tslib_1.__exportStar(__webpack_require__(63533), exports); tslib_1.__exportStar(__webpack_require__(96254), exports); tslib_1.__exportStar(__webpack_require__(1040), exports); tslib_1.__exportStar(__webpack_require__(57091), exports); tslib_1.__exportStar(__webpack_require__(98441), exports); tslib_1.__exportStar(__webpack_require__(30089), exports); tslib_1.__exportStar(__webpack_require__(43801), exports); tslib_1.__exportStar(__webpack_require__(58382), exports); tslib_1.__exportStar(__webpack_require__(84478), exports); tslib_1.__exportStar(__webpack_require__(8076), exports); tslib_1.__exportStar(__webpack_require__(51807), exports); tslib_1.__exportStar(__webpack_require__(59514), exports); tslib_1.__exportStar(__webpack_require__(96831), exports); tslib_1.__exportStar(__webpack_require__(41330), exports); tslib_1.__exportStar(__webpack_require__(98895), exports); tslib_1.__exportStar(__webpack_require__(95359), exports); tslib_1.__exportStar(__webpack_require__(24695), exports); tslib_1.__exportStar(__webpack_require__(75855), exports); tslib_1.__exportStar(__webpack_require__(56981), exports); tslib_1.__exportStar(__webpack_require__(55914), exports); tslib_1.__exportStar(__webpack_require__(14010), exports); tslib_1.__exportStar(__webpack_require__(8326), exports); tslib_1.__exportStar(__webpack_require__(40541), exports); tslib_1.__exportStar(__webpack_require__(59918), exports); tslib_1.__exportStar(__webpack_require__(74749), exports); tslib_1.__exportStar(__webpack_require__(66991), exports); tslib_1.__exportStar(__webpack_require__(4046), exports); tslib_1.__exportStar(__webpack_require__(14255), exports); tslib_1.__exportStar(__webpack_require__(81655), exports); tslib_1.__exportStar(__webpack_require__(83111), exports); tslib_1.__exportStar(__webpack_require__(34396), exports); tslib_1.__exportStar(__webpack_require__(43485), exports); tslib_1.__exportStar(__webpack_require__(63931), exports); tslib_1.__exportStar(__webpack_require__(23257), exports); tslib_1.__exportStar(__webpack_require__(84404), exports); tslib_1.__exportStar(__webpack_require__(44289), exports); tslib_1.__exportStar(__webpack_require__(90147), exports); tslib_1.__exportStar(__webpack_require__(72683), exports); tslib_1.__exportStar(__webpack_require__(2177), exports); tslib_1.__exportStar(__webpack_require__(75714), exports); tslib_1.__exportStar(__webpack_require__(59684), exports); tslib_1.__exportStar(__webpack_require__(26149), exports); tslib_1.__exportStar(__webpack_require__(67813), exports); tslib_1.__exportStar(__webpack_require__(60270), exports); tslib_1.__exportStar(__webpack_require__(90435), exports); tslib_1.__exportStar(__webpack_require__(42319), exports); tslib_1.__exportStar(__webpack_require__(10530), exports); tslib_1.__exportStar(__webpack_require__(22546), exports); tslib_1.__exportStar(__webpack_require__(62252), exports); tslib_1.__exportStar(__webpack_require__(76021), exports); tslib_1.__exportStar(__webpack_require__(5461), exports); tslib_1.__exportStar(__webpack_require__(28787), exports); tslib_1.__exportStar(__webpack_require__(51959), exports); tslib_1.__exportStar(__webpack_require__(71667), exports); tslib_1.__exportStar(__webpack_require__(96916), exports); tslib_1.__exportStar(__webpack_require__(2230), exports); tslib_1.__exportStar(__webpack_require__(74299), exports); tslib_1.__exportStar(__webpack_require__(87497), exports); tslib_1.__exportStar(__webpack_require__(65831), exports); tslib_1.__exportStar(__webpack_require__(31079), exports); tslib_1.__exportStar(__webpack_require__(75281), exports); tslib_1.__exportStar(__webpack_require__(8109), exports); tslib_1.__exportStar(__webpack_require__(50769), exports); tslib_1.__exportStar(__webpack_require__(49098), exports); tslib_1.__exportStar(__webpack_require__(34651), exports); tslib_1.__exportStar(__webpack_require__(35033), exports); tslib_1.__exportStar(__webpack_require__(90080), exports); tslib_1.__exportStar(__webpack_require__(13129), exports); tslib_1.__exportStar(__webpack_require__(14474), exports); tslib_1.__exportStar(__webpack_require__(473), exports); tslib_1.__exportStar(__webpack_require__(88465), exports); tslib_1.__exportStar(__webpack_require__(2146), exports); tslib_1.__exportStar(__webpack_require__(88931), exports); tslib_1.__exportStar(__webpack_require__(46198), exports); tslib_1.__exportStar(__webpack_require__(95797), exports); tslib_1.__exportStar(__webpack_require__(31397), exports); tslib_1.__exportStar(__webpack_require__(12802), exports); tslib_1.__exportStar(__webpack_require__(61521), exports); tslib_1.__exportStar(__webpack_require__(15956), exports); tslib_1.__exportStar(__webpack_require__(54910), exports); tslib_1.__exportStar(__webpack_require__(10285), exports); tslib_1.__exportStar(__webpack_require__(53523), exports); tslib_1.__exportStar(__webpack_require__(11202), exports); tslib_1.__exportStar(__webpack_require__(39491), exports); tslib_1.__exportStar(__webpack_require__(20812), exports); tslib_1.__exportStar(__webpack_require__(18685), exports); tslib_1.__exportStar(__webpack_require__(72711), exports); tslib_1.__exportStar(__webpack_require__(72167), exports); tslib_1.__exportStar(__webpack_require__(55473), exports); tslib_1.__exportStar(__webpack_require__(53805), exports); tslib_1.__exportStar(__webpack_require__(94350), exports); tslib_1.__exportStar(__webpack_require__(53849), exports); tslib_1.__exportStar(__webpack_require__(71688), exports); tslib_1.__exportStar(__webpack_require__(5710), exports); tslib_1.__exportStar(__webpack_require__(98026), exports); tslib_1.__exportStar(__webpack_require__(41784), exports); tslib_1.__exportStar(__webpack_require__(2411), exports); tslib_1.__exportStar(__webpack_require__(3849), exports); tslib_1.__exportStar(__webpack_require__(37196), exports); tslib_1.__exportStar(__webpack_require__(27287), exports); tslib_1.__exportStar(__webpack_require__(79262), exports); tslib_1.__exportStar(__webpack_require__(43128), exports); tslib_1.__exportStar(__webpack_require__(96606), exports); tslib_1.__exportStar(__webpack_require__(74687), exports); tslib_1.__exportStar(__webpack_require__(89728), exports); tslib_1.__exportStar(__webpack_require__(89151), exports); tslib_1.__exportStar(__webpack_require__(8786), exports); tslib_1.__exportStar(__webpack_require__(66258), exports); tslib_1.__exportStar(__webpack_require__(98064), exports); tslib_1.__exportStar(__webpack_require__(25083), exports); tslib_1.__exportStar(__webpack_require__(30639), exports); tslib_1.__exportStar(__webpack_require__(5950), exports); tslib_1.__exportStar(__webpack_require__(18291), exports); tslib_1.__exportStar(__webpack_require__(83162), exports); tslib_1.__exportStar(__webpack_require__(10150), exports); tslib_1.__exportStar(__webpack_require__(29521), exports); tslib_1.__exportStar(__webpack_require__(53209), exports); tslib_1.__exportStar(__webpack_require__(69602), exports); tslib_1.__exportStar(__webpack_require__(85029), exports); tslib_1.__exportStar(__webpack_require__(75145), exports); tslib_1.__exportStar(__webpack_require__(12390), exports); tslib_1.__exportStar(__webpack_require__(34096), exports); tslib_1.__exportStar(__webpack_require__(33665), exports); tslib_1.__exportStar(__webpack_require__(96952), exports); tslib_1.__exportStar(__webpack_require__(41473), exports); tslib_1.__exportStar(__webpack_require__(67231), exports); tslib_1.__exportStar(__webpack_require__(29409), exports); tslib_1.__exportStar(__webpack_require__(17298), exports); tslib_1.__exportStar(__webpack_require__(60715), exports); tslib_1.__exportStar(__webpack_require__(73280), exports); tslib_1.__exportStar(__webpack_require__(54941), exports); tslib_1.__exportStar(__webpack_require__(5415), exports); tslib_1.__exportStar(__webpack_require__(17383), exports); tslib_1.__exportStar(__webpack_require__(61416), exports); tslib_1.__exportStar(__webpack_require__(56126), exports); tslib_1.__exportStar(__webpack_require__(60958), exports); tslib_1.__exportStar(__webpack_require__(46865), exports); tslib_1.__exportStar(__webpack_require__(78411), exports); tslib_1.__exportStar(__webpack_require__(23137), exports); tslib_1.__exportStar(__webpack_require__(849), exports); tslib_1.__exportStar(__webpack_require__(17451), exports); const admissionregistrationV1ServiceReference_1 = __webpack_require__(21616); const admissionregistrationV1WebhookClientConfig_1 = __webpack_require__(7818); const admissionregistrationV1beta1ServiceReference_1 = __webpack_require__(96408); const admissionregistrationV1beta1WebhookClientConfig_1 = __webpack_require__(90959); const apiextensionsV1ServiceReference_1 = __webpack_require__(63536); const apiextensionsV1WebhookClientConfig_1 = __webpack_require__(22775); const apiextensionsV1beta1ServiceReference_1 = __webpack_require__(7588); const apiextensionsV1beta1WebhookClientConfig_1 = __webpack_require__(96116); const apiregistrationV1ServiceReference_1 = __webpack_require__(37492); const apiregistrationV1beta1ServiceReference_1 = __webpack_require__(67098); const authenticationV1TokenRequest_1 = __webpack_require__(25429); const coreV1Event_1 = __webpack_require__(42735); const coreV1EventList_1 = __webpack_require__(12368); const coreV1EventSeries_1 = __webpack_require__(70438); const eventsV1Event_1 = __webpack_require__(52191); const eventsV1EventList_1 = __webpack_require__(1051); const eventsV1EventSeries_1 = __webpack_require__(6933); const extensionsV1beta1HTTPIngressPath_1 = __webpack_require__(73491); const extensionsV1beta1HTTPIngressRuleValue_1 = __webpack_require__(77652); const extensionsV1beta1Ingress_1 = __webpack_require__(30621); const extensionsV1beta1IngressBackend_1 = __webpack_require__(29393); const extensionsV1beta1IngressList_1 = __webpack_require__(67169); const extensionsV1beta1IngressRule_1 = __webpack_require__(98849); const extensionsV1beta1IngressSpec_1 = __webpack_require__(89144); const extensionsV1beta1IngressStatus_1 = __webpack_require__(11652); const extensionsV1beta1IngressTLS_1 = __webpack_require__(30613); const flowcontrolV1alpha1Subject_1 = __webpack_require__(43525); const flowcontrolV1beta1Subject_1 = __webpack_require__(88186); const networkingV1beta1HTTPIngressPath_1 = __webpack_require__(27197); const networkingV1beta1HTTPIngressRuleValue_1 = __webpack_require__(41668); const networkingV1beta1Ingress_1 = __webpack_require__(64660); const networkingV1beta1IngressBackend_1 = __webpack_require__(36453); const networkingV1beta1IngressList_1 = __webpack_require__(95951); const networkingV1beta1IngressRule_1 = __webpack_require__(4157); const networkingV1beta1IngressSpec_1 = __webpack_require__(61752); const networkingV1beta1IngressStatus_1 = __webpack_require__(50369); const networkingV1beta1IngressTLS_1 = __webpack_require__(13517); const rbacV1alpha1Subject_1 = __webpack_require__(19573); const rbacV1beta1Subject_1 = __webpack_require__(99229); const storageV1TokenRequest_1 = __webpack_require__(25958); const v1APIGroup_1 = __webpack_require__(44481); const v1APIGroupList_1 = __webpack_require__(52906); const v1APIResource_1 = __webpack_require__(89033); const v1APIResourceList_1 = __webpack_require__(5454); const v1APIService_1 = __webpack_require__(99042); const v1APIServiceCondition_1 = __webpack_require__(58352); const v1APIServiceList_1 = __webpack_require__(87198); const v1APIServiceSpec_1 = __webpack_require__(61496); const v1APIServiceStatus_1 = __webpack_require__(17883); const v1APIVersions_1 = __webpack_require__(93135); const v1AWSElasticBlockStoreVolumeSource_1 = __webpack_require__(39808); const v1Affinity_1 = __webpack_require__(61957); const v1AggregationRule_1 = __webpack_require__(90312); const v1AttachedVolume_1 = __webpack_require__(97069); const v1AzureDiskVolumeSource_1 = __webpack_require__(91312); const v1AzureFilePersistentVolumeSource_1 = __webpack_require__(23694); const v1AzureFileVolumeSource_1 = __webpack_require__(95073); const v1Binding_1 = __webpack_require__(48551); const v1BoundObjectReference_1 = __webpack_require__(68849); const v1CSIDriver_1 = __webpack_require__(34144); const v1CSIDriverList_1 = __webpack_require__(84881); const v1CSIDriverSpec_1 = __webpack_require__(11582); const v1CSINode_1 = __webpack_require__(74315); const v1CSINodeDriver_1 = __webpack_require__(90288); const v1CSINodeList_1 = __webpack_require__(24000); const v1CSINodeSpec_1 = __webpack_require__(93142); const v1CSIPersistentVolumeSource_1 = __webpack_require__(98367); const v1CSIVolumeSource_1 = __webpack_require__(87598); const v1Capabilities_1 = __webpack_require__(82975); const v1CephFSPersistentVolumeSource_1 = __webpack_require__(14268); const v1CephFSVolumeSource_1 = __webpack_require__(84957); const v1CertificateSigningRequest_1 = __webpack_require__(99084); const v1CertificateSigningRequestCondition_1 = __webpack_require__(92932); const v1CertificateSigningRequestList_1 = __webpack_require__(31530); const v1CertificateSigningRequestSpec_1 = __webpack_require__(37759); const v1CertificateSigningRequestStatus_1 = __webpack_require__(38285); const v1CinderPersistentVolumeSource_1 = __webpack_require__(41888); const v1CinderVolumeSource_1 = __webpack_require__(19111); const v1ClientIPConfig_1 = __webpack_require__(33913); const v1ClusterRole_1 = __webpack_require__(61458); const v1ClusterRoleBinding_1 = __webpack_require__(32315); const v1ClusterRoleBindingList_1 = __webpack_require__(21181); const v1ClusterRoleList_1 = __webpack_require__(95532); const v1ComponentCondition_1 = __webpack_require__(30578); const v1ComponentStatus_1 = __webpack_require__(2047); const v1ComponentStatusList_1 = __webpack_require__(38596); const v1Condition_1 = __webpack_require__(34990); const v1ConfigMap_1 = __webpack_require__(42874); const v1ConfigMapEnvSource_1 = __webpack_require__(99685); const v1ConfigMapKeySelector_1 = __webpack_require__(62892); const v1ConfigMapList_1 = __webpack_require__(80512); const v1ConfigMapNodeConfigSource_1 = __webpack_require__(56709); const v1ConfigMapProjection_1 = __webpack_require__(61682); const v1ConfigMapVolumeSource_1 = __webpack_require__(59708); const v1Container_1 = __webpack_require__(52865); const v1ContainerImage_1 = __webpack_require__(13501); const v1ContainerPort_1 = __webpack_require__(50217); const v1ContainerState_1 = __webpack_require__(83765); const v1ContainerStateRunning_1 = __webpack_require__(89767); const v1ContainerStateTerminated_1 = __webpack_require__(27892); const v1ContainerStateWaiting_1 = __webpack_require__(19716); const v1ContainerStatus_1 = __webpack_require__(35980); const v1ControllerRevision_1 = __webpack_require__(78405); const v1ControllerRevisionList_1 = __webpack_require__(66304); const v1CrossVersionObjectReference_1 = __webpack_require__(34233); const v1CustomResourceColumnDefinition_1 = __webpack_require__(94346); const v1CustomResourceConversion_1 = __webpack_require__(9731); const v1CustomResourceDefinition_1 = __webpack_require__(40325); const v1CustomResourceDefinitionCondition_1 = __webpack_require__(32791); const v1CustomResourceDefinitionList_1 = __webpack_require__(10486); const v1CustomResourceDefinitionNames_1 = __webpack_require__(69798); const v1CustomResourceDefinitionSpec_1 = __webpack_require__(20486); const v1CustomResourceDefinitionStatus_1 = __webpack_require__(25713); const v1CustomResourceDefinitionVersion_1 = __webpack_require__(82283); const v1CustomResourceSubresourceScale_1 = __webpack_require__(98087); const v1CustomResourceSubresources_1 = __webpack_require__(94579); const v1CustomResourceValidation_1 = __webpack_require__(25408); const v1DaemonEndpoint_1 = __webpack_require__(37060); const v1DaemonSet_1 = __webpack_require__(32699); const v1DaemonSetCondition_1 = __webpack_require__(77063); const v1DaemonSetList_1 = __webpack_require__(173); const v1DaemonSetSpec_1 = __webpack_require__(44560); const v1DaemonSetStatus_1 = __webpack_require__(87510); const v1DaemonSetUpdateStrategy_1 = __webpack_require__(48451); const v1DeleteOptions_1 = __webpack_require__(18029); const v1Deployment_1 = __webpack_require__(65310); const v1DeploymentCondition_1 = __webpack_require__(95602); const v1DeploymentList_1 = __webpack_require__(81364); const v1DeploymentSpec_1 = __webpack_require__(41298); const v1DeploymentStatus_1 = __webpack_require__(55398); const v1DeploymentStrategy_1 = __webpack_require__(34981); const v1DownwardAPIProjection_1 = __webpack_require__(38099); const v1DownwardAPIVolumeFile_1 = __webpack_require__(78901); const v1DownwardAPIVolumeSource_1 = __webpack_require__(19493); const v1EmptyDirVolumeSource_1 = __webpack_require__(11672); const v1EndpointAddress_1 = __webpack_require__(57151); const v1EndpointPort_1 = __webpack_require__(37917); const v1EndpointSubset_1 = __webpack_require__(31925); const v1Endpoints_1 = __webpack_require__(13449); const v1EndpointsList_1 = __webpack_require__(95223); const v1EnvFromSource_1 = __webpack_require__(23074); const v1EnvVar_1 = __webpack_require__(36874); const v1EnvVarSource_1 = __webpack_require__(17205); const v1EphemeralContainer_1 = __webpack_require__(32671); const v1EphemeralVolumeSource_1 = __webpack_require__(90017); const v1EventSource_1 = __webpack_require__(97764); const v1ExecAction_1 = __webpack_require__(13313); const v1ExternalDocumentation_1 = __webpack_require__(77213); const v1FCVolumeSource_1 = __webpack_require__(35093); const v1FlexPersistentVolumeSource_1 = __webpack_require__(91874); const v1FlexVolumeSource_1 = __webpack_require__(16690); const v1FlockerVolumeSource_1 = __webpack_require__(10414); const v1GCEPersistentDiskVolumeSource_1 = __webpack_require__(1016); const v1GitRepoVolumeSource_1 = __webpack_require__(27584); const v1GlusterfsPersistentVolumeSource_1 = __webpack_require__(97617); const v1GlusterfsVolumeSource_1 = __webpack_require__(37426); const v1GroupVersionForDiscovery_1 = __webpack_require__(87855); const v1HTTPGetAction_1 = __webpack_require__(16636); const v1HTTPHeader_1 = __webpack_require__(3437); const v1HTTPIngressPath_1 = __webpack_require__(86769); const v1HTTPIngressRuleValue_1 = __webpack_require__(56219); const v1Handler_1 = __webpack_require__(95179); const v1HorizontalPodAutoscaler_1 = __webpack_require__(93652); const v1HorizontalPodAutoscalerList_1 = __webpack_require__(17024); const v1HorizontalPodAutoscalerSpec_1 = __webpack_require__(49823); const v1HorizontalPodAutoscalerStatus_1 = __webpack_require__(50910); const v1HostAlias_1 = __webpack_require__(72796); const v1HostPathVolumeSource_1 = __webpack_require__(69225); const v1IPBlock_1 = __webpack_require__(49202); const v1ISCSIPersistentVolumeSource_1 = __webpack_require__(83570); const v1ISCSIVolumeSource_1 = __webpack_require__(68021); const v1Ingress_1 = __webpack_require__(32492); const v1IngressBackend_1 = __webpack_require__(44340); const v1IngressClass_1 = __webpack_require__(93865); const v1IngressClassList_1 = __webpack_require__(76125); const v1IngressClassSpec_1 = __webpack_require__(92069); const v1IngressList_1 = __webpack_require__(43693); const v1IngressRule_1 = __webpack_require__(89541); const v1IngressServiceBackend_1 = __webpack_require__(62476); const v1IngressSpec_1 = __webpack_require__(59689); const v1IngressStatus_1 = __webpack_require__(45830); const v1IngressTLS_1 = __webpack_require__(23037); const v1JSONSchemaProps_1 = __webpack_require__(63580); const v1Job_1 = __webpack_require__(91260); const v1JobCondition_1 = __webpack_require__(94069); const v1JobList_1 = __webpack_require__(13366); const v1JobSpec_1 = __webpack_require__(93114); const v1JobStatus_1 = __webpack_require__(57345); const v1KeyToPath_1 = __webpack_require__(23549); const v1LabelSelector_1 = __webpack_require__(22567); const v1LabelSelectorRequirement_1 = __webpack_require__(50993); const v1Lease_1 = __webpack_require__(98844); const v1LeaseList_1 = __webpack_require__(76838); const v1LeaseSpec_1 = __webpack_require__(44603); const v1Lifecycle_1 = __webpack_require__(41500); const v1LimitRange_1 = __webpack_require__(86280); const v1LimitRangeItem_1 = __webpack_require__(91128); const v1LimitRangeList_1 = __webpack_require__(82578); const v1LimitRangeSpec_1 = __webpack_require__(83039); const v1ListMeta_1 = __webpack_require__(88593); const v1LoadBalancerIngress_1 = __webpack_require__(25667); const v1LoadBalancerStatus_1 = __webpack_require__(46630); const v1LocalObjectReference_1 = __webpack_require__(12229); const v1LocalSubjectAccessReview_1 = __webpack_require__(31674); const v1LocalVolumeSource_1 = __webpack_require__(72729); const v1ManagedFieldsEntry_1 = __webpack_require__(82187); const v1MutatingWebhook_1 = __webpack_require__(95354); const v1MutatingWebhookConfiguration_1 = __webpack_require__(2006); const v1MutatingWebhookConfigurationList_1 = __webpack_require__(22665); const v1NFSVolumeSource_1 = __webpack_require__(35432); const v1Namespace_1 = __webpack_require__(95469); const v1NamespaceCondition_1 = __webpack_require__(314); const v1NamespaceList_1 = __webpack_require__(22366); const v1NamespaceSpec_1 = __webpack_require__(49076); const v1NamespaceStatus_1 = __webpack_require__(8833); const v1NetworkPolicy_1 = __webpack_require__(47995); const v1NetworkPolicyEgressRule_1 = __webpack_require__(60886); const v1NetworkPolicyIngressRule_1 = __webpack_require__(89952); const v1NetworkPolicyList_1 = __webpack_require__(74436); const v1NetworkPolicyPeer_1 = __webpack_require__(22173); const v1NetworkPolicyPort_1 = __webpack_require__(71056); const v1NetworkPolicySpec_1 = __webpack_require__(63061); const v1Node_1 = __webpack_require__(3667); const v1NodeAddress_1 = __webpack_require__(84893); const v1NodeAffinity_1 = __webpack_require__(10627); const v1NodeCondition_1 = __webpack_require__(11740); const v1NodeConfigSource_1 = __webpack_require__(4272); const v1NodeConfigStatus_1 = __webpack_require__(10912); const v1NodeDaemonEndpoints_1 = __webpack_require__(24894); const v1NodeList_1 = __webpack_require__(42762); const v1NodeSelector_1 = __webpack_require__(32293); const v1NodeSelectorRequirement_1 = __webpack_require__(85161); const v1NodeSelectorTerm_1 = __webpack_require__(51128); const v1NodeSpec_1 = __webpack_require__(41752); const v1NodeStatus_1 = __webpack_require__(21656); const v1NodeSystemInfo_1 = __webpack_require__(33645); const v1NonResourceAttributes_1 = __webpack_require__(70019); const v1NonResourceRule_1 = __webpack_require__(99191); const v1ObjectFieldSelector_1 = __webpack_require__(86171); const v1ObjectMeta_1 = __webpack_require__(44696); const v1ObjectReference_1 = __webpack_require__(19051); const v1Overhead_1 = __webpack_require__(90114); const v1OwnerReference_1 = __webpack_require__(7924); const v1PersistentVolume_1 = __webpack_require__(25570); const v1PersistentVolumeClaim_1 = __webpack_require__(89974); const v1PersistentVolumeClaimCondition_1 = __webpack_require__(32966); const v1PersistentVolumeClaimList_1 = __webpack_require__(78594); const v1PersistentVolumeClaimSpec_1 = __webpack_require__(99911); const v1PersistentVolumeClaimStatus_1 = __webpack_require__(42951); const v1PersistentVolumeClaimTemplate_1 = __webpack_require__(92114); const v1PersistentVolumeClaimVolumeSource_1 = __webpack_require__(69811); const v1PersistentVolumeList_1 = __webpack_require__(86312); const v1PersistentVolumeSpec_1 = __webpack_require__(86628); const v1PersistentVolumeStatus_1 = __webpack_require__(19839); const v1PhotonPersistentDiskVolumeSource_1 = __webpack_require__(51817); const v1Pod_1 = __webpack_require__(99975); const v1PodAffinity_1 = __webpack_require__(509); const v1PodAffinityTerm_1 = __webpack_require__(65970); const v1PodAntiAffinity_1 = __webpack_require__(19574); const v1PodCondition_1 = __webpack_require__(78045); const v1PodDNSConfig_1 = __webpack_require__(67831); const v1PodDNSConfigOption_1 = __webpack_require__(74548); const v1PodIP_1 = __webpack_require__(76774); const v1PodList_1 = __webpack_require__(71948); const v1PodReadinessGate_1 = __webpack_require__(84135); const v1PodSecurityContext_1 = __webpack_require__(79850); const v1PodSpec_1 = __webpack_require__(58881); const v1PodStatus_1 = __webpack_require__(42892); const v1PodTemplate_1 = __webpack_require__(39894); const v1PodTemplateList_1 = __webpack_require__(88279); const v1PodTemplateSpec_1 = __webpack_require__(97621); const v1PolicyRule_1 = __webpack_require__(74625); const v1PortStatus_1 = __webpack_require__(85571); const v1PortworxVolumeSource_1 = __webpack_require__(3317); const v1Preconditions_1 = __webpack_require__(85751); const v1PreferredSchedulingTerm_1 = __webpack_require__(50837); const v1PriorityClass_1 = __webpack_require__(35698); const v1PriorityClassList_1 = __webpack_require__(80966); const v1Probe_1 = __webpack_require__(43933); const v1ProjectedVolumeSource_1 = __webpack_require__(54662); const v1QuobyteVolumeSource_1 = __webpack_require__(16954); const v1RBDPersistentVolumeSource_1 = __webpack_require__(70634); const v1RBDVolumeSource_1 = __webpack_require__(26573); const v1ReplicaSet_1 = __webpack_require__(69009); const v1ReplicaSetCondition_1 = __webpack_require__(14870); const v1ReplicaSetList_1 = __webpack_require__(40475); const v1ReplicaSetSpec_1 = __webpack_require__(90975); const v1ReplicaSetStatus_1 = __webpack_require__(66859); const v1ReplicationController_1 = __webpack_require__(64888); const v1ReplicationControllerCondition_1 = __webpack_require__(36376); const v1ReplicationControllerList_1 = __webpack_require__(8350); const v1ReplicationControllerSpec_1 = __webpack_require__(21782); const v1ReplicationControllerStatus_1 = __webpack_require__(19870); const v1ResourceAttributes_1 = __webpack_require__(94221); const v1ResourceFieldSelector_1 = __webpack_require__(10936); const v1ResourceQuota_1 = __webpack_require__(5827); const v1ResourceQuotaList_1 = __webpack_require__(48994); const v1ResourceQuotaSpec_1 = __webpack_require__(55397); const v1ResourceQuotaStatus_1 = __webpack_require__(91686); const v1ResourceRequirements_1 = __webpack_require__(22421); const v1ResourceRule_1 = __webpack_require__(1581); const v1Role_1 = __webpack_require__(61114); const v1RoleBinding_1 = __webpack_require__(77568); const v1RoleBindingList_1 = __webpack_require__(55014); const v1RoleList_1 = __webpack_require__(67214); const v1RoleRef_1 = __webpack_require__(56149); const v1RollingUpdateDaemonSet_1 = __webpack_require__(46136); const v1RollingUpdateDeployment_1 = __webpack_require__(70215); const v1RollingUpdateStatefulSetStrategy_1 = __webpack_require__(37088); const v1RuleWithOperations_1 = __webpack_require__(1824); const v1RuntimeClass_1 = __webpack_require__(31828); const v1RuntimeClassList_1 = __webpack_require__(96736); const v1SELinuxOptions_1 = __webpack_require__(99411); const v1Scale_1 = __webpack_require__(9764); const v1ScaleIOPersistentVolumeSource_1 = __webpack_require__(21058); const v1ScaleIOVolumeSource_1 = __webpack_require__(31382); const v1ScaleSpec_1 = __webpack_require__(15895); const v1ScaleStatus_1 = __webpack_require__(56891); const v1Scheduling_1 = __webpack_require__(79991); const v1ScopeSelector_1 = __webpack_require__(60711); const v1ScopedResourceSelectorRequirement_1 = __webpack_require__(25888); const v1SeccompProfile_1 = __webpack_require__(845); const v1Secret_1 = __webpack_require__(49696); const v1SecretEnvSource_1 = __webpack_require__(7056); const v1SecretKeySelector_1 = __webpack_require__(3884); const v1SecretList_1 = __webpack_require__(4248); const v1SecretProjection_1 = __webpack_require__(39203); const v1SecretReference_1 = __webpack_require__(33725); const v1SecretVolumeSource_1 = __webpack_require__(19078); const v1SecurityContext_1 = __webpack_require__(98113); const v1SelfSubjectAccessReview_1 = __webpack_require__(15598); const v1SelfSubjectAccessReviewSpec_1 = __webpack_require__(39191); const v1SelfSubjectRulesReview_1 = __webpack_require__(84279); const v1SelfSubjectRulesReviewSpec_1 = __webpack_require__(56581); const v1ServerAddressByClientCIDR_1 = __webpack_require__(30254); const v1Service_1 = __webpack_require__(87928); const v1ServiceAccount_1 = __webpack_require__(9350); const v1ServiceAccountList_1 = __webpack_require__(38169); const v1ServiceAccountTokenProjection_1 = __webpack_require__(18640); const v1ServiceBackendPort_1 = __webpack_require__(25927); const v1ServiceList_1 = __webpack_require__(26839); const v1ServicePort_1 = __webpack_require__(46881); const v1ServiceSpec_1 = __webpack_require__(96339); const v1ServiceStatus_1 = __webpack_require__(62890); const v1SessionAffinityConfig_1 = __webpack_require__(69127); const v1StatefulSet_1 = __webpack_require__(76275); const v1StatefulSetCondition_1 = __webpack_require__(49545); const v1StatefulSetList_1 = __webpack_require__(9927); const v1StatefulSetSpec_1 = __webpack_require__(18622); const v1StatefulSetStatus_1 = __webpack_require__(95926); const v1StatefulSetUpdateStrategy_1 = __webpack_require__(48971); const v1Status_1 = __webpack_require__(31592); const v1StatusCause_1 = __webpack_require__(83459); const v1StatusDetails_1 = __webpack_require__(9077); const v1StorageClass_1 = __webpack_require__(70127); const v1StorageClassList_1 = __webpack_require__(53615); const v1StorageOSPersistentVolumeSource_1 = __webpack_require__(14610); const v1StorageOSVolumeSource_1 = __webpack_require__(60878); const v1Subject_1 = __webpack_require__(1655); const v1SubjectAccessReview_1 = __webpack_require__(87717); const v1SubjectAccessReviewSpec_1 = __webpack_require__(34417); const v1SubjectAccessReviewStatus_1 = __webpack_require__(62967); const v1SubjectRulesReviewStatus_1 = __webpack_require__(41434); const v1Sysctl_1 = __webpack_require__(55885); const v1TCPSocketAction_1 = __webpack_require__(20317); const v1Taint_1 = __webpack_require__(65055); const v1TokenRequestSpec_1 = __webpack_require__(46022); const v1TokenRequestStatus_1 = __webpack_require__(38664); const v1TokenReview_1 = __webpack_require__(93238); const v1TokenReviewSpec_1 = __webpack_require__(6538); const v1TokenReviewStatus_1 = __webpack_require__(94719); const v1Toleration_1 = __webpack_require__(26379); const v1TopologySelectorLabelRequirement_1 = __webpack_require__(14361); const v1TopologySelectorTerm_1 = __webpack_require__(86872); const v1TopologySpreadConstraint_1 = __webpack_require__(89521); const v1TypedLocalObjectReference_1 = __webpack_require__(6602); const v1UserInfo_1 = __webpack_require__(75476); const v1ValidatingWebhook_1 = __webpack_require__(67027); const v1ValidatingWebhookConfiguration_1 = __webpack_require__(98205); const v1ValidatingWebhookConfigurationList_1 = __webpack_require__(3099); const v1Volume_1 = __webpack_require__(61999); const v1VolumeAttachment_1 = __webpack_require__(96086); const v1VolumeAttachmentList_1 = __webpack_require__(50793); const v1VolumeAttachmentSource_1 = __webpack_require__(81906); const v1VolumeAttachmentSpec_1 = __webpack_require__(92848); const v1VolumeAttachmentStatus_1 = __webpack_require__(69489); const v1VolumeDevice_1 = __webpack_require__(12040); const v1VolumeError_1 = __webpack_require__(67225); const v1VolumeMount_1 = __webpack_require__(6290); const v1VolumeNodeAffinity_1 = __webpack_require__(33698); const v1VolumeNodeResources_1 = __webpack_require__(3991); const v1VolumeProjection_1 = __webpack_require__(59985); const v1VsphereVirtualDiskVolumeSource_1 = __webpack_require__(52589); const v1WatchEvent_1 = __webpack_require__(67377); const v1WebhookConversion_1 = __webpack_require__(5757); const v1WeightedPodAffinityTerm_1 = __webpack_require__(49592); const v1WindowsSecurityContextOptions_1 = __webpack_require__(35568); const v1alpha1AggregationRule_1 = __webpack_require__(5287); const v1alpha1ClusterRole_1 = __webpack_require__(33927); const v1alpha1ClusterRoleBinding_1 = __webpack_require__(65276); const v1alpha1ClusterRoleBindingList_1 = __webpack_require__(83787); const v1alpha1ClusterRoleList_1 = __webpack_require__(90989); const v1alpha1FlowDistinguisherMethod_1 = __webpack_require__(80263); const v1alpha1FlowSchema_1 = __webpack_require__(70914); const v1alpha1FlowSchemaCondition_1 = __webpack_require__(85050); const v1alpha1FlowSchemaList_1 = __webpack_require__(43969); const v1alpha1FlowSchemaSpec_1 = __webpack_require__(31462); const v1alpha1FlowSchemaStatus_1 = __webpack_require__(65); const v1alpha1GroupSubject_1 = __webpack_require__(50767); const v1alpha1LimitResponse_1 = __webpack_require__(77238); const v1alpha1LimitedPriorityLevelConfiguration_1 = __webpack_require__(52888); const v1alpha1NonResourcePolicyRule_1 = __webpack_require__(44901); const v1alpha1Overhead_1 = __webpack_require__(8070); const v1alpha1PolicyRule_1 = __webpack_require__(61014); const v1alpha1PolicyRulesWithSubjects_1 = __webpack_require__(15062); const v1alpha1PriorityClass_1 = __webpack_require__(89642); const v1alpha1PriorityClassList_1 = __webpack_require__(15220); const v1alpha1PriorityLevelConfiguration_1 = __webpack_require__(10932); const v1alpha1PriorityLevelConfigurationCondition_1 = __webpack_require__(73101); const v1alpha1PriorityLevelConfigurationList_1 = __webpack_require__(78760); const v1alpha1PriorityLevelConfigurationReference_1 = __webpack_require__(3464); const v1alpha1PriorityLevelConfigurationSpec_1 = __webpack_require__(47008); const v1alpha1PriorityLevelConfigurationStatus_1 = __webpack_require__(1850); const v1alpha1QueuingConfiguration_1 = __webpack_require__(62558); const v1alpha1ResourcePolicyRule_1 = __webpack_require__(49471); const v1alpha1Role_1 = __webpack_require__(45910); const v1alpha1RoleBinding_1 = __webpack_require__(32036); const v1alpha1RoleBindingList_1 = __webpack_require__(53079); const v1alpha1RoleList_1 = __webpack_require__(39479); const v1alpha1RoleRef_1 = __webpack_require__(56871); const v1alpha1RuntimeClass_1 = __webpack_require__(66602); const v1alpha1RuntimeClassList_1 = __webpack_require__(41934); const v1alpha1RuntimeClassSpec_1 = __webpack_require__(3593); const v1alpha1Scheduling_1 = __webpack_require__(12511); const v1alpha1ServerStorageVersion_1 = __webpack_require__(47647); const v1alpha1ServiceAccountSubject_1 = __webpack_require__(23984); const v1alpha1StorageVersion_1 = __webpack_require__(54349); const v1alpha1StorageVersionCondition_1 = __webpack_require__(20058); const v1alpha1StorageVersionList_1 = __webpack_require__(53792); const v1alpha1StorageVersionStatus_1 = __webpack_require__(20970); const v1alpha1UserSubject_1 = __webpack_require__(88064); const v1alpha1VolumeAttachment_1 = __webpack_require__(88392); const v1alpha1VolumeAttachmentList_1 = __webpack_require__(49929); const v1alpha1VolumeAttachmentSource_1 = __webpack_require__(23402); const v1alpha1VolumeAttachmentSpec_1 = __webpack_require__(49584); const v1alpha1VolumeAttachmentStatus_1 = __webpack_require__(94030); const v1alpha1VolumeError_1 = __webpack_require__(39991); const v1beta1APIService_1 = __webpack_require__(48676); const v1beta1APIServiceCondition_1 = __webpack_require__(53943); const v1beta1APIServiceList_1 = __webpack_require__(44271); const v1beta1APIServiceSpec_1 = __webpack_require__(99792); const v1beta1APIServiceStatus_1 = __webpack_require__(43425); const v1beta1AggregationRule_1 = __webpack_require__(7806); const v1beta1AllowedCSIDriver_1 = __webpack_require__(7724); const v1beta1AllowedFlexVolume_1 = __webpack_require__(66666); const v1beta1AllowedHostPath_1 = __webpack_require__(29863); const v1beta1CSIDriver_1 = __webpack_require__(23519); const v1beta1CSIDriverList_1 = __webpack_require__(68738); const v1beta1CSIDriverSpec_1 = __webpack_require__(24519); const v1beta1CSINode_1 = __webpack_require__(92663); const v1beta1CSINodeDriver_1 = __webpack_require__(37328); const v1beta1CSINodeList_1 = __webpack_require__(16242); const v1beta1CSINodeSpec_1 = __webpack_require__(25978); const v1beta1CertificateSigningRequest_1 = __webpack_require__(16589); const v1beta1CertificateSigningRequestCondition_1 = __webpack_require__(91864); const v1beta1CertificateSigningRequestList_1 = __webpack_require__(97720); const v1beta1CertificateSigningRequestSpec_1 = __webpack_require__(52843); const v1beta1CertificateSigningRequestStatus_1 = __webpack_require__(63675); const v1beta1ClusterRole_1 = __webpack_require__(34506); const v1beta1ClusterRoleBinding_1 = __webpack_require__(72413); const v1beta1ClusterRoleBindingList_1 = __webpack_require__(58847); const v1beta1ClusterRoleList_1 = __webpack_require__(38268); const v1beta1CronJob_1 = __webpack_require__(21270); const v1beta1CronJobList_1 = __webpack_require__(9165); const v1beta1CronJobSpec_1 = __webpack_require__(64672); const v1beta1CronJobStatus_1 = __webpack_require__(60049); const v1beta1CustomResourceColumnDefinition_1 = __webpack_require__(15358); const v1beta1CustomResourceConversion_1 = __webpack_require__(9944); const v1beta1CustomResourceDefinition_1 = __webpack_require__(18555); const v1beta1CustomResourceDefinitionCondition_1 = __webpack_require__(49145); const v1beta1CustomResourceDefinitionList_1 = __webpack_require__(87178); const v1beta1CustomResourceDefinitionNames_1 = __webpack_require__(86145); const v1beta1CustomResourceDefinitionSpec_1 = __webpack_require__(52618); const v1beta1CustomResourceDefinitionStatus_1 = __webpack_require__(18241); const v1beta1CustomResourceDefinitionVersion_1 = __webpack_require__(67694); const v1beta1CustomResourceSubresourceScale_1 = __webpack_require__(41365); const v1beta1CustomResourceSubresources_1 = __webpack_require__(13153); const v1beta1CustomResourceValidation_1 = __webpack_require__(27347); const v1beta1Endpoint_1 = __webpack_require__(61730); const v1beta1EndpointConditions_1 = __webpack_require__(37085); const v1beta1EndpointPort_1 = __webpack_require__(7423); const v1beta1EndpointSlice_1 = __webpack_require__(34706); const v1beta1EndpointSliceList_1 = __webpack_require__(98830); const v1beta1Event_1 = __webpack_require__(93967); const v1beta1EventList_1 = __webpack_require__(64484); const v1beta1EventSeries_1 = __webpack_require__(63533); const v1beta1Eviction_1 = __webpack_require__(96254); const v1beta1ExternalDocumentation_1 = __webpack_require__(1040); const v1beta1FSGroupStrategyOptions_1 = __webpack_require__(57091); const v1beta1FlowDistinguisherMethod_1 = __webpack_require__(98441); const v1beta1FlowSchema_1 = __webpack_require__(30089); const v1beta1FlowSchemaCondition_1 = __webpack_require__(43801); const v1beta1FlowSchemaList_1 = __webpack_require__(58382); const v1beta1FlowSchemaSpec_1 = __webpack_require__(84478); const v1beta1FlowSchemaStatus_1 = __webpack_require__(8076); const v1beta1GroupSubject_1 = __webpack_require__(51807); const v1beta1HostPortRange_1 = __webpack_require__(59514); const v1beta1IDRange_1 = __webpack_require__(96831); const v1beta1IngressClass_1 = __webpack_require__(41330); const v1beta1IngressClassList_1 = __webpack_require__(98895); const v1beta1IngressClassSpec_1 = __webpack_require__(95359); const v1beta1JSONSchemaProps_1 = __webpack_require__(24695); const v1beta1JobTemplateSpec_1 = __webpack_require__(75855); const v1beta1Lease_1 = __webpack_require__(56981); const v1beta1LeaseList_1 = __webpack_require__(55914); const v1beta1LeaseSpec_1 = __webpack_require__(14010); const v1beta1LimitResponse_1 = __webpack_require__(8326); const v1beta1LimitedPriorityLevelConfiguration_1 = __webpack_require__(40541); const v1beta1LocalSubjectAccessReview_1 = __webpack_require__(59918); const v1beta1MutatingWebhook_1 = __webpack_require__(74749); const v1beta1MutatingWebhookConfiguration_1 = __webpack_require__(66991); const v1beta1MutatingWebhookConfigurationList_1 = __webpack_require__(4046); const v1beta1NonResourceAttributes_1 = __webpack_require__(14255); const v1beta1NonResourcePolicyRule_1 = __webpack_require__(81655); const v1beta1NonResourceRule_1 = __webpack_require__(83111); const v1beta1Overhead_1 = __webpack_require__(34396); const v1beta1PodDisruptionBudget_1 = __webpack_require__(43485); const v1beta1PodDisruptionBudgetList_1 = __webpack_require__(63931); const v1beta1PodDisruptionBudgetSpec_1 = __webpack_require__(23257); const v1beta1PodDisruptionBudgetStatus_1 = __webpack_require__(84404); const v1beta1PodSecurityPolicy_1 = __webpack_require__(44289); const v1beta1PodSecurityPolicyList_1 = __webpack_require__(90147); const v1beta1PodSecurityPolicySpec_1 = __webpack_require__(72683); const v1beta1PolicyRule_1 = __webpack_require__(2177); const v1beta1PolicyRulesWithSubjects_1 = __webpack_require__(75714); const v1beta1PriorityClass_1 = __webpack_require__(59684); const v1beta1PriorityClassList_1 = __webpack_require__(26149); const v1beta1PriorityLevelConfiguration_1 = __webpack_require__(67813); const v1beta1PriorityLevelConfigurationCondition_1 = __webpack_require__(60270); const v1beta1PriorityLevelConfigurationList_1 = __webpack_require__(90435); const v1beta1PriorityLevelConfigurationReference_1 = __webpack_require__(42319); const v1beta1PriorityLevelConfigurationSpec_1 = __webpack_require__(10530); const v1beta1PriorityLevelConfigurationStatus_1 = __webpack_require__(22546); const v1beta1QueuingConfiguration_1 = __webpack_require__(62252); const v1beta1ResourceAttributes_1 = __webpack_require__(76021); const v1beta1ResourcePolicyRule_1 = __webpack_require__(5461); const v1beta1ResourceRule_1 = __webpack_require__(28787); const v1beta1Role_1 = __webpack_require__(51959); const v1beta1RoleBinding_1 = __webpack_require__(71667); const v1beta1RoleBindingList_1 = __webpack_require__(96916); const v1beta1RoleList_1 = __webpack_require__(2230); const v1beta1RoleRef_1 = __webpack_require__(74299); const v1beta1RuleWithOperations_1 = __webpack_require__(87497); const v1beta1RunAsGroupStrategyOptions_1 = __webpack_require__(65831); const v1beta1RunAsUserStrategyOptions_1 = __webpack_require__(31079); const v1beta1RuntimeClass_1 = __webpack_require__(75281); const v1beta1RuntimeClassList_1 = __webpack_require__(8109); const v1beta1RuntimeClassStrategyOptions_1 = __webpack_require__(50769); const v1beta1SELinuxStrategyOptions_1 = __webpack_require__(49098); const v1beta1Scheduling_1 = __webpack_require__(34651); const v1beta1SelfSubjectAccessReview_1 = __webpack_require__(35033); const v1beta1SelfSubjectAccessReviewSpec_1 = __webpack_require__(90080); const v1beta1SelfSubjectRulesReview_1 = __webpack_require__(13129); const v1beta1SelfSubjectRulesReviewSpec_1 = __webpack_require__(14474); const v1beta1ServiceAccountSubject_1 = __webpack_require__(473); const v1beta1StorageClass_1 = __webpack_require__(88465); const v1beta1StorageClassList_1 = __webpack_require__(2146); const v1beta1SubjectAccessReview_1 = __webpack_require__(88931); const v1beta1SubjectAccessReviewSpec_1 = __webpack_require__(46198); const v1beta1SubjectAccessReviewStatus_1 = __webpack_require__(95797); const v1beta1SubjectRulesReviewStatus_1 = __webpack_require__(31397); const v1beta1SupplementalGroupsStrategyOptions_1 = __webpack_require__(12802); const v1beta1TokenRequest_1 = __webpack_require__(61521); const v1beta1TokenReview_1 = __webpack_require__(15956); const v1beta1TokenReviewSpec_1 = __webpack_require__(54910); const v1beta1TokenReviewStatus_1 = __webpack_require__(10285); const v1beta1UserInfo_1 = __webpack_require__(53523); const v1beta1UserSubject_1 = __webpack_require__(11202); const v1beta1ValidatingWebhook_1 = __webpack_require__(39491); const v1beta1ValidatingWebhookConfiguration_1 = __webpack_require__(20812); const v1beta1ValidatingWebhookConfigurationList_1 = __webpack_require__(18685); const v1beta1VolumeAttachment_1 = __webpack_require__(72711); const v1beta1VolumeAttachmentList_1 = __webpack_require__(72167); const v1beta1VolumeAttachmentSource_1 = __webpack_require__(55473); const v1beta1VolumeAttachmentSpec_1 = __webpack_require__(53805); const v1beta1VolumeAttachmentStatus_1 = __webpack_require__(94350); const v1beta1VolumeError_1 = __webpack_require__(53849); const v1beta1VolumeNodeResources_1 = __webpack_require__(71688); const v2alpha1CronJob_1 = __webpack_require__(5710); const v2alpha1CronJobList_1 = __webpack_require__(98026); const v2alpha1CronJobSpec_1 = __webpack_require__(41784); const v2alpha1CronJobStatus_1 = __webpack_require__(2411); const v2alpha1JobTemplateSpec_1 = __webpack_require__(3849); const v2beta1ContainerResourceMetricSource_1 = __webpack_require__(37196); const v2beta1ContainerResourceMetricStatus_1 = __webpack_require__(27287); const v2beta1CrossVersionObjectReference_1 = __webpack_require__(79262); const v2beta1ExternalMetricSource_1 = __webpack_require__(43128); const v2beta1ExternalMetricStatus_1 = __webpack_require__(96606); const v2beta1HorizontalPodAutoscaler_1 = __webpack_require__(74687); const v2beta1HorizontalPodAutoscalerCondition_1 = __webpack_require__(89728); const v2beta1HorizontalPodAutoscalerList_1 = __webpack_require__(89151); const v2beta1HorizontalPodAutoscalerSpec_1 = __webpack_require__(8786); const v2beta1HorizontalPodAutoscalerStatus_1 = __webpack_require__(66258); const v2beta1MetricSpec_1 = __webpack_require__(98064); const v2beta1MetricStatus_1 = __webpack_require__(25083); const v2beta1ObjectMetricSource_1 = __webpack_require__(30639); const v2beta1ObjectMetricStatus_1 = __webpack_require__(5950); const v2beta1PodsMetricSource_1 = __webpack_require__(18291); const v2beta1PodsMetricStatus_1 = __webpack_require__(83162); const v2beta1ResourceMetricSource_1 = __webpack_require__(10150); const v2beta1ResourceMetricStatus_1 = __webpack_require__(29521); const v2beta2ContainerResourceMetricSource_1 = __webpack_require__(53209); const v2beta2ContainerResourceMetricStatus_1 = __webpack_require__(69602); const v2beta2CrossVersionObjectReference_1 = __webpack_require__(85029); const v2beta2ExternalMetricSource_1 = __webpack_require__(75145); const v2beta2ExternalMetricStatus_1 = __webpack_require__(12390); const v2beta2HPAScalingPolicy_1 = __webpack_require__(34096); const v2beta2HPAScalingRules_1 = __webpack_require__(33665); const v2beta2HorizontalPodAutoscaler_1 = __webpack_require__(96952); const v2beta2HorizontalPodAutoscalerBehavior_1 = __webpack_require__(41473); const v2beta2HorizontalPodAutoscalerCondition_1 = __webpack_require__(67231); const v2beta2HorizontalPodAutoscalerList_1 = __webpack_require__(29409); const v2beta2HorizontalPodAutoscalerSpec_1 = __webpack_require__(17298); const v2beta2HorizontalPodAutoscalerStatus_1 = __webpack_require__(60715); const v2beta2MetricIdentifier_1 = __webpack_require__(73280); const v2beta2MetricSpec_1 = __webpack_require__(54941); const v2beta2MetricStatus_1 = __webpack_require__(5415); const v2beta2MetricTarget_1 = __webpack_require__(17383); const v2beta2MetricValueStatus_1 = __webpack_require__(61416); const v2beta2ObjectMetricSource_1 = __webpack_require__(56126); const v2beta2ObjectMetricStatus_1 = __webpack_require__(60958); const v2beta2PodsMetricSource_1 = __webpack_require__(46865); const v2beta2PodsMetricStatus_1 = __webpack_require__(78411); const v2beta2ResourceMetricSource_1 = __webpack_require__(23137); const v2beta2ResourceMetricStatus_1 = __webpack_require__(849); const versionInfo_1 = __webpack_require__(17451); /* 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, "CoreV1Event": coreV1Event_1.CoreV1Event, "CoreV1EventList": coreV1EventList_1.CoreV1EventList, "CoreV1EventSeries": coreV1EventSeries_1.CoreV1EventSeries, "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, "FlowcontrolV1alpha1Subject": flowcontrolV1alpha1Subject_1.FlowcontrolV1alpha1Subject, "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, "RbacV1alpha1Subject": rbacV1alpha1Subject_1.RbacV1alpha1Subject, "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, "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, "V1EndpointAddress": v1EndpointAddress_1.V1EndpointAddress, "V1EndpointPort": v1EndpointPort_1.V1EndpointPort, "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, "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, "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, "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, "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, "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, "V1alpha1ClusterRole": v1alpha1ClusterRole_1.V1alpha1ClusterRole, "V1alpha1ClusterRoleBinding": v1alpha1ClusterRoleBinding_1.V1alpha1ClusterRoleBinding, "V1alpha1ClusterRoleBindingList": v1alpha1ClusterRoleBindingList_1.V1alpha1ClusterRoleBindingList, "V1alpha1ClusterRoleList": v1alpha1ClusterRoleList_1.V1alpha1ClusterRoleList, "V1alpha1FlowDistinguisherMethod": v1alpha1FlowDistinguisherMethod_1.V1alpha1FlowDistinguisherMethod, "V1alpha1FlowSchema": v1alpha1FlowSchema_1.V1alpha1FlowSchema, "V1alpha1FlowSchemaCondition": v1alpha1FlowSchemaCondition_1.V1alpha1FlowSchemaCondition, "V1alpha1FlowSchemaList": v1alpha1FlowSchemaList_1.V1alpha1FlowSchemaList, "V1alpha1FlowSchemaSpec": v1alpha1FlowSchemaSpec_1.V1alpha1FlowSchemaSpec, "V1alpha1FlowSchemaStatus": v1alpha1FlowSchemaStatus_1.V1alpha1FlowSchemaStatus, "V1alpha1GroupSubject": v1alpha1GroupSubject_1.V1alpha1GroupSubject, "V1alpha1LimitResponse": v1alpha1LimitResponse_1.V1alpha1LimitResponse, "V1alpha1LimitedPriorityLevelConfiguration": v1alpha1LimitedPriorityLevelConfiguration_1.V1alpha1LimitedPriorityLevelConfiguration, "V1alpha1NonResourcePolicyRule": v1alpha1NonResourcePolicyRule_1.V1alpha1NonResourcePolicyRule, "V1alpha1Overhead": v1alpha1Overhead_1.V1alpha1Overhead, "V1alpha1PolicyRule": v1alpha1PolicyRule_1.V1alpha1PolicyRule, "V1alpha1PolicyRulesWithSubjects": v1alpha1PolicyRulesWithSubjects_1.V1alpha1PolicyRulesWithSubjects, "V1alpha1PriorityClass": v1alpha1PriorityClass_1.V1alpha1PriorityClass, "V1alpha1PriorityClassList": v1alpha1PriorityClassList_1.V1alpha1PriorityClassList, "V1alpha1PriorityLevelConfiguration": v1alpha1PriorityLevelConfiguration_1.V1alpha1PriorityLevelConfiguration, "V1alpha1PriorityLevelConfigurationCondition": v1alpha1PriorityLevelConfigurationCondition_1.V1alpha1PriorityLevelConfigurationCondition, "V1alpha1PriorityLevelConfigurationList": v1alpha1PriorityLevelConfigurationList_1.V1alpha1PriorityLevelConfigurationList, "V1alpha1PriorityLevelConfigurationReference": v1alpha1PriorityLevelConfigurationReference_1.V1alpha1PriorityLevelConfigurationReference, "V1alpha1PriorityLevelConfigurationSpec": v1alpha1PriorityLevelConfigurationSpec_1.V1alpha1PriorityLevelConfigurationSpec, "V1alpha1PriorityLevelConfigurationStatus": v1alpha1PriorityLevelConfigurationStatus_1.V1alpha1PriorityLevelConfigurationStatus, "V1alpha1QueuingConfiguration": v1alpha1QueuingConfiguration_1.V1alpha1QueuingConfiguration, "V1alpha1ResourcePolicyRule": v1alpha1ResourcePolicyRule_1.V1alpha1ResourcePolicyRule, "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, "V1alpha1ServiceAccountSubject": v1alpha1ServiceAccountSubject_1.V1alpha1ServiceAccountSubject, "V1alpha1StorageVersion": v1alpha1StorageVersion_1.V1alpha1StorageVersion, "V1alpha1StorageVersionCondition": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition, "V1alpha1StorageVersionList": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList, "V1alpha1StorageVersionStatus": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus, "V1alpha1UserSubject": v1alpha1UserSubject_1.V1alpha1UserSubject, "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, "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, "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, "V1beta1GroupSubject": v1beta1GroupSubject_1.V1beta1GroupSubject, "V1beta1HostPortRange": v1beta1HostPortRange_1.V1beta1HostPortRange, "V1beta1IDRange": v1beta1IDRange_1.V1beta1IDRange, "V1beta1IngressClass": v1beta1IngressClass_1.V1beta1IngressClass, "V1beta1IngressClassList": v1beta1IngressClassList_1.V1beta1IngressClassList, "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, "V2alpha1CronJob": v2alpha1CronJob_1.V2alpha1CronJob, "V2alpha1CronJobList": v2alpha1CronJobList_1.V2alpha1CronJobList, "V2alpha1CronJobSpec": v2alpha1CronJobSpec_1.V2alpha1CronJobSpec, "V2alpha1CronJobStatus": v2alpha1CronJobStatus_1.V2alpha1CronJobStatus, "V2alpha1JobTemplateSpec": v2alpha1JobTemplateSpec_1.V2alpha1JobTemplateSpec, "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 /***/ }), /***/ 27197: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41668: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 64660: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 36453: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95951: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 4157: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61752: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 50369: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13517: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19573: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RbacV1alpha1Subject = 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 RbacV1alpha1Subject { static getAttributeTypeMap() { return RbacV1alpha1Subject.attributeTypeMap; } } exports.RbacV1alpha1Subject = RbacV1alpha1Subject; RbacV1alpha1Subject.discriminator = undefined; RbacV1alpha1Subject.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=rbacV1alpha1Subject.js.map /***/ }), /***/ 99229: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25958: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 44481: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 52906: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89033: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5454: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99042: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 58352: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87198: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61496: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 17883: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93135: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39808: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61957: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90312: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 97069: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 91312: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23694: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95073: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 48551: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 68849: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34144: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84881: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 11582: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74315: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90288: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 24000: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93142: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98367: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87598: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 82975: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14268: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84957: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99084: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 92932: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31530: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37759: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 38285: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41888: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19111: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 33913: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61458: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32315: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 21181: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95532: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 30578: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 2047: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 38596: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34990: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 42874: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99685: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 62892: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 80512: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56709: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61682: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 59708: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 52865: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13501: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 50217: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83765: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89767: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 27892: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19716: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 35980: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 78405: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 66304: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34233: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94346: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9731: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 40325: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32791: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10486: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69798: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 20486: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25713: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 82283: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98087: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94579: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25408: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37060: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32699: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 77063: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 173: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 44560: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87510: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 48451: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18029: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 65310: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95602: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 81364: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41298: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 55398: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34981: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 38099: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 78901: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19493: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 11672: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 57151: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37917: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1EndpointPort = void 0; /** * EndpointPort is a tuple that describes a single port. */ class V1EndpointPort { static getAttributeTypeMap() { return V1EndpointPort.attributeTypeMap; } } exports.V1EndpointPort = V1EndpointPort; V1EndpointPort.discriminator = undefined; V1EndpointPort.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=v1EndpointPort.js.map /***/ }), /***/ 31925: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13449: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95223: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23074: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 36874: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 17205: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32671: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90017: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "readOnly", "baseName": "readOnly", "type": "boolean" }, { "name": "volumeClaimTemplate", "baseName": "volumeClaimTemplate", "type": "V1PersistentVolumeClaimTemplate" } ]; //# sourceMappingURL=v1EphemeralVolumeSource.js.map /***/ }), /***/ 97764: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13313: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 77213: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 35093: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 91874: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 16690: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10414: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 1016: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 27584: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 97617: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37426: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87855: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 16636: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3437: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86769: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56219: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95179: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93652: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 17024: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49823: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 50910: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 72796: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69225: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49202: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83570: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 68021: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32492: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 44340: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93865: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 76125: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 92069: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "V1TypedLocalObjectReference" } ]; //# sourceMappingURL=v1IngressClassSpec.js.map /***/ }), /***/ 43693: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89541: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 62476: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 59689: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 45830: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23037: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 63580: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 91260: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94069: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13366: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93114: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "completions", "baseName": "completions", "type": "number" }, { "name": "manualSelector", "baseName": "manualSelector", "type": "boolean" }, { "name": "parallelism", "baseName": "parallelism", "type": "number" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" }, { "name": "template", "baseName": "template", "type": "V1PodTemplateSpec" }, { "name": "ttlSecondsAfterFinished", "baseName": "ttlSecondsAfterFinished", "type": "number" } ]; //# sourceMappingURL=v1JobSpec.js.map /***/ }), /***/ 57345: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "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 /***/ }), /***/ 23549: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22567: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 50993: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98844: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 76838: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 44603: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41500: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86280: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 91128: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 82578: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83039: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 88593: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25667: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 46630: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 12229: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31674: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 72729: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 82187: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95354: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 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.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22665: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 35432: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95469: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 314: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22366: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49076: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 8833: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 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.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60886: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89952: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74436: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22173: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 71056: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "port", "baseName": "port", "type": "object" }, { "name": "protocol", "baseName": "protocol", "type": "string" } ]; //# sourceMappingURL=v1NetworkPolicyPort.js.map /***/ }), /***/ 63061: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3667: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84893: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10627: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 11740: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 4272: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10912: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 24894: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 42762: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32293: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 85161: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 51128: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41752: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 21656: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 33645: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 70019: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99191: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86171: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 44696: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19051: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90114: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7924: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25570: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89974: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32966: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 78594: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99911: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 42951: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 92114: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69811: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86312: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86628: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19839: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 51817: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99975: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 509: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 65970: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "namespaces", "baseName": "namespaces", "type": "Array" }, { "name": "topologyKey", "baseName": "topologyKey", "type": "string" } ]; //# sourceMappingURL=v1PodAffinityTerm.js.map /***/ }), /***/ 19574: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 78045: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67831: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74548: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 76774: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 71948: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84135: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 79850: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 58881: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 42892: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39894: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 88279: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 97621: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74625: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 85571: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3317: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 85751: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 50837: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 35698: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 80966: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 43933: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "timeoutSeconds", "baseName": "timeoutSeconds", "type": "number" } ]; //# sourceMappingURL=v1Probe.js.map /***/ }), /***/ 54662: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 16954: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 70634: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 26573: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69009: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14870: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 40475: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90975: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 66859: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 64888: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 36376: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 8350: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 21782: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19870: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94221: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10936: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5827: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 48994: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 55397: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 91686: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22421: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 1581: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61114: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 77568: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 55014: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67214: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56149: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 46136: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "maxUnavailable", "baseName": "maxUnavailable", "type": "object" } ]; //# sourceMappingURL=v1RollingUpdateDaemonSet.js.map /***/ }), /***/ 70215: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37088: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 1824: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31828: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96736: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99411: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9764: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 21058: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31382: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 15895: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56891: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 79991: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60711: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25888: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 845: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49696: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7056: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3884: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 4248: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39203: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 33725: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 19078: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98113: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 15598: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39191: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84279: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56581: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 30254: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87928: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9350: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 38169: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18640: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25927: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 26839: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 46881: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96339: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "ipFamilies", "baseName": "ipFamilies", "type": "Array" }, { "name": "ipFamilyPolicy", "baseName": "ipFamilyPolicy", "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 /***/ }), /***/ 62890: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69127: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 76275: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49545: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9927: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18622: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95926: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 48971: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31592: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83459: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9077: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 70127: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53615: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14610: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60878: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 1655: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87717: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34417: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 62967: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41434: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 55885: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 20317: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 65055: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 46022: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 38664: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93238: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 6538: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94719: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 26379: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14361: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86872: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89521: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 6602: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 75476: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67027: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98205: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3099: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61999: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96086: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 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.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 81906: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 92848: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69489: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 12040: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67225: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 6290: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 33698: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3991: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 59985: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 52589: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67377: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5757: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49592: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 35568: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5287: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 33927: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 65276: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83787: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90989: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 80263: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1FlowDistinguisherMethod = void 0; /** * FlowDistinguisherMethod specifies the method of a flow distinguisher. */ class V1alpha1FlowDistinguisherMethod { static getAttributeTypeMap() { return V1alpha1FlowDistinguisherMethod.attributeTypeMap; } } exports.V1alpha1FlowDistinguisherMethod = V1alpha1FlowDistinguisherMethod; V1alpha1FlowDistinguisherMethod.discriminator = undefined; V1alpha1FlowDistinguisherMethod.attributeTypeMap = [ { "name": "type", "baseName": "type", "type": "string" } ]; //# sourceMappingURL=v1alpha1FlowDistinguisherMethod.js.map /***/ }), /***/ 70914: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1FlowSchema = 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 V1alpha1FlowSchema { static getAttributeTypeMap() { return V1alpha1FlowSchema.attributeTypeMap; } } exports.V1alpha1FlowSchema = V1alpha1FlowSchema; V1alpha1FlowSchema.discriminator = undefined; V1alpha1FlowSchema.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1alpha1FlowSchemaSpec" }, { "name": "status", "baseName": "status", "type": "V1alpha1FlowSchemaStatus" } ]; //# sourceMappingURL=v1alpha1FlowSchema.js.map /***/ }), /***/ 85050: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1FlowSchemaCondition = void 0; /** * FlowSchemaCondition describes conditions for a FlowSchema. */ class V1alpha1FlowSchemaCondition { static getAttributeTypeMap() { return V1alpha1FlowSchemaCondition.attributeTypeMap; } } exports.V1alpha1FlowSchemaCondition = V1alpha1FlowSchemaCondition; V1alpha1FlowSchemaCondition.discriminator = undefined; V1alpha1FlowSchemaCondition.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=v1alpha1FlowSchemaCondition.js.map /***/ }), /***/ 43969: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1FlowSchemaList = void 0; /** * FlowSchemaList is a list of FlowSchema objects. */ class V1alpha1FlowSchemaList { static getAttributeTypeMap() { return V1alpha1FlowSchemaList.attributeTypeMap; } } exports.V1alpha1FlowSchemaList = V1alpha1FlowSchemaList; V1alpha1FlowSchemaList.discriminator = undefined; V1alpha1FlowSchemaList.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=v1alpha1FlowSchemaList.js.map /***/ }), /***/ 31462: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1FlowSchemaSpec = void 0; /** * FlowSchemaSpec describes how the FlowSchema\'s specification looks like. */ class V1alpha1FlowSchemaSpec { static getAttributeTypeMap() { return V1alpha1FlowSchemaSpec.attributeTypeMap; } } exports.V1alpha1FlowSchemaSpec = V1alpha1FlowSchemaSpec; V1alpha1FlowSchemaSpec.discriminator = undefined; V1alpha1FlowSchemaSpec.attributeTypeMap = [ { "name": "distinguisherMethod", "baseName": "distinguisherMethod", "type": "V1alpha1FlowDistinguisherMethod" }, { "name": "matchingPrecedence", "baseName": "matchingPrecedence", "type": "number" }, { "name": "priorityLevelConfiguration", "baseName": "priorityLevelConfiguration", "type": "V1alpha1PriorityLevelConfigurationReference" }, { "name": "rules", "baseName": "rules", "type": "Array" } ]; //# sourceMappingURL=v1alpha1FlowSchemaSpec.js.map /***/ }), /***/ 65: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1FlowSchemaStatus = void 0; /** * FlowSchemaStatus represents the current state of a FlowSchema. */ class V1alpha1FlowSchemaStatus { static getAttributeTypeMap() { return V1alpha1FlowSchemaStatus.attributeTypeMap; } } exports.V1alpha1FlowSchemaStatus = V1alpha1FlowSchemaStatus; V1alpha1FlowSchemaStatus.discriminator = undefined; V1alpha1FlowSchemaStatus.attributeTypeMap = [ { "name": "conditions", "baseName": "conditions", "type": "Array" } ]; //# sourceMappingURL=v1alpha1FlowSchemaStatus.js.map /***/ }), /***/ 50767: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1GroupSubject = void 0; /** * GroupSubject holds detailed information for group-kind subject. */ class V1alpha1GroupSubject { static getAttributeTypeMap() { return V1alpha1GroupSubject.attributeTypeMap; } } exports.V1alpha1GroupSubject = V1alpha1GroupSubject; V1alpha1GroupSubject.discriminator = undefined; V1alpha1GroupSubject.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" } ]; //# sourceMappingURL=v1alpha1GroupSubject.js.map /***/ }), /***/ 77238: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1LimitResponse = void 0; /** * LimitResponse defines how to handle requests that can not be executed right now. */ class V1alpha1LimitResponse { static getAttributeTypeMap() { return V1alpha1LimitResponse.attributeTypeMap; } } exports.V1alpha1LimitResponse = V1alpha1LimitResponse; V1alpha1LimitResponse.discriminator = undefined; V1alpha1LimitResponse.attributeTypeMap = [ { "name": "queuing", "baseName": "queuing", "type": "V1alpha1QueuingConfiguration" }, { "name": "type", "baseName": "type", "type": "string" } ]; //# sourceMappingURL=v1alpha1LimitResponse.js.map /***/ }), /***/ 52888: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1LimitedPriorityLevelConfiguration = 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 V1alpha1LimitedPriorityLevelConfiguration { static getAttributeTypeMap() { return V1alpha1LimitedPriorityLevelConfiguration.attributeTypeMap; } } exports.V1alpha1LimitedPriorityLevelConfiguration = V1alpha1LimitedPriorityLevelConfiguration; V1alpha1LimitedPriorityLevelConfiguration.discriminator = undefined; V1alpha1LimitedPriorityLevelConfiguration.attributeTypeMap = [ { "name": "assuredConcurrencyShares", "baseName": "assuredConcurrencyShares", "type": "number" }, { "name": "limitResponse", "baseName": "limitResponse", "type": "V1alpha1LimitResponse" } ]; //# sourceMappingURL=v1alpha1LimitedPriorityLevelConfiguration.js.map /***/ }), /***/ 44901: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1NonResourcePolicyRule = 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 V1alpha1NonResourcePolicyRule { static getAttributeTypeMap() { return V1alpha1NonResourcePolicyRule.attributeTypeMap; } } exports.V1alpha1NonResourcePolicyRule = V1alpha1NonResourcePolicyRule; V1alpha1NonResourcePolicyRule.discriminator = undefined; V1alpha1NonResourcePolicyRule.attributeTypeMap = [ { "name": "nonResourceURLs", "baseName": "nonResourceURLs", "type": "Array" }, { "name": "verbs", "baseName": "verbs", "type": "Array" } ]; //# sourceMappingURL=v1alpha1NonResourcePolicyRule.js.map /***/ }), /***/ 8070: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61014: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 15062: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PolicyRulesWithSubjects = 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 V1alpha1PolicyRulesWithSubjects { static getAttributeTypeMap() { return V1alpha1PolicyRulesWithSubjects.attributeTypeMap; } } exports.V1alpha1PolicyRulesWithSubjects = V1alpha1PolicyRulesWithSubjects; V1alpha1PolicyRulesWithSubjects.discriminator = undefined; V1alpha1PolicyRulesWithSubjects.attributeTypeMap = [ { "name": "nonResourceRules", "baseName": "nonResourceRules", "type": "Array" }, { "name": "resourceRules", "baseName": "resourceRules", "type": "Array" }, { "name": "subjects", "baseName": "subjects", "type": "Array" } ]; //# sourceMappingURL=v1alpha1PolicyRulesWithSubjects.js.map /***/ }), /***/ 89642: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 15220: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10932: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PriorityLevelConfiguration = void 0; /** * PriorityLevelConfiguration represents the configuration of a priority level. */ class V1alpha1PriorityLevelConfiguration { static getAttributeTypeMap() { return V1alpha1PriorityLevelConfiguration.attributeTypeMap; } } exports.V1alpha1PriorityLevelConfiguration = V1alpha1PriorityLevelConfiguration; V1alpha1PriorityLevelConfiguration.discriminator = undefined; V1alpha1PriorityLevelConfiguration.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1alpha1PriorityLevelConfigurationSpec" }, { "name": "status", "baseName": "status", "type": "V1alpha1PriorityLevelConfigurationStatus" } ]; //# sourceMappingURL=v1alpha1PriorityLevelConfiguration.js.map /***/ }), /***/ 73101: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PriorityLevelConfigurationCondition = void 0; /** * PriorityLevelConfigurationCondition defines the condition of priority level. */ class V1alpha1PriorityLevelConfigurationCondition { static getAttributeTypeMap() { return V1alpha1PriorityLevelConfigurationCondition.attributeTypeMap; } } exports.V1alpha1PriorityLevelConfigurationCondition = V1alpha1PriorityLevelConfigurationCondition; V1alpha1PriorityLevelConfigurationCondition.discriminator = undefined; V1alpha1PriorityLevelConfigurationCondition.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=v1alpha1PriorityLevelConfigurationCondition.js.map /***/ }), /***/ 78760: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PriorityLevelConfigurationList = void 0; /** * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. */ class V1alpha1PriorityLevelConfigurationList { static getAttributeTypeMap() { return V1alpha1PriorityLevelConfigurationList.attributeTypeMap; } } exports.V1alpha1PriorityLevelConfigurationList = V1alpha1PriorityLevelConfigurationList; V1alpha1PriorityLevelConfigurationList.discriminator = undefined; V1alpha1PriorityLevelConfigurationList.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=v1alpha1PriorityLevelConfigurationList.js.map /***/ }), /***/ 3464: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PriorityLevelConfigurationReference = void 0; /** * PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. */ class V1alpha1PriorityLevelConfigurationReference { static getAttributeTypeMap() { return V1alpha1PriorityLevelConfigurationReference.attributeTypeMap; } } exports.V1alpha1PriorityLevelConfigurationReference = V1alpha1PriorityLevelConfigurationReference; V1alpha1PriorityLevelConfigurationReference.discriminator = undefined; V1alpha1PriorityLevelConfigurationReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" } ]; //# sourceMappingURL=v1alpha1PriorityLevelConfigurationReference.js.map /***/ }), /***/ 47008: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PriorityLevelConfigurationSpec = void 0; /** * PriorityLevelConfigurationSpec specifies the configuration of a priority level. */ class V1alpha1PriorityLevelConfigurationSpec { static getAttributeTypeMap() { return V1alpha1PriorityLevelConfigurationSpec.attributeTypeMap; } } exports.V1alpha1PriorityLevelConfigurationSpec = V1alpha1PriorityLevelConfigurationSpec; V1alpha1PriorityLevelConfigurationSpec.discriminator = undefined; V1alpha1PriorityLevelConfigurationSpec.attributeTypeMap = [ { "name": "limited", "baseName": "limited", "type": "V1alpha1LimitedPriorityLevelConfiguration" }, { "name": "type", "baseName": "type", "type": "string" } ]; //# sourceMappingURL=v1alpha1PriorityLevelConfigurationSpec.js.map /***/ }), /***/ 1850: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1PriorityLevelConfigurationStatus = void 0; /** * PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". */ class V1alpha1PriorityLevelConfigurationStatus { static getAttributeTypeMap() { return V1alpha1PriorityLevelConfigurationStatus.attributeTypeMap; } } exports.V1alpha1PriorityLevelConfigurationStatus = V1alpha1PriorityLevelConfigurationStatus; V1alpha1PriorityLevelConfigurationStatus.discriminator = undefined; V1alpha1PriorityLevelConfigurationStatus.attributeTypeMap = [ { "name": "conditions", "baseName": "conditions", "type": "Array" } ]; //# sourceMappingURL=v1alpha1PriorityLevelConfigurationStatus.js.map /***/ }), /***/ 62558: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1QueuingConfiguration = void 0; /** * QueuingConfiguration holds the configuration parameters for queuing */ class V1alpha1QueuingConfiguration { static getAttributeTypeMap() { return V1alpha1QueuingConfiguration.attributeTypeMap; } } exports.V1alpha1QueuingConfiguration = V1alpha1QueuingConfiguration; V1alpha1QueuingConfiguration.discriminator = undefined; V1alpha1QueuingConfiguration.attributeTypeMap = [ { "name": "handSize", "baseName": "handSize", "type": "number" }, { "name": "queueLengthLimit", "baseName": "queueLengthLimit", "type": "number" }, { "name": "queues", "baseName": "queues", "type": "number" } ]; //# sourceMappingURL=v1alpha1QueuingConfiguration.js.map /***/ }), /***/ 49471: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1ResourcePolicyRule = 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 V1alpha1ResourcePolicyRule { static getAttributeTypeMap() { return V1alpha1ResourcePolicyRule.attributeTypeMap; } } exports.V1alpha1ResourcePolicyRule = V1alpha1ResourcePolicyRule; V1alpha1ResourcePolicyRule.discriminator = undefined; V1alpha1ResourcePolicyRule.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=v1alpha1ResourcePolicyRule.js.map /***/ }), /***/ 45910: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 32036: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53079: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39479: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56871: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 66602: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41934: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 3593: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 12511: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 47647: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23984: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1ServiceAccountSubject = void 0; /** * ServiceAccountSubject holds detailed information for service-account-kind subject. */ class V1alpha1ServiceAccountSubject { static getAttributeTypeMap() { return V1alpha1ServiceAccountSubject.attributeTypeMap; } } exports.V1alpha1ServiceAccountSubject = V1alpha1ServiceAccountSubject; V1alpha1ServiceAccountSubject.discriminator = undefined; V1alpha1ServiceAccountSubject.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" } ]; //# sourceMappingURL=v1alpha1ServiceAccountSubject.js.map /***/ }), /***/ 54349: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 20058: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53792: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 20970: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 88064: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V1alpha1UserSubject = void 0; /** * UserSubject holds detailed information for user-kind subject. */ class V1alpha1UserSubject { static getAttributeTypeMap() { return V1alpha1UserSubject.attributeTypeMap; } } exports.V1alpha1UserSubject = V1alpha1UserSubject; V1alpha1UserSubject.discriminator = undefined; V1alpha1UserSubject.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" } ]; //# sourceMappingURL=v1alpha1UserSubject.js.map /***/ }), /***/ 88392: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49929: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23402: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49584: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94030: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39991: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 48676: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53943: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 44271: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 99792: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 43425: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7806: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7724: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 66666: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 29863: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23519: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 68738: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 24519: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 92663: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 37328: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 16242: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25978: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 16589: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 91864: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 97720: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 52843: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 63675: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34506: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 72413: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 58847: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 38268: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 21270: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9165: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 64672: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60049: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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" } ]; //# sourceMappingURL=v1beta1CronJobStatus.js.map /***/ }), /***/ 15358: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 9944: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18555: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49145: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87178: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 86145: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 52618: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18241: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67694: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41365: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13153: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 27347: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61730: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "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 /***/ }), /***/ 37085: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 7423: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34706: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98830: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 93967: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 64484: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 63533: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96254: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 1040: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 57091: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98441: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 30089: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 43801: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 58382: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84478: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 8076: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 51807: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 59514: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96831: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41330: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98895: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95359: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "V1TypedLocalObjectReference" } ]; //# sourceMappingURL=v1beta1IngressClassSpec.js.map /***/ }), /***/ 24695: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 75855: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56981: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 55914: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14010: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 8326: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 40541: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 59918: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74749: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 66991: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 4046: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14255: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 81655: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83111: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34396: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 43485: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 63931: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23257: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 84404: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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": "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 /***/ }), /***/ 44289: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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. */ 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 /***/ }), /***/ 90147: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 72683: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 2177: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 75714: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 59684: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 26149: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67813: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60270: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90435: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 42319: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10530: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 22546: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 62252: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 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.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5461: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 28787: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 51959: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 71667: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96916: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 2230: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74299: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 87497: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 65831: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31079: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 75281: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 8109: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 50769: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 49098: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34651: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 35033: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 90080: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 13129: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 14474: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 473: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 88465: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 2146: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 88931: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 46198: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 95797: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 31397: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 12802: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61521: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 15956: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 54910: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10285: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53523: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 11202: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 39491: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 20812: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18685: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 72711: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 72167: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 55473: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53805: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 94350: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53849: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 71688: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5710: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V2alpha1CronJob = void 0; /** * CronJob represents the configuration of a single cron job. */ class V2alpha1CronJob { static getAttributeTypeMap() { return V2alpha1CronJob.attributeTypeMap; } } exports.V2alpha1CronJob = V2alpha1CronJob; V2alpha1CronJob.discriminator = undefined; V2alpha1CronJob.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V2alpha1CronJobSpec" }, { "name": "status", "baseName": "status", "type": "V2alpha1CronJobStatus" } ]; //# sourceMappingURL=v2alpha1CronJob.js.map /***/ }), /***/ 98026: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V2alpha1CronJobList = void 0; /** * CronJobList is a collection of cron jobs. */ class V2alpha1CronJobList { static getAttributeTypeMap() { return V2alpha1CronJobList.attributeTypeMap; } } exports.V2alpha1CronJobList = V2alpha1CronJobList; V2alpha1CronJobList.discriminator = undefined; V2alpha1CronJobList.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=v2alpha1CronJobList.js.map /***/ }), /***/ 41784: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V2alpha1CronJobSpec = void 0; /** * CronJobSpec describes how the job execution will look like and when it will actually run. */ class V2alpha1CronJobSpec { static getAttributeTypeMap() { return V2alpha1CronJobSpec.attributeTypeMap; } } exports.V2alpha1CronJobSpec = V2alpha1CronJobSpec; V2alpha1CronJobSpec.discriminator = undefined; V2alpha1CronJobSpec.attributeTypeMap = [ { "name": "concurrencyPolicy", "baseName": "concurrencyPolicy", "type": "string" }, { "name": "failedJobsHistoryLimit", "baseName": "failedJobsHistoryLimit", "type": "number" }, { "name": "jobTemplate", "baseName": "jobTemplate", "type": "V2alpha1JobTemplateSpec" }, { "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=v2alpha1CronJobSpec.js.map /***/ }), /***/ 2411: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V2alpha1CronJobStatus = void 0; /** * CronJobStatus represents the current state of a cron job. */ class V2alpha1CronJobStatus { static getAttributeTypeMap() { return V2alpha1CronJobStatus.attributeTypeMap; } } exports.V2alpha1CronJobStatus = V2alpha1CronJobStatus; V2alpha1CronJobStatus.discriminator = undefined; V2alpha1CronJobStatus.attributeTypeMap = [ { "name": "active", "baseName": "active", "type": "Array" }, { "name": "lastScheduleTime", "baseName": "lastScheduleTime", "type": "Date" } ]; //# sourceMappingURL=v2alpha1CronJobStatus.js.map /***/ }), /***/ 3849: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.V2alpha1JobTemplateSpec = void 0; /** * JobTemplateSpec describes the data a Job should have when created from a template */ class V2alpha1JobTemplateSpec { static getAttributeTypeMap() { return V2alpha1JobTemplateSpec.attributeTypeMap; } } exports.V2alpha1JobTemplateSpec = V2alpha1JobTemplateSpec; V2alpha1JobTemplateSpec.discriminator = undefined; V2alpha1JobTemplateSpec.attributeTypeMap = [ { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1JobSpec" } ]; //# sourceMappingURL=v2alpha1JobTemplateSpec.js.map /***/ }), /***/ 37196: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 27287: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 79262: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 43128: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96606: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 74687: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89728: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89151: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 8786: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 66258: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 98064: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 25083: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 30639: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5950: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 18291: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 83162: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 10150: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 29521: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 53209: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 69602: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 85029: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 75145: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 12390: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 34096: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 33665: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 96952: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 41473: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 67231: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 29409: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 17298: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60715: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 73280: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 54941: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 5415: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 17383: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 61416: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 56126: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 60958: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 46865: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 78411: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 23137: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 849: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 17451: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.20.2 * * * NOTE: This class is auto generated 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 /***/ }), /***/ 89679: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(75636); tslib_1.__exportStar(__webpack_require__(14958), exports); tslib_1.__exportStar(__webpack_require__(5434), exports); tslib_1.__exportStar(__webpack_require__(56664), exports); tslib_1.__exportStar(__webpack_require__(61041), exports); tslib_1.__exportStar(__webpack_require__(7633), exports); tslib_1.__exportStar(__webpack_require__(62864), exports); tslib_1.__exportStar(__webpack_require__(32390), exports); tslib_1.__exportStar(__webpack_require__(74949), exports); tslib_1.__exportStar(__webpack_require__(18122), exports); tslib_1.__exportStar(__webpack_require__(44756), exports); tslib_1.__exportStar(__webpack_require__(88029), exports); tslib_1.__exportStar(__webpack_require__(23091), exports); tslib_1.__exportStar(__webpack_require__(12743), exports); tslib_1.__exportStar(__webpack_require__(54815), exports); tslib_1.__exportStar(__webpack_require__(91188), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 88029: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.makeInformer = exports.ERROR = exports.DELETE = exports.CHANGE = exports.UPDATE = exports.ADD = void 0; const cache_1 = __webpack_require__(5434); const watch_1 = __webpack_require__(7633); exports.ADD = 'add'; exports.UPDATE = 'update'; exports.CHANGE = 'change'; exports.DELETE = 'delete'; exports.ERROR = 'error'; function makeInformer(kubeconfig, path, listPromiseFn) { const watch = new watch_1.Watch(kubeconfig); return new cache_1.ListWatch(path, watch, listPromiseFn, false); } exports.makeInformer = makeInformer; //# sourceMappingURL=informer.js.map /***/ }), /***/ 44756: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Log = void 0; const tslib_1 = __webpack_require__(75636); const request = __webpack_require__(48699); class Log { constructor(config) { this.config = config; } log(namespace, podName, containerName, stream, done, options = {}) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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: Object.assign(Object.assign({}, options), { container: containerName }), uri: url, }; yield this.config.applyToRequest(requestOptions); const req = request(requestOptions, (error, response, body) => { if (error) { done(error); } else if (response && response.statusCode !== 200) { done(body); } else { done(null); } }).on('response', (response) => { if (response.statusCode === 200) { req.pipe(stream); } }); return req; }); } } exports.Log = Log; //# sourceMappingURL=log.js.map /***/ }), /***/ 12743: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.KubernetesObjectApi = void 0; const tslib_1 = __webpack_require__(75636); const request = __webpack_require__(48699); const api_1 = __webpack_require__(56664); /** * 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]]. */ create(spec, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // 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 = yield 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]]. */ delete(spec, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // 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 = yield 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]]. */ patch(spec, pretty, dryRun, fieldManager, force, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // 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 = yield 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]]. */ read(spec, pretty, exact, exportt, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // 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 = yield 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]]. */ replace(spec, pretty, dryRun, fieldManager, options = { headers: {} }) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // 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 = yield 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 */ specUriPath(spec, action) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = yield 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. */ resource(apiVersion, kind) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // 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 = yield 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. */ requestPromise(requestOptions, tipe = 'KubernetesObject') { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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)); } yield 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 /***/ }), /***/ 41691: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OpenIDConnectAuth = void 0; const tslib_1 = __webpack_require__(75636); const openid_client_1 = __webpack_require__(22881); const rfc4648_1 = __webpack_require__(3487); const util_1 = __webpack_require__(31669); 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 */ applyAuthentication(user, opts, overrideClient) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const token = yield this.getToken(user, overrideClient); if (token) { opts.headers.Authorization = `Bearer ${token}`; } }); } getToken(user, overrideClient) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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); }); } refresh(user, overrideClient) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 : yield this.getClient(user); const newToken = yield 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']; }); } getClient(user) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const oidcIssuer = yield 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 /***/ }), /***/ 91188: /***/ ((__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 /***/ }), /***/ 32390: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PortForward = void 0; const tslib_1 = __webpack_require__(75636); const querystring = __webpack_require__(71191); const util_1 = __webpack_require__(31669); const web_socket_handler_1 = __webpack_require__(47581); 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... portForward(namespace, podName, targetPorts, output, err, input, retryCount = 0) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = yield 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 /***/ }), /***/ 76023: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isResizable = exports.TerminalSizeQueue = void 0; const stream_1 = __webpack_require__(92413); class TerminalSizeQueue extends stream_1.Readable { constructor(opts = {}) { super(Object.assign(Object.assign({}, 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 /***/ }), /***/ 23091: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.topNodes = exports.NodeStatus = exports.ResourceUsage = void 0; const tslib_1 = __webpack_require__(75636); const util_1 = __webpack_require__(26318); 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; function topNodes(api) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // TODO: Support metrics APIs in the client and this library const nodes = yield 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 = yield 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 += cpuTotal.request; totalPodCPULimit += cpuTotal.limit; const memTotal = util_1.totalMemory(pod); totalPodMem += memTotal.request; 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 /***/ }), /***/ 74949: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); //# sourceMappingURL=types.js.map /***/ }), /***/ 26318: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.totalForResource = exports.totalMemory = exports.totalCPU = exports.ResourceStatus = exports.quantityToScalar = exports.podsForNode = void 0; const tslib_1 = __webpack_require__(75636); function podsForNode(api, nodeName) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const allPods = yield api.listPodForAllNamespaces(); return allPods.body.items.filter((pod) => pod.spec.nodeName === nodeName); }); } exports.podsForNode = podsForNode; function quantityToScalar(quantity) { if (!quantity) { return 0; } if (quantity.endsWith('m')) { return parseInt(quantity.substr(0, quantity.length - 1), 10) / 1000.0; } if (quantity.endsWith('Ki')) { return parseInt(quantity.substr(0, quantity.length - 2), 10) * 1024; } const num = parseInt(quantity, 10); if (isNaN(num)) { throw new Error('Unknown quantity ' + quantity); } return num; } 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 totalForResource(pod, resource) { let reqTotal = 0; let limitTotal = 0; pod.spec.containers.forEach((container) => { if (container.resources) { if (container.resources.requests) { reqTotal += quantityToScalar(container.resources.requests[resource]); } if (container.resources.limits) { limitTotal += quantityToScalar(container.resources.limits[resource]); } } }); return new ResourceStatus(reqTotal, limitTotal, resource); } exports.totalForResource = totalForResource; //# sourceMappingURL=util.js.map /***/ }), /***/ 7633: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Watch = exports.DefaultRequest = void 0; const tslib_1 = __webpack_require__(75636); const byline = __webpack_require__(29700); const request = __webpack_require__(48699); 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. watch(path, queryParams, callback, done) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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, }; yield 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 /***/ }), /***/ 47581: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.WebSocketHandler = void 0; const tslib_1 = __webpack_require__(75636); const WebSocket = __webpack_require__(64713); 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 processData(data, ws, createWS, streamNum = 0, retryCount = 3) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = yield 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(() => tslib_1.__awaiter(this, void 0, void 0, function* () { ws = yield 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. */ connect(path, textHandler, binaryHandler) { return tslib_1.__awaiter(this, void 0, void 0, function* () { 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 = {}; yield this.config.applytoHTTPSOptions(opts); return yield 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 /***/ }), /***/ 18122: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.dumpYaml = exports.loadAllYaml = exports.loadYaml = void 0; const yaml = __webpack_require__(21917); function loadYaml(data, opts) { return yaml.safeLoad(data, opts); } exports.loadYaml = loadYaml; function loadAllYaml(data, opts) { return yaml.safeLoadAll(data, undefined, opts); } exports.loadAllYaml = loadAllYaml; function dumpYaml(object, opts) { return yaml.safeDump(object, opts); } exports.dumpYaml = dumpYaml; //# sourceMappingURL=yaml.js.map /***/ }), /***/ 35132: /***/ ((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 {} /***/ }), /***/ 3006: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const oids = __webpack_require__(33875) module.exports = function () { this.seq().obj( this.key('algorithm').objid(oids), this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() }) ) } /***/ }), /***/ 19377: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const oids = __webpack_require__(33875) 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() ) } /***/ }), /***/ 77456: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const asn1 = __webpack_require__(39436) const types = new Map() const AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', __webpack_require__(3006)) types.set('AlgorithmIdentifier', AlgorithmIdentifier) const ECPrivateKey = asn1.define('ECPrivateKey', __webpack_require__(19377)) types.set('ECPrivateKey', ECPrivateKey) const PrivateKeyInfo = asn1.define('PrivateKeyInfo', __webpack_require__(37542)(AlgorithmIdentifier)) types.set('PrivateKeyInfo', PrivateKeyInfo) const PublicKeyInfo = asn1.define('PublicKeyInfo', __webpack_require__(26331)(AlgorithmIdentifier)) types.set('PublicKeyInfo', PublicKeyInfo) const PrivateKey = asn1.define('PrivateKey', __webpack_require__(10815)) types.set('PrivateKey', PrivateKey) const OneAsymmetricKey = asn1.define('OneAsymmetricKey', __webpack_require__(64800)(AlgorithmIdentifier, PrivateKey)) types.set('OneAsymmetricKey', OneAsymmetricKey) const RSAPrivateKey = asn1.define('RSAPrivateKey', __webpack_require__(83407)) types.set('RSAPrivateKey', RSAPrivateKey) const RSAPublicKey = asn1.define('RSAPublicKey', __webpack_require__(457)) types.set('RSAPublicKey', RSAPublicKey) module.exports = types /***/ }), /***/ 33875: /***/ ((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 /***/ }), /***/ 64800: /***/ ((module) => { module.exports = (AlgorithmIdentifier, PrivateKey) => function () { this.seq().obj( this.key('version').int(), this.key('algorithm').use(AlgorithmIdentifier), this.key('privateKey').use(PrivateKey) ) } /***/ }), /***/ 10815: /***/ ((module) => { module.exports = function () { this.octstr().contains().obj( this.key('privateKey').octstr() ) } /***/ }), /***/ 37542: /***/ ((module) => { module.exports = (AlgorithmIdentifier) => function () { this.seq().obj( this.key('version').int(), this.key('algorithm').use(AlgorithmIdentifier), this.key('privateKey').octstr() ) } /***/ }), /***/ 26331: /***/ ((module) => { module.exports = AlgorithmIdentifier => function () { this.seq().obj( this.key('algorithm').use(AlgorithmIdentifier), this.key('publicKey').bitstr() ) } /***/ }), /***/ 83407: /***/ ((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() ) } /***/ }), /***/ 457: /***/ ((module) => { module.exports = function () { this.seq().obj( this.key('n').int(), this.key('e').int() ) } /***/ }), /***/ 93312: /***/ ((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 /***/ }), /***/ 62928: /***/ ((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 /***/ }), /***/ 52083: /***/ ((module) => { module.exports = obj => JSON.parse(JSON.stringify(obj)) /***/ }), /***/ 64575: /***/ ((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 } /***/ }), /***/ 33773: /***/ ((module) => { module.exports = (date) => Math.floor(date.getTime() / 1000) /***/ }), /***/ 3796: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(76417) const { IVLENGTHS } = __webpack_require__(47359) module.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8) /***/ }), /***/ 7090: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const errors = __webpack_require__(35132) const Key = __webpack_require__(99795) const importKey = __webpack_require__(77722) const { KeyStore } = __webpack_require__(44201) 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) } } /***/ }), /***/ 48899: /***/ ((module) => { module.exports = (a = {}, b = {}) => { const keysA = Object.keys(a) const keysB = new Set(Object.keys(b)) return !keysA.some((ka) => keysB.has(ka)) } /***/ }), /***/ 50243: /***/ ((module) => { module.exports = a => !!a && a.constructor === Object /***/ }), /***/ 31032: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { keyObjectSupported } = __webpack_require__(57494) let createPublicKey let createPrivateKey let createSecretKey let KeyObject let asInput if (keyObjectSupported) { ({ createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __webpack_require__(76417)) asInput = (input) => input } else { const { EOL } = __webpack_require__(12087) const errors = __webpack_require__(35132) const isObject = __webpack_require__(50243) const asn1 = __webpack_require__(77456) 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 } /***/ }), /***/ 65394: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { EOL } = __webpack_require__(12087) const errors = __webpack_require__(35132) const { keyObjectSupported } = __webpack_require__(57494) const { createPublicKey } = __webpack_require__(31032) const base64url = __webpack_require__(93312) const asn1 = __webpack_require__(77456) const computePrimes = __webpack_require__(4438) const { OKP_CURVES, EC_CURVES } = __webpack_require__(47359) 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) } /***/ }), /***/ 81942: /***/ ((module) => { module.exports = alg => `sha${alg.substr(2, 3)}` /***/ }), /***/ 4438: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(76417) const base64url = __webpack_require__(93312) const errors = __webpack_require__(35132) 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) } } /***/ }), /***/ 57494: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { diffieHellman, KeyObject, sign, verify } = __webpack_require__(76417) 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 } /***/ }), /***/ 84096: /***/ ((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) } } /***/ }), /***/ 15300: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { timingSafeEqual: TSE } = __webpack_require__(76417) 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 /***/ }), /***/ 82267: /***/ ((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 } /***/ }), /***/ 85822: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { JOSECritNotUnderstood, JWSInvalid } = __webpack_require__(35132) 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') } } /***/ }), /***/ 87115: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { JWE: __webpack_require__(22307), JWK: __webpack_require__(2297), JWKS: __webpack_require__(27397), JWS: __webpack_require__(49830), JWT: __webpack_require__(40449), errors: __webpack_require__(35132) } /***/ }), /***/ 26468: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createCipheriv, createDecipheriv, getCiphers } = __webpack_require__(76417) const uint64be = __webpack_require__(82267) const timingSafeEqual = __webpack_require__(15300) const { KEYOBJECT } = __webpack_require__(62928) const { JWEInvalid, JWEDecryptionFailed } = __webpack_require__(35132) 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 } }) } /***/ }), /***/ 69480: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createCipheriv, createDecipheriv, getCiphers } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const { JWEInvalid, JWEDecryptionFailed } = __webpack_require__(35132) const { asInput } = __webpack_require__(31032) 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 } }) } /***/ }), /***/ 15066: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const generateIV = __webpack_require__(3796) const base64url = __webpack_require__(93312) 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 } }) } /***/ }), /***/ 50253: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createCipheriv, createDecipheriv, getCiphers } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const { asInput } = __webpack_require__(31032) 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 } }) } /***/ }), /***/ 53791: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { improvedDH } = __webpack_require__(57494) if (improvedDH) { const { diffieHellman } = __webpack_require__(76417) const { KeyObject } = __webpack_require__(31032) const importKey = __webpack_require__(77722) module.exports = ({ keyObject: privateKey }, publicKey) => { if (!(publicKey instanceof KeyObject)) { ({ keyObject: publicKey } = importKey(publicKey)) } return diffieHellman({ privateKey, publicKey }) } } else { const { createECDH, constants: { POINT_CONVERSION_UNCOMPRESSED } } = __webpack_require__(76417) const base64url = __webpack_require__(93312) 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)) } } /***/ }), /***/ 95320: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHash } = __webpack_require__(76417) const ecdhComputeSecret = __webpack_require__(53791) 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) } /***/ }), /***/ 99214: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { improvedDH } = __webpack_require__(57494) const { KEYLENGTHS } = __webpack_require__(47359) const { generateSync } = __webpack_require__(87042) const derive = __webpack_require__(95320) 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') } } /***/ }), /***/ 4363: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { improvedDH } = __webpack_require__(57494) const { KEYOBJECT } = __webpack_require__(62928) const { generateSync } = __webpack_require__(87042) const { ECDH_DERIVE_LENGTHS } = __webpack_require__(47359) const derive = __webpack_require__(95320) 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 /***/ }), /***/ 92251: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = __webpack_require__(76417) const { derToJose, joseToDer } = __webpack_require__(64575) const { KEYOBJECT } = __webpack_require__(62928) const resolveNodeAlg = __webpack_require__(81942) const { asInput } = __webpack_require__(31032) const { dsaEncodingSupported } = __webpack_require__(57494) 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 }) } /***/ }), /***/ 81448: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { sign: signOneShot, verify: verifyOneShot } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const { edDSASupported } = __webpack_require__(57494) 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') } } /***/ }), /***/ 71367: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHmac } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const timingSafeEqual = __webpack_require__(15300) const resolveNodeAlg = __webpack_require__(81942) const { asInput } = __webpack_require__(31032) 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 }) } /***/ }), /***/ 40423: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { JWKKeySupport, JOSENotSupported } = __webpack_require__(35132) const { KEY_MANAGEMENT_ENCRYPT, KEY_MANAGEMENT_DECRYPT } = __webpack_require__(62928) const { JWA, JWK } = __webpack_require__(47359) // sign, verify __webpack_require__(71367)(JWA, JWK) __webpack_require__(92251)(JWA, JWK) __webpack_require__(81448)(JWA, JWK) __webpack_require__(90112)(JWA, JWK) __webpack_require__(75778)(JWA, JWK) __webpack_require__(62875)(JWA) // encrypt, decrypt __webpack_require__(26468)(JWA, JWK) __webpack_require__(69480)(JWA, JWK) // wrapKey, unwrapKey __webpack_require__(4061)(JWA, JWK) __webpack_require__(50253)(JWA, JWK) __webpack_require__(15066)(JWA, JWK) // deriveKey __webpack_require__(41613)(JWA, JWK) __webpack_require__(99214)(JWA, JWK) __webpack_require__(4363)(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) } } /***/ }), /***/ 62875: /***/ ((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) } /***/ }), /***/ 41613: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { pbkdf2Sync: pbkdf2, randomBytes } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const base64url = __webpack_require__(93312) 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 } }) } /***/ }), /***/ 4061: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { publicEncrypt, privateDecrypt, constants } = __webpack_require__(76417) const { oaepHashSupported } = __webpack_require__(57494) const { KEYOBJECT } = __webpack_require__(62928) const { asInput } = __webpack_require__(31032) 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] }) } /***/ }), /***/ 75778: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createSign, createVerify } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const resolveNodeAlg = __webpack_require__(81942) const { asInput } = __webpack_require__(31032) 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] }) } /***/ }), /***/ 90112: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createSign, createVerify, constants } = __webpack_require__(76417) const { KEYOBJECT } = __webpack_require__(62928) const resolveNodeAlg = __webpack_require__(81942) const { asInput } = __webpack_require__(31032) 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] }) } /***/ }), /***/ 20087: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inflateRawSync } = __webpack_require__(78761) const base64url = __webpack_require__(93312) const getKey = __webpack_require__(7090) const { KeyStore } = __webpack_require__(27397) const errors = __webpack_require__(35132) const { check, decrypt, keyManagementDecrypt } = __webpack_require__(40423) const JWK = __webpack_require__(2297) const { createSecretKey } = __webpack_require__(31032) const generateCEK = __webpack_require__(22329) const validateHeaders = __webpack_require__(77997) const { detect: resolveSerialization } = __webpack_require__(14609) 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) /***/ }), /***/ 47154: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { deflateRawSync } = __webpack_require__(78761) const { KEYOBJECT } = __webpack_require__(62928) const generateIV = __webpack_require__(3796) const base64url = __webpack_require__(93312) const getKey = __webpack_require__(7090) const isObject = __webpack_require__(50243) const { createSecretKey } = __webpack_require__(31032) const deepClone = __webpack_require__(52083) const importKey = __webpack_require__(77722) const { JWEInvalid } = __webpack_require__(35132) const { check, keyManagementEncrypt, encrypt } = __webpack_require__(40423) const serializers = __webpack_require__(14609) const generateCEK = __webpack_require__(22329) const validateHeaders = __webpack_require__(77997) 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 /***/ }), /***/ 22329: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(76417) const { createSecretKey } = __webpack_require__(31032) const { KEYLENGTHS } = __webpack_require__(47359) const Key = __webpack_require__(14591) 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 }) } /***/ }), /***/ 22307: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Encrypt = __webpack_require__(47154) const decrypt = __webpack_require__(20087) 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 /***/ }), /***/ 14609: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(50243) let validateCrit = __webpack_require__(85822) const { JWEInvalid } = __webpack_require__(35132) 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 } /***/ }), /***/ 77997: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isDisjoint = __webpack_require__(48899) const base64url = __webpack_require__(93312) let validateCrit = __webpack_require__(85822) const { JWEInvalid, JOSENotSupported } = __webpack_require__(35132) 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] } /***/ }), /***/ 87042: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const errors = __webpack_require__(35132) const importKey = __webpack_require__(77722) const RSAKey = __webpack_require__(52679) const ECKey = __webpack_require__(36582) const OKPKey = __webpack_require__(8658) const OctKey = __webpack_require__(14591) 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 /***/ }), /***/ 77722: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __webpack_require__(31032) const base64url = __webpack_require__(93312) const isObject = __webpack_require__(50243) const { jwkToPem } = __webpack_require__(65394) const errors = __webpack_require__(35132) const RSAKey = __webpack_require__(52679) const ECKey = __webpack_require__(36582) const OKPKey = __webpack_require__(8658) const OctKey = __webpack_require__(14591) 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 /***/ }), /***/ 2297: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Key = __webpack_require__(99795) const None = __webpack_require__(48114) const EmbeddedJWK = __webpack_require__(59116) const EmbeddedX5C = __webpack_require__(79313) const importKey = __webpack_require__(77722) const generate = __webpack_require__(87042) module.exports = { ...generate, asKey: importKey, isKey: input => input instanceof Key, None, EmbeddedJWK, EmbeddedX5C } /***/ }), /***/ 99795: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { strict: assert } = __webpack_require__(42357) const { inspect } = __webpack_require__(31669) const { EOL } = __webpack_require__(12087) const { keyObjectSupported } = __webpack_require__(57494) const { createPublicKey } = __webpack_require__(31032) const { keyObjectToJWK } = __webpack_require__(65394) const { THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, JWK_MEMBERS, KEYOBJECT, USES_MAPPING, OPS, USES } = __webpack_require__(62928) const isObject = __webpack_require__(50243) const thumbprint = __webpack_require__(89020) const errors = __webpack_require__(35132) const privateApi = Symbol('privateApi') const { JWK } = __webpack_require__(47359) 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 /***/ }), /***/ 36582: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { generateKeyPairSync, generateKeyPair: async } = __webpack_require__(76417) const { promisify } = __webpack_require__(31669) const { THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT } = __webpack_require__(62928) const { EC_CURVES } = __webpack_require__(47359) const { keyObjectSupported } = __webpack_require__(57494) const { createPublicKey, createPrivateKey } = __webpack_require__(31032) const errors = __webpack_require__(35132) const Key = __webpack_require__(99795) 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 /***/ }), /***/ 59116: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const Key = __webpack_require__(99795) 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() /***/ }), /***/ 79313: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const Key = __webpack_require__(99795) 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() /***/ }), /***/ 48114: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const Key = __webpack_require__(99795) 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() /***/ }), /***/ 14591: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(76417) const { createSecretKey } = __webpack_require__(31032) const base64url = __webpack_require__(93312) const { THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT, KEYOBJECT } = __webpack_require__(62928) const Key = __webpack_require__(99795) 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 /***/ }), /***/ 8658: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { generateKeyPairSync, generateKeyPair: async } = __webpack_require__(76417) const { promisify } = __webpack_require__(31669) const { THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT } = __webpack_require__(62928) const { OKP_CURVES } = __webpack_require__(47359) const { edDSASupported } = __webpack_require__(57494) const errors = __webpack_require__(35132) const Key = __webpack_require__(99795) 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 /***/ }), /***/ 52679: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { generateKeyPairSync, generateKeyPair: async } = __webpack_require__(76417) const { promisify } = __webpack_require__(31669) const { THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT } = __webpack_require__(62928) const { keyObjectSupported } = __webpack_require__(57494) const { createPublicKey, createPrivateKey } = __webpack_require__(31032) const Key = __webpack_require__(99795) 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 /***/ }), /***/ 89020: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHash } = __webpack_require__(76417) const base64url = __webpack_require__(93312) 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') /***/ }), /***/ 27397: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const KeyStore = __webpack_require__(44201) module.exports = KeyStore /***/ }), /***/ 44201: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const isObject = __webpack_require__(50243) const { generate, generateSync } = __webpack_require__(87042) const { USES_MAPPING } = __webpack_require__(62928) const { isKey, asKey: importKey } = __webpack_require__(2297) 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 } /***/ }), /***/ 49830: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Sign = __webpack_require__(81194) const { verify } = __webpack_require__(45057) 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 /***/ }), /***/ 21708: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(50243) let validateCrit = __webpack_require__(85822) const { JWSInvalid } = __webpack_require__(35132) 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 } /***/ }), /***/ 81194: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const base64url = __webpack_require__(93312) const isDisjoint = __webpack_require__(48899) const isObject = __webpack_require__(50243) const deepClone = __webpack_require__(52083) const { JWSInvalid } = __webpack_require__(35132) const { sign } = __webpack_require__(40423) const getKey = __webpack_require__(7090) const serializers = __webpack_require__(21708) 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 /***/ }), /***/ 45057: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { EOL } = __webpack_require__(12087) const base64url = __webpack_require__(93312) const isDisjoint = __webpack_require__(48899) const isObject = __webpack_require__(50243) let validateCrit = __webpack_require__(85822) const getKey = __webpack_require__(7090) const { KeyStore } = __webpack_require__(27397) const errors = __webpack_require__(35132) const { check, verify } = __webpack_require__(40423) const JWK = __webpack_require__(2297) const { detect: resolveSerialization } = __webpack_require__(21708) 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) } /***/ }), /***/ 85955: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const base64url = __webpack_require__(93312) const errors = __webpack_require__(35132) 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') } } /***/ }), /***/ 40449: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const decode = __webpack_require__(85955) const sign = __webpack_require__(82011) const verify = __webpack_require__(88493) const profiles = __webpack_require__(52651) module.exports = { sign, verify, ...profiles } Object.defineProperty(module.exports, "decode", ({ enumerable: false, configurable: true, value: decode })) /***/ }), /***/ 52651: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { JWTClaimInvalid } = __webpack_require__(35132) const secs = __webpack_require__(84096) const epoch = __webpack_require__(33773) const isObject = __webpack_require__(50243) const verify = __webpack_require__(88493) const { isString, isRequired, isTimestamp, isStringOrArrayOfStrings } = __webpack_require__(29051) 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 }) /***/ }), /***/ 29051: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { JWTClaimInvalid } = __webpack_require__(35132) 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 } /***/ }), /***/ 82011: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(50243) const secs = __webpack_require__(84096) const epoch = __webpack_require__(33773) const getKey = __webpack_require__(7090) const JWS = __webpack_require__(49830) const isString = __webpack_require__(29051).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 }) } /***/ }), /***/ 88493: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(50243) const epoch = __webpack_require__(33773) const secs = __webpack_require__(84096) const getKey = __webpack_require__(7090) const { bare: verify } = __webpack_require__(45057) const { JWTClaimInvalid, JWTExpired } = __webpack_require__(35132) const { isString, isNotString, isNotArrayOfStrings, isTimestamp, isStringOrArrayOfStrings } = __webpack_require__(29051) const decode = __webpack_require__(85955) 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 } /***/ }), /***/ 91071: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { getCurves } = __webpack_require__(76417) 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 /***/ }), /***/ 81645: /***/ ((module) => { module.exports = new Map() /***/ }), /***/ 47359: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const EC_CURVES = __webpack_require__(91071) const IVLENGTHS = __webpack_require__(70589) const JWA = __webpack_require__(22198) const JWK = __webpack_require__(11648) const KEYLENGTHS = __webpack_require__(62244) const OKP_CURVES = __webpack_require__(52438) const ECDH_DERIVE_LENGTHS = __webpack_require__(81645) module.exports = { EC_CURVES, ECDH_DERIVE_LENGTHS, IVLENGTHS, JWA, JWK, KEYLENGTHS, OKP_CURVES } /***/ }), /***/ 70589: /***/ ((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] ]) /***/ }), /***/ 22198: /***/ ((module) => { module.exports = { sign: new Map(), verify: new Map(), keyManagementEncrypt: new Map(), keyManagementDecrypt: new Map(), encrypt: new Map(), decrypt: new Map() } /***/ }), /***/ 11648: /***/ ((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: {} } } /***/ }), /***/ 62244: /***/ ((module) => { module.exports = new Map([ ['A128CBC-HS256', 256], ['A128GCM', 128], ['A192CBC-HS384', 384], ['A192GCM', 192], ['A256CBC-HS512', 512], ['A256GCM', 256] ]) /***/ }), /***/ 52438: /***/ ((module) => { const curves = new Set(['Ed25519']) if (!('electron' in process.versions)) { curves.add('Ed448') curves.add('X25519') curves.add('X448') } module.exports = curves /***/ }), /***/ 49609: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable max-classes-per-file */ const { inspect } = __webpack_require__(31669); const stdhttp = __webpack_require__(98605); const crypto = __webpack_require__(76417); const { strict: assert } = __webpack_require__(42357); const querystring = __webpack_require__(71191); const url = __webpack_require__(78835); const { ParseError } = __webpack_require__(93061); const jose = __webpack_require__(87115); const tokenHash = __webpack_require__(80028); const base64url = __webpack_require__(23570); const defaults = __webpack_require__(44129); const { assertSigningAlgValuesSupport, assertIssuerConfiguration } = __webpack_require__(68973); const pick = __webpack_require__(70260); const isPlainObject = __webpack_require__(89717); const processResponse = __webpack_require__(59980); const TokenSet = __webpack_require__(14974); const { OPError, RPError } = __webpack_require__(31151); const now = __webpack_require__(24393); const { random } = __webpack_require__(65894); const request = __webpack_require__(8048); const { CALLBACK_PROPERTIES, CLIENT_DEFAULTS, JWT_CONTENT, CLOCK_TOLERANCE, } = __webpack_require__(6144); const issuerRegistry = __webpack_require__(70011); const instance = __webpack_require__(69020); const { authenticatedPost, resolveResponseType, resolveRedirectUri } = __webpack_require__(26633); const DeviceFlowHandle = __webpack_require__(60679); 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) { 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, tokenType = accessToken instanceof TokenSet ? accessToken.token_type : 'Bearer', DPoP, } = {}, ) { 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, }, { 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); } 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 ? 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 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) { 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(), ...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. 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); }, }); /** * @name pushedAuthorizationRequest * @api public */ async function 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; } Object.defineProperty(BaseClient.prototype, 'pushedAuthorizationRequest', { enumerable: true, configurable: true, value(...args) { process.emitWarning( 'The Pushed Authorization Requests APIs implements an IETF 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, 'pushedAuthorizationRequest', { enumerable: true, configurable: true, value: pushedAuthorizationRequest, }); return this.pushedAuthorizationRequest(...args); }, }); module.exports.BaseClient = BaseClient; /***/ }), /***/ 60679: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable camelcase */ const { inspect } = __webpack_require__(31669); const { RPError, OPError } = __webpack_require__(31151); const instance = __webpack_require__(69020); const now = __webpack_require__(24393); const { authenticatedPost } = __webpack_require__(26633); const processResponse = __webpack_require__(59980); const TokenSet = __webpack_require__(14974); 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; /***/ }), /***/ 31151: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable camelcase */ const { format } = __webpack_require__(31669); const makeError = __webpack_require__(21381); 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, }; /***/ }), /***/ 68973: /***/ ((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, }; /***/ }), /***/ 23570: /***/ ((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; /***/ }), /***/ 26633: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const jose = __webpack_require__(87115); const { assertIssuerConfiguration } = __webpack_require__(68973); const { random } = __webpack_require__(65894); const now = __webpack_require__(24393); const request = __webpack_require__(8048); const instance = __webpack_require__(69020); const merge = __webpack_require__(71839); 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 }); } 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, }; /***/ }), /***/ 6144: /***/ ((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, }; /***/ }), /***/ 85618: /***/ ((module) => { module.exports = (obj) => JSON.parse(JSON.stringify(obj)); /***/ }), /***/ 44129: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable no-restricted-syntax, no-continue */ const isPlainObject = __webpack_require__(89717); 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); /***/ }), /***/ 65894: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHash, randomBytes } = __webpack_require__(76417); const base64url = __webpack_require__(23570); 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()), }; /***/ }), /***/ 61758: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const url = __webpack_require__(78835); const { strict: assert } = __webpack_require__(42357); 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'); } }; /***/ }), /***/ 89717: /***/ ((module) => { module.exports = (a) => !!a && a.constructor === Object; /***/ }), /***/ 71839: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable no-restricted-syntax, no-param-reassign, no-continue */ const isPlainObject = __webpack_require__(89717); 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; /***/ }), /***/ 70260: /***/ ((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; }; /***/ }), /***/ 59980: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { STATUS_CODES } = __webpack_require__(98605); const { format } = __webpack_require__(31669); const { OPError } = __webpack_require__(31151); 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; /***/ }), /***/ 8048: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Got = __webpack_require__(93061); const pkg = __webpack_require__(87932); const { deep: defaultsDeep } = __webpack_require__(44129); const isAbsoluteUrl = __webpack_require__(61758); const { HTTP_OPTIONS } = __webpack_require__(6144); 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, { 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); } 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; /***/ }), /***/ 24393: /***/ ((module) => { module.exports = () => Math.floor(Date.now() / 1000); /***/ }), /***/ 69020: /***/ ((module) => { const privateProps = new WeakMap(); module.exports = (ctx) => { if (!privateProps.has(ctx)) { privateProps.set(ctx, new Map([['metadata', new Map()]])); } return privateProps.get(ctx); }; /***/ }), /***/ 10304: /***/ ((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; /***/ }), /***/ 22881: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Issuer = __webpack_require__(14470); const { OPError, RPError } = __webpack_require__(31151); const Registry = __webpack_require__(70011); const Strategy = __webpack_require__(84114); const TokenSet = __webpack_require__(14974); const { CLOCK_TOLERANCE, HTTP_OPTIONS } = __webpack_require__(6144); const generators = __webpack_require__(65894); const { setDefaults } = __webpack_require__(8048); module.exports = { Issuer, Registry, Strategy, TokenSet, errors: { OPError, RPError, }, custom: { setHttpOptionsDefaults: setDefaults, http_options: HTTP_OPTIONS, clock_tolerance: CLOCK_TOLERANCE, }, generators, }; /***/ }), /***/ 14470: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable max-classes-per-file */ const { inspect } = __webpack_require__(31669); const url = __webpack_require__(78835); const AggregateError = __webpack_require__(61231); const jose = __webpack_require__(87115); const LRU = __webpack_require__(7129); const objectHash = __webpack_require__(24856); const { RPError } = __webpack_require__(31151); const getClient = __webpack_require__(49609); const registry = __webpack_require__(70011); const processResponse = __webpack_require__(59980); const webfingerNormalize = __webpack_require__(10304); const instance = __webpack_require__(69020); const request = __webpack_require__(8048); const { assertIssuerConfiguration } = __webpack_require__(68973); const { ISSUER_DEFAULTS, OIDC_DISCOVERY, OAUTH2_DISCOVERY, WEBFINGER, REL, AAD_MULTITENANT_DISCOVERY, } = __webpack_require__(6144); 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; /***/ }), /***/ 70011: /***/ ((module) => { const REGISTRY = new Map(); module.exports = REGISTRY; /***/ }), /***/ 84114: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable no-underscore-dangle */ const url = __webpack_require__(78835); const { format } = __webpack_require__(31669); const cloneDeep = __webpack_require__(85618); const { RPError, OPError } = __webpack_require__(31151); const { BaseClient } = __webpack_require__(49609); const { random, codeChallenge } = __webpack_require__(65894); const pick = __webpack_require__(70260); const { resolveResponseType, resolveRedirectUri } = __webpack_require__(26633); 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; /***/ }), /***/ 14974: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const base64url = __webpack_require__(23570); const now = __webpack_require__(24393); 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; /***/ }), /***/ 39436: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { define } = __webpack_require__(93998) const base = __webpack_require__(33318) const constants = __webpack_require__(90998) const decoders = __webpack_require__(5017) const encoders = __webpack_require__(2246) module.exports = { base, constants, decoders, define, encoders } /***/ }), /***/ 93998: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inherits } = __webpack_require__(31669) const encoders = __webpack_require__(2246) const decoders = __webpack_require__(5017) 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) } /***/ }), /***/ 28424: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inherits } = __webpack_require__(31669) const { Reporter } = __webpack_require__(93026) 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 } /***/ }), /***/ 33318: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { Reporter } = __webpack_require__(93026) const { DecoderBuffer, EncoderBuffer } = __webpack_require__(28424) const Node = __webpack_require__(48674) module.exports = { DecoderBuffer, EncoderBuffer, Node, Reporter } /***/ }), /***/ 48674: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { strict: assert } = __webpack_require__(42357) const { Reporter } = __webpack_require__(93026) const { DecoderBuffer, EncoderBuffer } = __webpack_require__(28424) // 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 /***/ }), /***/ 93026: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { const { inherits } = __webpack_require__(31669) 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 /***/ }), /***/ 96018: /***/ ((__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) /***/ }), /***/ 90998: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { der: __webpack_require__(96018) } /***/ }), /***/ 44798: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* global BigInt */ const { inherits } = __webpack_require__(31669) const { DecoderBuffer } = __webpack_require__(28424) const Node = __webpack_require__(48674) // Import DER constants const der = __webpack_require__(96018) 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 /***/ }), /***/ 5017: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { der: __webpack_require__(44798), pem: __webpack_require__(33956) } /***/ }), /***/ 33956: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inherits } = __webpack_require__(31669) const DERDecoder = __webpack_require__(44798) 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 /***/ }), /***/ 20846: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* global BigInt */ const { inherits } = __webpack_require__(31669) const Node = __webpack_require__(48674) const der = __webpack_require__(96018) 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 /***/ }), /***/ 2246: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { der: __webpack_require__(20846), pem: __webpack_require__(26217) } /***/ }), /***/ 26217: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inherits } = __webpack_require__(31669) const DEREncoder = __webpack_require__(20846) 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 /***/ }), /***/ 75696: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const atob = __webpack_require__(84732); const btoa = __webpack_require__(50012); module.exports = { atob, btoa }; /***/ }), /***/ 84732: /***/ ((module) => { "use strict"; /** * Implementation of atob() according to the HTML and Infra specs, except that * instead of throwing INVALID_CHARACTER_ERR we return null. */ function atob(data) { // Web IDL requires DOMStrings to just be converted using ECMAScript // ToString, which in our case amounts to using a template literal. data = `${data}`; // "Remove all ASCII whitespace from data." data = data.replace(/[ \t\n\f\r]/g, ""); // "If data's length divides by 4 leaving no remainder, then: if data ends // with one or two U+003D (=) code points, then remove them from data." if (data.length % 4 === 0) { data = data.replace(/==?$/, ""); } // "If data's length divides by 4 leaving a remainder of 1, then return // failure." // // "If data contains a code point that is not one of // // U+002B (+) // U+002F (/) // ASCII alphanumeric // // then return failure." if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) { return null; } // "Let output be an empty byte sequence." let output = ""; // "Let buffer be an empty buffer that can have bits appended to it." // // We append bits via left-shift and or. accumulatedBits is used to track // when we've gotten to 24 bits. let buffer = 0; let accumulatedBits = 0; // "Let position be a position variable for data, initially pointing at the // start of data." // // "While position does not point past the end of data:" for (let i = 0; i < data.length; i++) { // "Find the code point pointed to by position in the second column of // Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in // the first cell of the same row. // // "Append to buffer the six bits corresponding to n, most significant bit // first." // // atobLookup() implements the table from RFC 4648. buffer <<= 6; buffer |= atobLookup(data[i]); accumulatedBits += 6; // "If buffer has accumulated 24 bits, interpret them as three 8-bit // big-endian numbers. Append three bytes with values equal to those // numbers to output, in the same order, and then empty buffer." if (accumulatedBits === 24) { output += String.fromCharCode((buffer & 0xff0000) >> 16); output += String.fromCharCode((buffer & 0xff00) >> 8); output += String.fromCharCode(buffer & 0xff); buffer = accumulatedBits = 0; } // "Advance position by 1." } // "If buffer is not empty, it contains either 12 or 18 bits. If it contains // 12 bits, then discard the last four and interpret the remaining eight as // an 8-bit big-endian number. If it contains 18 bits, then discard the last // two and interpret the remaining 16 as two 8-bit big-endian numbers. Append // the one or two bytes with values equal to those one or two numbers to // output, in the same order." if (accumulatedBits === 12) { buffer >>= 4; output += String.fromCharCode(buffer); } else if (accumulatedBits === 18) { buffer >>= 2; output += String.fromCharCode((buffer & 0xff00) >> 8); output += String.fromCharCode(buffer & 0xff); } // "Return output." return output; } /** * A lookup table for atob(), which converts an ASCII character to the * corresponding six-bit number. */ const keystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function atobLookup(chr) { const index = keystr.indexOf(chr); // Throw exception if character is not in the lookup string; should not be hit in tests return index < 0 ? undefined : index; } module.exports = atob; /***/ }), /***/ 50012: /***/ ((module) => { "use strict"; /** * btoa() as defined by the HTML and Infra specs, which mostly just references * RFC 4648. */ function btoa(s) { let i; // String conversion as required by Web IDL. s = `${s}`; // "The btoa() method must throw an "InvalidCharacterError" DOMException if // data contains any character whose code point is greater than U+00FF." for (i = 0; i < s.length; i++) { if (s.charCodeAt(i) > 255) { return null; } } let out = ""; for (i = 0; i < s.length; i += 3) { const groupsOfSix = [undefined, undefined, undefined, undefined]; groupsOfSix[0] = s.charCodeAt(i) >> 2; groupsOfSix[1] = (s.charCodeAt(i) & 0x03) << 4; if (s.length > i + 1) { groupsOfSix[1] |= s.charCodeAt(i + 1) >> 4; groupsOfSix[2] = (s.charCodeAt(i + 1) & 0x0f) << 2; } if (s.length > i + 2) { groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6; groupsOfSix[3] = s.charCodeAt(i + 2) & 0x3f; } for (let j = 0; j < groupsOfSix.length; j++) { if (typeof groupsOfSix[j] === "undefined") { out += "="; } else { out += btoaLookup(groupsOfSix[j]); } } } return out; } /** * Lookup table for btoa(), which converts a six-bit number into the * corresponding ASCII character. */ const keystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function btoaLookup(index) { if (index >= 0 && index < 64) { return keystr[index]; } // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the tests. return undefined; } module.exports = btoa; /***/ }), /***/ 61231: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const indentString = __webpack_require__(98043); const cleanStack = __webpack_require__(27972); 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; /***/ }), /***/ 64941: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var compileSchema = __webpack_require__(875) , resolve = __webpack_require__(63896) , Cache = __webpack_require__(93679) , SchemaObject = __webpack_require__(37605) , stableStringify = __webpack_require__(30969) , formats = __webpack_require__(66627) , rules = __webpack_require__(68561) , $dataMetaSchema = __webpack_require__(21412) , util = __webpack_require__(76578); 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 = __webpack_require__(80890); var customKeyword = __webpack_require__(53297); Ajv.prototype.addKeyword = customKeyword.add; Ajv.prototype.getKeyword = customKeyword.get; Ajv.prototype.removeKeyword = customKeyword.remove; Ajv.prototype.validateKeyword = customKeyword.validate; var errorClasses = __webpack_require__(25726); 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 = {}; }; /***/ }), /***/ 80890: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var MissingRefError = __webpack_require__(25726).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]; } } } } /***/ }), /***/ 25726: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var resolve = __webpack_require__(63896); 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; } /***/ }), /***/ 66627: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var util = __webpack_require__(76578); 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-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-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; } } /***/ }), /***/ 875: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var resolve = __webpack_require__(63896) , util = __webpack_require__(76578) , errorClasses = __webpack_require__(25726) , stableStringify = __webpack_require__(30969); var validateGenerator = __webpack_require__(49585); /** * Functions below are used inside compiled validations function */ var ucs2length = util.ucs2length; var equal = __webpack_require__(28206); // 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 = __webpack_require__(70020) , equal = __webpack_require__(28206) , util = __webpack_require__(76578) , SchemaObject = __webpack_require__(37605) , traverse = __webpack_require__(52533); 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 = __webpack_require__(85810) , toHash = __webpack_require__(76578).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; }; /***/ }), /***/ 37605: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var util = __webpack_require__(76578); module.exports = SchemaObject; function SchemaObject(obj) { util.copy(obj, this); } /***/ }), /***/ 64580: /***/ ((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; }; /***/ }), /***/ 76578: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = { copy: copy, checkDataType: checkDataType, checkDataTypes: checkDataTypes, coerceToTypes: coerceToTypes, toHash: toHash, getProperty: getProperty, escapeQuotes: escapeQuotes, equal: __webpack_require__(28206), ucs2length: __webpack_require__(64580), 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 = __webpack_require__(40038); 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'} ] } } }; /***/ }), /***/ 7404: /***/ ((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; } /***/ }), /***/ 64683: /***/ ((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; } /***/ }), /***/ 52114: /***/ ((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; } /***/ }), /***/ 71142: /***/ ((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; } /***/ }), /***/ 89443: /***/ ((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; } /***/ }), /***/ 63093: /***/ ((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; } /***/ }), /***/ 30134: /***/ ((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; } /***/ }), /***/ 1661: /***/ ((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; } /***/ }), /***/ 55964: /***/ ((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; } /***/ }), /***/ 5912: /***/ ((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; } /***/ }), /***/ 10163: /***/ ((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; } /***/ }), /***/ 63847: /***/ ((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; } /***/ }), /***/ 80862: /***/ ((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; } /***/ }), /***/ 85810: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; //all requires must be explicit because browserify won't work with dynamic requires module.exports = { '$ref': __webpack_require__(42393), allOf: __webpack_require__(89443), anyOf: __webpack_require__(63093), '$comment': __webpack_require__(30134), const: __webpack_require__(1661), contains: __webpack_require__(55964), dependencies: __webpack_require__(2591), 'enum': __webpack_require__(10163), format: __webpack_require__(63847), 'if': __webpack_require__(80862), items: __webpack_require__(54408), maximum: __webpack_require__(7404), minimum: __webpack_require__(7404), maxItems: __webpack_require__(64683), minItems: __webpack_require__(64683), maxLength: __webpack_require__(52114), minLength: __webpack_require__(52114), maxProperties: __webpack_require__(71142), minProperties: __webpack_require__(71142), multipleOf: __webpack_require__(39772), not: __webpack_require__(60750), oneOf: __webpack_require__(6106), pattern: __webpack_require__(13912), properties: __webpack_require__(52924), propertyNames: __webpack_require__(19195), required: __webpack_require__(8420), uniqueItems: __webpack_require__(24995), validate: __webpack_require__(49585) }; /***/ }), /***/ 54408: /***/ ((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; } /***/ }), /***/ 39772: /***/ ((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; } /***/ }), /***/ 60750: /***/ ((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; } /***/ }), /***/ 6106: /***/ ((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; } /***/ }), /***/ 13912: /***/ ((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; } /***/ }), /***/ 52924: /***/ ((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; } /***/ }), /***/ 19195: /***/ ((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; } /***/ }), /***/ 8420: /***/ ((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; } /***/ }), /***/ 24995: /***/ ((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; } /***/ }), /***/ 49585: /***/ ((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; } /***/ }), /***/ 53297: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; var customRuleCode = __webpack_require__(5912); var definitionSchema = __webpack_require__(10458); 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; } }; /***/ }), /***/ 194: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. var errors = __webpack_require__(99348); var types = __webpack_require__(42473); var Reader = __webpack_require__(20290); var Writer = __webpack_require__(43200); // --- 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]; } /***/ }), /***/ 20290: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. var assert = __webpack_require__(42357); var Buffer = __webpack_require__(15118).Buffer; var ASN1 = __webpack_require__(42473); var errors = __webpack_require__(99348); // --- 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; /***/ }), /***/ 42473: /***/ ((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 }; /***/ }), /***/ 43200: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. var assert = __webpack_require__(42357); var Buffer = __webpack_require__(15118).Buffer; var ASN1 = __webpack_require__(42473); var errors = __webpack_require__(99348); // --- 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; /***/ }), /***/ 80970: /***/ ((module, __unused_webpack_exports, __webpack_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 = __webpack_require__(194); // --- Exported API module.exports = { Ber: Ber, BerReader: Ber.Reader, BerWriter: Ber.Writer }; /***/ }), /***/ 66631: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. var assert = __webpack_require__(42357); var Stream = __webpack_require__(92413).Stream; var util = __webpack_require__(31669); ///--- 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); /***/ }), /***/ 41299: /***/ (function(__unused_webpack_module, exports) { !function(e,t){ true?t(exports):0}(this,(function(e){"use strict";class t extends Error{constructor(e){super(null!=e?`Timed out after waiting for ${e} ms`:"Timed out"),Object.setPrototypeOf(this,t.prototype)}}const o=(e,t)=>new Promise(((o,n)=>{try{e.schedule(o,t)}catch(e){n(e)}})),n={schedule:(e,t)=>{let o;const n=e=>{null!=e&&clearTimeout(e),o=void 0};return o=setTimeout((()=>{n(o),e()}),t),{cancel:()=>n(o)}}},i=Number.POSITIVE_INFINITY,r=(e,r,l)=>{var u,s;const c=null!==(u="number"==typeof r?r:null==r?void 0:r.timeout)&&void 0!==u?u:5e3,d=null!==(s="number"==typeof r?l:null==r?void 0:r.intervalBetweenAttempts)&&void 0!==s?s:50;let a=!1;const f=()=>new Promise(((t,i)=>{const r=()=>{a||new Promise(((t,o)=>{try{t(e())}catch(e){o(e)}})).then((e=>{e?t(e):o(n,d).then(r).catch(i)})).catch(i)};r()})),T=c!==i?()=>o(n,c).then((()=>{throw a=!0,new t(c)})):void 0;return null!=T?Promise.race([f(),T()]):f()};e.DEFAULT_INTERVAL_BETWEEN_ATTEMPTS_IN_MS=50,e.DEFAULT_TIMEOUT_IN_MS=5e3,e.TimeoutError=t,e.WAIT_FOREVER=i,e.default=r,e.waitUntil=r,Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map /***/ }), /***/ 14812: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { parallel : __webpack_require__(8210), serial : __webpack_require__(50445), serialOrdered : __webpack_require__(3578) }; /***/ }), /***/ 1700: /***/ ((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](); } } /***/ }), /***/ 72794: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var defer = __webpack_require__(15295); // 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); }); } }; } /***/ }), /***/ 15295: /***/ ((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); } } /***/ }), /***/ 9023: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var async = __webpack_require__(72794) , abort = __webpack_require__(1700) ; // 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; } /***/ }), /***/ 42474: /***/ ((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; } /***/ }), /***/ 37942: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var abort = __webpack_require__(1700) , async = __webpack_require__(72794) ; // 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); } /***/ }), /***/ 8210: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var iterate = __webpack_require__(9023) , initState = __webpack_require__(42474) , terminator = __webpack_require__(37942) ; // 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); } /***/ }), /***/ 50445: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var serialOrdered = __webpack_require__(3578); // 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); } /***/ }), /***/ 3578: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var iterate = __webpack_require__(9023) , initState = __webpack_require__(42474) , terminator = __webpack_require__(37942) ; // 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); } /***/ }), /***/ 20940: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['accessanalyzer'] = {}; AWS.AccessAnalyzer = Service.defineService('accessanalyzer', ['2019-11-01']); Object.defineProperty(apiLoader.services['accessanalyzer'], '2019-11-01', { get: function get() { var model = __webpack_require__(24955); model.paginators = __webpack_require__(7997)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AccessAnalyzer; /***/ }), /***/ 30838: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['acm'] = {}; AWS.ACM = Service.defineService('acm', ['2015-12-08']); Object.defineProperty(apiLoader.services['acm'], '2015-12-08', { get: function get() { var model = __webpack_require__(22335); model.paginators = __webpack_require__(63763)/* .pagination */ .o; model.waiters = __webpack_require__(12336)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ACM; /***/ }), /***/ 18450: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['acmpca'] = {}; AWS.ACMPCA = Service.defineService('acmpca', ['2017-08-22']); Object.defineProperty(apiLoader.services['acmpca'], '2017-08-22', { get: function get() { var model = __webpack_require__(2794); model.paginators = __webpack_require__(92031)/* .pagination */ .o; model.waiters = __webpack_require__(50728)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ACMPCA; /***/ }), /***/ 14578: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['alexaforbusiness'] = {}; AWS.AlexaForBusiness = Service.defineService('alexaforbusiness', ['2017-11-09']); Object.defineProperty(apiLoader.services['alexaforbusiness'], '2017-11-09', { get: function get() { var model = __webpack_require__(4946); model.paginators = __webpack_require__(74967)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AlexaForBusiness; /***/ }), /***/ 26296: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); module.exports = { ACM: __webpack_require__(30838), APIGateway: __webpack_require__(91759), ApplicationAutoScaling: __webpack_require__(25598), AppStream: __webpack_require__(21730), AutoScaling: __webpack_require__(31652), Batch: __webpack_require__(10000), Budgets: __webpack_require__(43923), CloudDirectory: __webpack_require__(56231), CloudFormation: __webpack_require__(74643), CloudFront: __webpack_require__(48058), CloudHSM: __webpack_require__(10569), CloudSearch: __webpack_require__(72321), CloudSearchDomain: __webpack_require__(64072), CloudTrail: __webpack_require__(65512), CloudWatch: __webpack_require__(6763), CloudWatchEvents: __webpack_require__(38124), CloudWatchLogs: __webpack_require__(96693), CodeBuild: __webpack_require__(60450), CodeCommit: __webpack_require__(71323), CodeDeploy: __webpack_require__(54599), CodePipeline: __webpack_require__(22938), CognitoIdentity: __webpack_require__(58291), CognitoIdentityServiceProvider: __webpack_require__(31379), CognitoSync: __webpack_require__(74770), ConfigService: __webpack_require__(34061), CUR: __webpack_require__(5026), DataPipeline: __webpack_require__(65688), DeviceFarm: __webpack_require__(26272), DirectConnect: __webpack_require__(73783), DirectoryService: __webpack_require__(83908), Discovery: __webpack_require__(81690), DMS: __webpack_require__(69868), DynamoDB: __webpack_require__(14347), DynamoDBStreams: __webpack_require__(88090), EC2: __webpack_require__(7778), ECR: __webpack_require__(15211), ECS: __webpack_require__(16615), EFS: __webpack_require__(34375), ElastiCache: __webpack_require__(81065), ElasticBeanstalk: __webpack_require__(14897), ELB: __webpack_require__(10907), ELBv2: __webpack_require__(44311), EMR: __webpack_require__(50470), ES: __webpack_require__(84462), ElasticTranscoder: __webpack_require__(40745), Firehose: __webpack_require__(92831), GameLift: __webpack_require__(8085), Glacier: __webpack_require__(63249), Health: __webpack_require__(21834), IAM: __webpack_require__(50058), ImportExport: __webpack_require__(6769), Inspector: __webpack_require__(89439), Iot: __webpack_require__(98392), IotData: __webpack_require__(6564), Kinesis: __webpack_require__(49876), KinesisAnalytics: __webpack_require__(90042), KMS: __webpack_require__(56782), Lambda: __webpack_require__(13321), LexRuntime: __webpack_require__(62716), Lightsail: __webpack_require__(22718), MachineLearning: __webpack_require__(82907), MarketplaceCommerceAnalytics: __webpack_require__(4540), MarketplaceMetering: __webpack_require__(39297), MTurk: __webpack_require__(79954), MobileAnalytics: __webpack_require__(66690), OpsWorks: __webpack_require__(75691), OpsWorksCM: __webpack_require__(80388), Organizations: __webpack_require__(44670), Pinpoint: __webpack_require__(18388), Polly: __webpack_require__(97332), RDS: __webpack_require__(71578), Redshift: __webpack_require__(84853), Rekognition: __webpack_require__(65470), ResourceGroupsTaggingAPI: __webpack_require__(7385), Route53: __webpack_require__(44968), Route53Domains: __webpack_require__(51994), S3: __webpack_require__(83256), S3Control: __webpack_require__(99817), ServiceCatalog: __webpack_require__(822), SES: __webpack_require__(46816), Shield: __webpack_require__(20271), SimpleDB: __webpack_require__(10120), SMS: __webpack_require__(57719), Snowball: __webpack_require__(510), SNS: __webpack_require__(28581), SQS: __webpack_require__(63172), SSM: __webpack_require__(83380), StorageGateway: __webpack_require__(89190), StepFunctions: __webpack_require__(8136), STS: __webpack_require__(57513), Support: __webpack_require__(1099), SWF: __webpack_require__(32327), XRay: __webpack_require__(41548), WAF: __webpack_require__(72742), WAFRegional: __webpack_require__(23153), WorkDocs: __webpack_require__(38835), WorkSpaces: __webpack_require__(25513), CodeStar: __webpack_require__(98336), LexModelBuildingService: __webpack_require__(37397), MarketplaceEntitlementService: __webpack_require__(53707), Athena: __webpack_require__(29434), Greengrass: __webpack_require__(20690), DAX: __webpack_require__(71398), MigrationHub: __webpack_require__(14688), CloudHSMV2: __webpack_require__(70889), Glue: __webpack_require__(31658), Mobile: __webpack_require__(39782), Pricing: __webpack_require__(92765), CostExplorer: __webpack_require__(79523), MediaConvert: __webpack_require__(57220), MediaLive: __webpack_require__(7509), MediaPackage: __webpack_require__(91620), MediaStore: __webpack_require__(83748), MediaStoreData: __webpack_require__(98703), AppSync: __webpack_require__(12402), GuardDuty: __webpack_require__(40755), MQ: __webpack_require__(23093), Comprehend: __webpack_require__(62878), IoTJobsDataPlane: __webpack_require__(42332), KinesisVideoArchivedMedia: __webpack_require__(5580), KinesisVideoMedia: __webpack_require__(81308), KinesisVideo: __webpack_require__(89927), SageMakerRuntime: __webpack_require__(85044), SageMaker: __webpack_require__(77657), Translate: __webpack_require__(72544), ResourceGroups: __webpack_require__(58756), AlexaForBusiness: __webpack_require__(14578), Cloud9: __webpack_require__(85473), ServerlessApplicationRepository: __webpack_require__(62402), ServiceDiscovery: __webpack_require__(91569), WorkMail: __webpack_require__(38374), AutoScalingPlans: __webpack_require__(2554), TranscribeService: __webpack_require__(75811), Connect: __webpack_require__(13879), ACMPCA: __webpack_require__(18450), FMS: __webpack_require__(11316), SecretsManager: __webpack_require__(85131), IoTAnalytics: __webpack_require__(67409), IoT1ClickDevicesService: __webpack_require__(39474), IoT1ClickProjects: __webpack_require__(4686), PI: __webpack_require__(15505), Neptune: __webpack_require__(30047), MediaTailor: __webpack_require__(99658), EKS: __webpack_require__(23337), Macie: __webpack_require__(86427), DLM: __webpack_require__(24958), Signer: __webpack_require__(71596), Chime: __webpack_require__(84646), PinpointEmail: __webpack_require__(83060), RAM: __webpack_require__(94394), Route53Resolver: __webpack_require__(25894), PinpointSMSVoice: __webpack_require__(46605), QuickSight: __webpack_require__(29898), RDSDataService: __webpack_require__(30147), Amplify: __webpack_require__(38090), DataSync: __webpack_require__(15472), RoboMaker: __webpack_require__(18068), Transfer: __webpack_require__(51585), GlobalAccelerator: __webpack_require__(19306), ComprehendMedical: __webpack_require__(32349), KinesisAnalyticsV2: __webpack_require__(74631), MediaConnect: __webpack_require__(67639), FSx: __webpack_require__(60642), SecurityHub: __webpack_require__(21550), AppMesh: __webpack_require__(69226), LicenseManager: __webpack_require__(34693), Kafka: __webpack_require__(56775), ApiGatewayManagementApi: __webpack_require__(31762), ApiGatewayV2: __webpack_require__(44987), DocDB: __webpack_require__(55129), Backup: __webpack_require__(82455), WorkLink: __webpack_require__(48579), Textract: __webpack_require__(58523), ManagedBlockchain: __webpack_require__(85143), MediaPackageVod: __webpack_require__(14962), GroundStation: __webpack_require__(80494), IoTThingsGraph: __webpack_require__(58905), IoTEvents: __webpack_require__(88065), IoTEventsData: __webpack_require__(56973), Personalize: __webpack_require__(33696), PersonalizeEvents: __webpack_require__(88170), PersonalizeRuntime: __webpack_require__(66184), ApplicationInsights: __webpack_require__(83972), ServiceQuotas: __webpack_require__(57800), EC2InstanceConnect: __webpack_require__(92209), EventBridge: __webpack_require__(898), LakeFormation: __webpack_require__(6726), ForecastService: __webpack_require__(12942), ForecastQueryService: __webpack_require__(36822), QLDB: __webpack_require__(71266), QLDBSession: __webpack_require__(55423), WorkMailMessageFlow: __webpack_require__(67025), CodeStarNotifications: __webpack_require__(15141), SavingsPlans: __webpack_require__(62825), SSO: __webpack_require__(71096), SSOOIDC: __webpack_require__(49870), MarketplaceCatalog: __webpack_require__(2609), DataExchange: __webpack_require__(11024), SESV2: __webpack_require__(20142), MigrationHubConfig: __webpack_require__(62658), ConnectParticipant: __webpack_require__(94198), AppConfig: __webpack_require__(78606), IoTSecureTunneling: __webpack_require__(98562), WAFV2: __webpack_require__(50353), ElasticInference: __webpack_require__(37708), Imagebuilder: __webpack_require__(57511), Schemas: __webpack_require__(55713), AccessAnalyzer: __webpack_require__(20940), CodeGuruReviewer: __webpack_require__(60070), CodeGuruProfiler: __webpack_require__(65704), ComputeOptimizer: __webpack_require__(64459), FraudDetector: __webpack_require__(99830), Kendra: __webpack_require__(66122), NetworkManager: __webpack_require__(37610), Outposts: __webpack_require__(27551), AugmentedAIRuntime: __webpack_require__(33960), EBS: __webpack_require__(62837), KinesisVideoSignalingChannels: __webpack_require__(12710), Detective: __webpack_require__(60674), CodeStarconnections: __webpack_require__(78270), Synthetics: __webpack_require__(25910), IoTSiteWise: __webpack_require__(89690), Macie2: __webpack_require__(57330), CodeArtifact: __webpack_require__(91983), Honeycode: __webpack_require__(38889), IVS: __webpack_require__(67701), Braket: __webpack_require__(35429), IdentityStore: __webpack_require__(60222), Appflow: __webpack_require__(60844), RedshiftData: __webpack_require__(203), SSOAdmin: __webpack_require__(66644), TimestreamQuery: __webpack_require__(24529), TimestreamWrite: __webpack_require__(1573), S3Outposts: __webpack_require__(90493), DataBrew: __webpack_require__(35846), ServiceCatalogAppRegistry: __webpack_require__(79068), NetworkFirewall: __webpack_require__(84626), MWAA: __webpack_require__(32712), AmplifyBackend: __webpack_require__(2806), AppIntegrations: __webpack_require__(85479), ConnectContactLens: __webpack_require__(41847), DevOpsGuru: __webpack_require__(90673), ECRPUBLIC: __webpack_require__(90244), LookoutVision: __webpack_require__(65046), SageMakerFeatureStoreRuntime: __webpack_require__(67644), CustomerProfiles: __webpack_require__(28379), AuditManager: __webpack_require__(20472), EMRcontainers: __webpack_require__(49984), HealthLake: __webpack_require__(64254), SagemakerEdge: __webpack_require__(38966), Amp: __webpack_require__(96881), GreengrassV2: __webpack_require__(45126), IotDeviceAdvisor: __webpack_require__(97569), IoTFleetHub: __webpack_require__(42513), IoTWireless: __webpack_require__(8226), Location: __webpack_require__(44594), WellArchitected: __webpack_require__(86263), LexModelsV2: __webpack_require__(27254), LexRuntimeV2: __webpack_require__(33855), Fis: __webpack_require__(73003), LookoutMetrics: __webpack_require__(78708), Mgn: __webpack_require__(41339), LookoutEquipment: __webpack_require__(21843) }; /***/ }), /***/ 96881: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['amp'] = {}; AWS.Amp = Service.defineService('amp', ['2020-08-01']); Object.defineProperty(apiLoader.services['amp'], '2020-08-01', { get: function get() { var model = __webpack_require__(36184); model.paginators = __webpack_require__(7850)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Amp; /***/ }), /***/ 38090: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['amplify'] = {}; AWS.Amplify = Service.defineService('amplify', ['2017-07-25']); Object.defineProperty(apiLoader.services['amplify'], '2017-07-25', { get: function get() { var model = __webpack_require__(59237); model.paginators = __webpack_require__(89594)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Amplify; /***/ }), /***/ 2806: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['amplifybackend'] = {}; AWS.AmplifyBackend = Service.defineService('amplifybackend', ['2020-08-11']); Object.defineProperty(apiLoader.services['amplifybackend'], '2020-08-11', { get: function get() { var model = __webpack_require__(70211); model.paginators = __webpack_require__(72426)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AmplifyBackend; /***/ }), /***/ 91759: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['apigateway'] = {}; AWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']); __webpack_require__(4338); Object.defineProperty(apiLoader.services['apigateway'], '2015-07-09', { get: function get() { var model = __webpack_require__(33895); model.paginators = __webpack_require__(61271)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.APIGateway; /***/ }), /***/ 31762: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['apigatewaymanagementapi'] = {}; AWS.ApiGatewayManagementApi = Service.defineService('apigatewaymanagementapi', ['2018-11-29']); Object.defineProperty(apiLoader.services['apigatewaymanagementapi'], '2018-11-29', { get: function get() { var model = __webpack_require__(31775); model.paginators = __webpack_require__(19890)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ApiGatewayManagementApi; /***/ }), /***/ 44987: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['apigatewayv2'] = {}; AWS.ApiGatewayV2 = Service.defineService('apigatewayv2', ['2018-11-29']); Object.defineProperty(apiLoader.services['apigatewayv2'], '2018-11-29', { get: function get() { var model = __webpack_require__(18767); model.paginators = __webpack_require__(96828)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ApiGatewayV2; /***/ }), /***/ 78606: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['appconfig'] = {}; AWS.AppConfig = Service.defineService('appconfig', ['2019-10-09']); Object.defineProperty(apiLoader.services['appconfig'], '2019-10-09', { get: function get() { var model = __webpack_require__(5832); model.paginators = __webpack_require__(38388)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AppConfig; /***/ }), /***/ 60844: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['appflow'] = {}; AWS.Appflow = Service.defineService('appflow', ['2020-08-23']); Object.defineProperty(apiLoader.services['appflow'], '2020-08-23', { get: function get() { var model = __webpack_require__(63769); model.paginators = __webpack_require__(3505)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Appflow; /***/ }), /***/ 85479: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['appintegrations'] = {}; AWS.AppIntegrations = Service.defineService('appintegrations', ['2020-07-29']); Object.defineProperty(apiLoader.services['appintegrations'], '2020-07-29', { get: function get() { var model = __webpack_require__(26469); model.paginators = __webpack_require__(74824)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AppIntegrations; /***/ }), /***/ 25598: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['applicationautoscaling'] = {}; AWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']); Object.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', { get: function get() { var model = __webpack_require__(14452); model.paginators = __webpack_require__(11157)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ApplicationAutoScaling; /***/ }), /***/ 83972: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['applicationinsights'] = {}; AWS.ApplicationInsights = Service.defineService('applicationinsights', ['2018-11-25']); Object.defineProperty(apiLoader.services['applicationinsights'], '2018-11-25', { get: function get() { var model = __webpack_require__(48728); model.paginators = __webpack_require__(9986)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ApplicationInsights; /***/ }), /***/ 69226: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['appmesh'] = {}; AWS.AppMesh = Service.defineService('appmesh', ['2018-10-01', '2018-10-01*', '2019-01-25']); Object.defineProperty(apiLoader.services['appmesh'], '2018-10-01', { get: function get() { var model = __webpack_require__(4710); model.paginators = __webpack_require__(74196)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['appmesh'], '2019-01-25', { get: function get() { var model = __webpack_require__(99818); model.paginators = __webpack_require__(9865)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AppMesh; /***/ }), /***/ 21730: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['appstream'] = {}; AWS.AppStream = Service.defineService('appstream', ['2016-12-01']); Object.defineProperty(apiLoader.services['appstream'], '2016-12-01', { get: function get() { var model = __webpack_require__(12513); model.paginators = __webpack_require__(81915)/* .pagination */ .o; model.waiters = __webpack_require__(98407)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AppStream; /***/ }), /***/ 12402: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['appsync'] = {}; AWS.AppSync = Service.defineService('appsync', ['2017-07-25']); Object.defineProperty(apiLoader.services['appsync'], '2017-07-25', { get: function get() { var model = __webpack_require__(3651); model.paginators = __webpack_require__(93930)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AppSync; /***/ }), /***/ 29434: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['athena'] = {}; AWS.Athena = Service.defineService('athena', ['2017-05-18']); Object.defineProperty(apiLoader.services['athena'], '2017-05-18', { get: function get() { var model = __webpack_require__(19898); model.paginators = __webpack_require__(23135)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Athena; /***/ }), /***/ 20472: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['auditmanager'] = {}; AWS.AuditManager = Service.defineService('auditmanager', ['2017-07-25']); Object.defineProperty(apiLoader.services['auditmanager'], '2017-07-25', { get: function get() { var model = __webpack_require__(66702); model.paginators = __webpack_require__(99387)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AuditManager; /***/ }), /***/ 33960: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['augmentedairuntime'] = {}; AWS.AugmentedAIRuntime = Service.defineService('augmentedairuntime', ['2019-11-07']); Object.defineProperty(apiLoader.services['augmentedairuntime'], '2019-11-07', { get: function get() { var model = __webpack_require__(60302); model.paginators = __webpack_require__(58181)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AugmentedAIRuntime; /***/ }), /***/ 31652: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['autoscaling'] = {}; AWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']); Object.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', { get: function get() { var model = __webpack_require__(68489); model.paginators = __webpack_require__(38676)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AutoScaling; /***/ }), /***/ 2554: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['autoscalingplans'] = {}; AWS.AutoScalingPlans = Service.defineService('autoscalingplans', ['2018-01-06']); Object.defineProperty(apiLoader.services['autoscalingplans'], '2018-01-06', { get: function get() { var model = __webpack_require__(95300); model.paginators = __webpack_require__(4511)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.AutoScalingPlans; /***/ }), /***/ 82455: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['backup'] = {}; AWS.Backup = Service.defineService('backup', ['2018-11-15']); Object.defineProperty(apiLoader.services['backup'], '2018-11-15', { get: function get() { var model = __webpack_require__(65918); model.paginators = __webpack_require__(61080)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Backup; /***/ }), /***/ 10000: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['batch'] = {}; AWS.Batch = Service.defineService('batch', ['2016-08-10']); Object.defineProperty(apiLoader.services['batch'], '2016-08-10', { get: function get() { var model = __webpack_require__(97171); model.paginators = __webpack_require__(27755)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Batch; /***/ }), /***/ 35429: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['braket'] = {}; AWS.Braket = Service.defineService('braket', ['2019-09-01']); Object.defineProperty(apiLoader.services['braket'], '2019-09-01', { get: function get() { var model = __webpack_require__(44714); model.paginators = __webpack_require__(60058)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Braket; /***/ }), /***/ 43923: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['budgets'] = {}; AWS.Budgets = Service.defineService('budgets', ['2016-10-20']); Object.defineProperty(apiLoader.services['budgets'], '2016-10-20', { get: function get() { var model = __webpack_require__(47942); model.paginators = __webpack_require__(64219)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Budgets; /***/ }), /***/ 84646: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['chime'] = {}; AWS.Chime = Service.defineService('chime', ['2018-05-01']); Object.defineProperty(apiLoader.services['chime'], '2018-05-01', { get: function get() { var model = __webpack_require__(55823); model.paginators = __webpack_require__(6307)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Chime; /***/ }), /***/ 85473: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloud9'] = {}; AWS.Cloud9 = Service.defineService('cloud9', ['2017-09-23']); Object.defineProperty(apiLoader.services['cloud9'], '2017-09-23', { get: function get() { var model = __webpack_require__(90697); model.paginators = __webpack_require__(79426)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Cloud9; /***/ }), /***/ 56231: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['clouddirectory'] = {}; AWS.CloudDirectory = Service.defineService('clouddirectory', ['2016-05-10', '2016-05-10*', '2017-01-11']); Object.defineProperty(apiLoader.services['clouddirectory'], '2016-05-10', { get: function get() { var model = __webpack_require__(87301); model.paginators = __webpack_require__(72446)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['clouddirectory'], '2017-01-11', { get: function get() { var model = __webpack_require__(79943); model.paginators = __webpack_require__(20410)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudDirectory; /***/ }), /***/ 74643: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudformation'] = {}; AWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']); Object.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', { get: function get() { var model = __webpack_require__(50980); model.paginators = __webpack_require__(43078)/* .pagination */ .o; model.waiters = __webpack_require__(11714)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudFormation; /***/ }), /***/ 48058: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudfront'] = {}; AWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25', '2016-11-25*', '2017-03-25', '2017-03-25*', '2017-10-30', '2017-10-30*', '2018-06-18', '2018-06-18*', '2018-11-05', '2018-11-05*', '2019-03-26', '2019-03-26*', '2020-05-31']); __webpack_require__(95483); Object.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', { get: function get() { var model = __webpack_require__(81977); model.paginators = __webpack_require__(12819)/* .pagination */ .o; model.waiters = __webpack_require__(52832)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudfront'], '2017-03-25', { get: function get() { var model = __webpack_require__(38288); model.paginators = __webpack_require__(19896)/* .pagination */ .o; model.waiters = __webpack_require__(43589)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudfront'], '2017-10-30', { get: function get() { var model = __webpack_require__(62352); model.paginators = __webpack_require__(94430)/* .pagination */ .o; model.waiters = __webpack_require__(36502)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudfront'], '2018-06-18', { get: function get() { var model = __webpack_require__(59976); model.paginators = __webpack_require__(43510)/* .pagination */ .o; model.waiters = __webpack_require__(67512)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudfront'], '2018-11-05', { get: function get() { var model = __webpack_require__(2861); model.paginators = __webpack_require__(94484)/* .pagination */ .o; model.waiters = __webpack_require__(94992)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudfront'], '2019-03-26', { get: function get() { var model = __webpack_require__(22621); model.paginators = __webpack_require__(49289)/* .pagination */ .o; model.waiters = __webpack_require__(89078)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudfront'], '2020-05-31', { get: function get() { var model = __webpack_require__(44946); model.paginators = __webpack_require__(92022)/* .pagination */ .o; model.waiters = __webpack_require__(83035)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudFront; /***/ }), /***/ 10569: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudhsm'] = {}; AWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']); Object.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', { get: function get() { var model = __webpack_require__(59717); model.paginators = __webpack_require__(26512)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudHSM; /***/ }), /***/ 70889: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudhsmv2'] = {}; AWS.CloudHSMV2 = Service.defineService('cloudhsmv2', ['2017-04-28']); Object.defineProperty(apiLoader.services['cloudhsmv2'], '2017-04-28', { get: function get() { var model = __webpack_require__(19362); model.paginators = __webpack_require__(96674)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudHSMV2; /***/ }), /***/ 72321: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudsearch'] = {}; AWS.CloudSearch = Service.defineService('cloudsearch', ['2011-02-01', '2013-01-01']); Object.defineProperty(apiLoader.services['cloudsearch'], '2011-02-01', { get: function get() { var model = __webpack_require__(4999); model.paginators = __webpack_require__(74483)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['cloudsearch'], '2013-01-01', { get: function get() { var model = __webpack_require__(93200); model.paginators = __webpack_require__(82352)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudSearch; /***/ }), /***/ 64072: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudsearchdomain'] = {}; AWS.CloudSearchDomain = Service.defineService('cloudsearchdomain', ['2013-01-01']); __webpack_require__(48571); Object.defineProperty(apiLoader.services['cloudsearchdomain'], '2013-01-01', { get: function get() { var model = __webpack_require__(56588); return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudSearchDomain; /***/ }), /***/ 65512: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudtrail'] = {}; AWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']); Object.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', { get: function get() { var model = __webpack_require__(90967); model.paginators = __webpack_require__(78414)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudTrail; /***/ }), /***/ 6763: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudwatch'] = {}; AWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']); Object.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', { get: function get() { var model = __webpack_require__(12505); model.paginators = __webpack_require__(16758)/* .pagination */ .o; model.waiters = __webpack_require__(4112)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudWatch; /***/ }), /***/ 38124: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudwatchevents'] = {}; AWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']); Object.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', { get: function get() { var model = __webpack_require__(2845); model.paginators = __webpack_require__(96939)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudWatchEvents; /***/ }), /***/ 96693: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cloudwatchlogs'] = {}; AWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']); Object.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', { get: function get() { var model = __webpack_require__(69022); model.paginators = __webpack_require__(26273)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CloudWatchLogs; /***/ }), /***/ 91983: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codeartifact'] = {}; AWS.CodeArtifact = Service.defineService('codeartifact', ['2018-09-22']); Object.defineProperty(apiLoader.services['codeartifact'], '2018-09-22', { get: function get() { var model = __webpack_require__(26175); model.paginators = __webpack_require__(21307)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeArtifact; /***/ }), /***/ 60450: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codebuild'] = {}; AWS.CodeBuild = Service.defineService('codebuild', ['2016-10-06']); Object.defineProperty(apiLoader.services['codebuild'], '2016-10-06', { get: function get() { var model = __webpack_require__(32310); model.paginators = __webpack_require__(10589)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeBuild; /***/ }), /***/ 71323: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codecommit'] = {}; AWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']); Object.defineProperty(apiLoader.services['codecommit'], '2015-04-13', { get: function get() { var model = __webpack_require__(2091); model.paginators = __webpack_require__(11742)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeCommit; /***/ }), /***/ 54599: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codedeploy'] = {}; AWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']); Object.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', { get: function get() { var model = __webpack_require__(33531); model.paginators = __webpack_require__(63203)/* .pagination */ .o; model.waiters = __webpack_require__(56338)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeDeploy; /***/ }), /***/ 65704: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codeguruprofiler'] = {}; AWS.CodeGuruProfiler = Service.defineService('codeguruprofiler', ['2019-07-18']); Object.defineProperty(apiLoader.services['codeguruprofiler'], '2019-07-18', { get: function get() { var model = __webpack_require__(55790); model.paginators = __webpack_require__(14789)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeGuruProfiler; /***/ }), /***/ 60070: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codegurureviewer'] = {}; AWS.CodeGuruReviewer = Service.defineService('codegurureviewer', ['2019-09-19']); Object.defineProperty(apiLoader.services['codegurureviewer'], '2019-09-19', { get: function get() { var model = __webpack_require__(16420); model.paginators = __webpack_require__(89571)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeGuruReviewer; /***/ }), /***/ 22938: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codepipeline'] = {}; AWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']); Object.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', { get: function get() { var model = __webpack_require__(92486); model.paginators = __webpack_require__(38160)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodePipeline; /***/ }), /***/ 98336: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codestar'] = {}; AWS.CodeStar = Service.defineService('codestar', ['2017-04-19']); Object.defineProperty(apiLoader.services['codestar'], '2017-04-19', { get: function get() { var model = __webpack_require__(71626); model.paginators = __webpack_require__(78653)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeStar; /***/ }), /***/ 78270: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codestarconnections'] = {}; AWS.CodeStarconnections = Service.defineService('codestarconnections', ['2019-12-01']); Object.defineProperty(apiLoader.services['codestarconnections'], '2019-12-01', { get: function get() { var model = __webpack_require__(81568); model.paginators = __webpack_require__(7656)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeStarconnections; /***/ }), /***/ 15141: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['codestarnotifications'] = {}; AWS.CodeStarNotifications = Service.defineService('codestarnotifications', ['2019-10-15']); Object.defineProperty(apiLoader.services['codestarnotifications'], '2019-10-15', { get: function get() { var model = __webpack_require__(41964); model.paginators = __webpack_require__(5741)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CodeStarNotifications; /***/ }), /***/ 58291: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cognitoidentity'] = {}; AWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']); Object.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', { get: function get() { var model = __webpack_require__(26102); model.paginators = __webpack_require__(80796)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CognitoIdentity; /***/ }), /***/ 31379: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cognitoidentityserviceprovider'] = {}; AWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']); Object.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', { get: function get() { var model = __webpack_require__(60923); model.paginators = __webpack_require__(32568)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CognitoIdentityServiceProvider; /***/ }), /***/ 74770: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cognitosync'] = {}; AWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']); Object.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', { get: function get() { var model = __webpack_require__(91406); model.paginators = __webpack_require__(23418)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CognitoSync; /***/ }), /***/ 62878: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['comprehend'] = {}; AWS.Comprehend = Service.defineService('comprehend', ['2017-11-27']); Object.defineProperty(apiLoader.services['comprehend'], '2017-11-27', { get: function get() { var model = __webpack_require__(71004); model.paginators = __webpack_require__(70341)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Comprehend; /***/ }), /***/ 32349: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['comprehendmedical'] = {}; AWS.ComprehendMedical = Service.defineService('comprehendmedical', ['2018-10-30']); Object.defineProperty(apiLoader.services['comprehendmedical'], '2018-10-30', { get: function get() { var model = __webpack_require__(65085); model.paginators = __webpack_require__(89772)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ComprehendMedical; /***/ }), /***/ 64459: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['computeoptimizer'] = {}; AWS.ComputeOptimizer = Service.defineService('computeoptimizer', ['2019-11-01']); Object.defineProperty(apiLoader.services['computeoptimizer'], '2019-11-01', { get: function get() { var model = __webpack_require__(559); model.paginators = __webpack_require__(16060)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ComputeOptimizer; /***/ }), /***/ 34061: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['configservice'] = {}; AWS.ConfigService = Service.defineService('configservice', ['2014-11-12']); Object.defineProperty(apiLoader.services['configservice'], '2014-11-12', { get: function get() { var model = __webpack_require__(85031); model.paginators = __webpack_require__(55050)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ConfigService; /***/ }), /***/ 13879: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['connect'] = {}; AWS.Connect = Service.defineService('connect', ['2017-08-08']); Object.defineProperty(apiLoader.services['connect'], '2017-08-08', { get: function get() { var model = __webpack_require__(13649); model.paginators = __webpack_require__(35649)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Connect; /***/ }), /***/ 41847: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['connectcontactlens'] = {}; AWS.ConnectContactLens = Service.defineService('connectcontactlens', ['2020-08-21']); Object.defineProperty(apiLoader.services['connectcontactlens'], '2020-08-21', { get: function get() { var model = __webpack_require__(86739); model.paginators = __webpack_require__(49692)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ConnectContactLens; /***/ }), /***/ 94198: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['connectparticipant'] = {}; AWS.ConnectParticipant = Service.defineService('connectparticipant', ['2018-09-07']); Object.defineProperty(apiLoader.services['connectparticipant'], '2018-09-07', { get: function get() { var model = __webpack_require__(46788); model.paginators = __webpack_require__(2813)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ConnectParticipant; /***/ }), /***/ 79523: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['costexplorer'] = {}; AWS.CostExplorer = Service.defineService('costexplorer', ['2017-10-25']); Object.defineProperty(apiLoader.services['costexplorer'], '2017-10-25', { get: function get() { var model = __webpack_require__(86565); model.paginators = __webpack_require__(94382)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CostExplorer; /***/ }), /***/ 5026: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['cur'] = {}; AWS.CUR = Service.defineService('cur', ['2017-01-06']); Object.defineProperty(apiLoader.services['cur'], '2017-01-06', { get: function get() { var model = __webpack_require__(4138); model.paginators = __webpack_require__(29271)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CUR; /***/ }), /***/ 28379: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['customerprofiles'] = {}; AWS.CustomerProfiles = Service.defineService('customerprofiles', ['2020-08-15']); Object.defineProperty(apiLoader.services['customerprofiles'], '2020-08-15', { get: function get() { var model = __webpack_require__(39734); model.paginators = __webpack_require__(35003)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.CustomerProfiles; /***/ }), /***/ 35846: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['databrew'] = {}; AWS.DataBrew = Service.defineService('databrew', ['2017-07-25']); Object.defineProperty(apiLoader.services['databrew'], '2017-07-25', { get: function get() { var model = __webpack_require__(42529); model.paginators = __webpack_require__(91224)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DataBrew; /***/ }), /***/ 11024: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['dataexchange'] = {}; AWS.DataExchange = Service.defineService('dataexchange', ['2017-07-25']); Object.defineProperty(apiLoader.services['dataexchange'], '2017-07-25', { get: function get() { var model = __webpack_require__(25676); model.paginators = __webpack_require__(44399)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DataExchange; /***/ }), /***/ 65688: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['datapipeline'] = {}; AWS.DataPipeline = Service.defineService('datapipeline', ['2012-10-29']); Object.defineProperty(apiLoader.services['datapipeline'], '2012-10-29', { get: function get() { var model = __webpack_require__(9547); model.paginators = __webpack_require__(48471)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DataPipeline; /***/ }), /***/ 15472: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['datasync'] = {}; AWS.DataSync = Service.defineService('datasync', ['2018-11-09']); Object.defineProperty(apiLoader.services['datasync'], '2018-11-09', { get: function get() { var model = __webpack_require__(37374); model.paginators = __webpack_require__(18448)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DataSync; /***/ }), /***/ 71398: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['dax'] = {}; AWS.DAX = Service.defineService('dax', ['2017-04-19']); Object.defineProperty(apiLoader.services['dax'], '2017-04-19', { get: function get() { var model = __webpack_require__(97287); model.paginators = __webpack_require__(15791)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DAX; /***/ }), /***/ 60674: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['detective'] = {}; AWS.Detective = Service.defineService('detective', ['2018-10-26']); Object.defineProperty(apiLoader.services['detective'], '2018-10-26', { get: function get() { var model = __webpack_require__(38107); model.paginators = __webpack_require__(26554)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Detective; /***/ }), /***/ 26272: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['devicefarm'] = {}; AWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']); Object.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', { get: function get() { var model = __webpack_require__(87206); model.paginators = __webpack_require__(85524)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DeviceFarm; /***/ }), /***/ 90673: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['devopsguru'] = {}; AWS.DevOpsGuru = Service.defineService('devopsguru', ['2020-12-01']); Object.defineProperty(apiLoader.services['devopsguru'], '2020-12-01', { get: function get() { var model = __webpack_require__(82176); model.paginators = __webpack_require__(91556)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DevOpsGuru; /***/ }), /***/ 73783: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['directconnect'] = {}; AWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']); Object.defineProperty(apiLoader.services['directconnect'], '2012-10-25', { get: function get() { var model = __webpack_require__(49177); model.paginators = __webpack_require__(57373)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DirectConnect; /***/ }), /***/ 83908: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['directoryservice'] = {}; AWS.DirectoryService = Service.defineService('directoryservice', ['2015-04-16']); Object.defineProperty(apiLoader.services['directoryservice'], '2015-04-16', { get: function get() { var model = __webpack_require__(3174); model.paginators = __webpack_require__(1714)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DirectoryService; /***/ }), /***/ 81690: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['discovery'] = {}; AWS.Discovery = Service.defineService('discovery', ['2015-11-01']); Object.defineProperty(apiLoader.services['discovery'], '2015-11-01', { get: function get() { var model = __webpack_require__(32400); model.paginators = __webpack_require__(54052)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Discovery; /***/ }), /***/ 24958: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['dlm'] = {}; AWS.DLM = Service.defineService('dlm', ['2018-01-12']); Object.defineProperty(apiLoader.services['dlm'], '2018-01-12', { get: function get() { var model = __webpack_require__(19210); model.paginators = __webpack_require__(69943)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DLM; /***/ }), /***/ 69868: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['dms'] = {}; AWS.DMS = Service.defineService('dms', ['2016-01-01']); Object.defineProperty(apiLoader.services['dms'], '2016-01-01', { get: function get() { var model = __webpack_require__(85765); model.paginators = __webpack_require__(170)/* .pagination */ .o; model.waiters = __webpack_require__(31491)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DMS; /***/ }), /***/ 55129: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['docdb'] = {}; AWS.DocDB = Service.defineService('docdb', ['2014-10-31']); __webpack_require__(59050); Object.defineProperty(apiLoader.services['docdb'], '2014-10-31', { get: function get() { var model = __webpack_require__(78804); model.paginators = __webpack_require__(97929)/* .pagination */ .o; model.waiters = __webpack_require__(61159)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DocDB; /***/ }), /***/ 14347: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['dynamodb'] = {}; AWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']); __webpack_require__(17101); Object.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', { get: function get() { var model = __webpack_require__(59225); model.paginators = __webpack_require__(30867)/* .pagination */ .o; model.waiters = __webpack_require__(15606)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', { get: function get() { var model = __webpack_require__(10198); model.paginators = __webpack_require__(79199)/* .pagination */ .o; model.waiters = __webpack_require__(13814)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DynamoDB; /***/ }), /***/ 88090: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['dynamodbstreams'] = {}; AWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']); Object.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', { get: function get() { var model = __webpack_require__(69705); model.paginators = __webpack_require__(18467)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.DynamoDBStreams; /***/ }), /***/ 62837: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ebs'] = {}; AWS.EBS = Service.defineService('ebs', ['2019-11-02']); Object.defineProperty(apiLoader.services['ebs'], '2019-11-02', { get: function get() { var model = __webpack_require__(67263); model.paginators = __webpack_require__(94934)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EBS; /***/ }), /***/ 7778: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ec2'] = {}; AWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']); __webpack_require__(92501); Object.defineProperty(apiLoader.services['ec2'], '2016-11-15', { get: function get() { var model = __webpack_require__(8893); model.paginators = __webpack_require__(32127)/* .pagination */ .o; model.waiters = __webpack_require__(90157)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EC2; /***/ }), /***/ 92209: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ec2instanceconnect'] = {}; AWS.EC2InstanceConnect = Service.defineService('ec2instanceconnect', ['2018-04-02']); Object.defineProperty(apiLoader.services['ec2instanceconnect'], '2018-04-02', { get: function get() { var model = __webpack_require__(14703); model.paginators = __webpack_require__(73353)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EC2InstanceConnect; /***/ }), /***/ 15211: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ecr'] = {}; AWS.ECR = Service.defineService('ecr', ['2015-09-21']); Object.defineProperty(apiLoader.services['ecr'], '2015-09-21', { get: function get() { var model = __webpack_require__(80948); model.paginators = __webpack_require__(66855)/* .pagination */ .o; model.waiters = __webpack_require__(69800)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ECR; /***/ }), /***/ 90244: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ecrpublic'] = {}; AWS.ECRPUBLIC = Service.defineService('ecrpublic', ['2020-10-30']); Object.defineProperty(apiLoader.services['ecrpublic'], '2020-10-30', { get: function get() { var model = __webpack_require__(82416); model.paginators = __webpack_require__(41518)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ECRPUBLIC; /***/ }), /***/ 16615: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ecs'] = {}; AWS.ECS = Service.defineService('ecs', ['2014-11-13']); Object.defineProperty(apiLoader.services['ecs'], '2014-11-13', { get: function get() { var model = __webpack_require__(68155); model.paginators = __webpack_require__(33629)/* .pagination */ .o; model.waiters = __webpack_require__(54199)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ECS; /***/ }), /***/ 34375: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['efs'] = {}; AWS.EFS = Service.defineService('efs', ['2015-02-01']); Object.defineProperty(apiLoader.services['efs'], '2015-02-01', { get: function get() { var model = __webpack_require__(54989); model.paginators = __webpack_require__(73750)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EFS; /***/ }), /***/ 23337: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['eks'] = {}; AWS.EKS = Service.defineService('eks', ['2017-11-01']); Object.defineProperty(apiLoader.services['eks'], '2017-11-01', { get: function get() { var model = __webpack_require__(7766); model.paginators = __webpack_require__(17233)/* .pagination */ .o; model.waiters = __webpack_require__(11545)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EKS; /***/ }), /***/ 81065: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['elasticache'] = {}; AWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']); Object.defineProperty(apiLoader.services['elasticache'], '2015-02-02', { get: function get() { var model = __webpack_require__(78248); model.paginators = __webpack_require__(47954)/* .pagination */ .o; model.waiters = __webpack_require__(35402)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ElastiCache; /***/ }), /***/ 14897: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['elasticbeanstalk'] = {}; AWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']); Object.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', { get: function get() { var model = __webpack_require__(26770); model.paginators = __webpack_require__(14282)/* .pagination */ .o; model.waiters = __webpack_require__(125)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ElasticBeanstalk; /***/ }), /***/ 37708: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['elasticinference'] = {}; AWS.ElasticInference = Service.defineService('elasticinference', ['2017-07-25']); Object.defineProperty(apiLoader.services['elasticinference'], '2017-07-25', { get: function get() { var model = __webpack_require__(76263); model.paginators = __webpack_require__(73815)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ElasticInference; /***/ }), /***/ 40745: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['elastictranscoder'] = {}; AWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']); Object.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', { get: function get() { var model = __webpack_require__(45610); model.paginators = __webpack_require__(35370)/* .pagination */ .o; model.waiters = __webpack_require__(13314)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ElasticTranscoder; /***/ }), /***/ 10907: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['elb'] = {}; AWS.ELB = Service.defineService('elb', ['2012-06-01']); Object.defineProperty(apiLoader.services['elb'], '2012-06-01', { get: function get() { var model = __webpack_require__(16234); model.paginators = __webpack_require__(87921)/* .pagination */ .o; model.waiters = __webpack_require__(41073)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ELB; /***/ }), /***/ 44311: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['elbv2'] = {}; AWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']); Object.defineProperty(apiLoader.services['elbv2'], '2015-12-01', { get: function get() { var model = __webpack_require__(95067); model.paginators = __webpack_require__(49154)/* .pagination */ .o; model.waiters = __webpack_require__(14244)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ELBv2; /***/ }), /***/ 50470: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['emr'] = {}; AWS.EMR = Service.defineService('emr', ['2009-03-31']); Object.defineProperty(apiLoader.services['emr'], '2009-03-31', { get: function get() { var model = __webpack_require__(61812); model.paginators = __webpack_require__(45852)/* .pagination */ .o; model.waiters = __webpack_require__(70234)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EMR; /***/ }), /***/ 49984: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['emrcontainers'] = {}; AWS.EMRcontainers = Service.defineService('emrcontainers', ['2020-10-01']); Object.defineProperty(apiLoader.services['emrcontainers'], '2020-10-01', { get: function get() { var model = __webpack_require__(96210); model.paginators = __webpack_require__(83173)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EMRcontainers; /***/ }), /***/ 84462: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['es'] = {}; AWS.ES = Service.defineService('es', ['2015-01-01']); Object.defineProperty(apiLoader.services['es'], '2015-01-01', { get: function get() { var model = __webpack_require__(69235); model.paginators = __webpack_require__(5589)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ES; /***/ }), /***/ 898: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['eventbridge'] = {}; AWS.EventBridge = Service.defineService('eventbridge', ['2015-10-07']); Object.defineProperty(apiLoader.services['eventbridge'], '2015-10-07', { get: function get() { var model = __webpack_require__(16181); model.paginators = __webpack_require__(41745)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.EventBridge; /***/ }), /***/ 92831: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['firehose'] = {}; AWS.Firehose = Service.defineService('firehose', ['2015-08-04']); Object.defineProperty(apiLoader.services['firehose'], '2015-08-04', { get: function get() { var model = __webpack_require__(53370); model.paginators = __webpack_require__(16459)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Firehose; /***/ }), /***/ 73003: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['fis'] = {}; AWS.Fis = Service.defineService('fis', ['2020-12-01']); Object.defineProperty(apiLoader.services['fis'], '2020-12-01', { get: function get() { var model = __webpack_require__(75416); model.paginators = __webpack_require__(703)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Fis; /***/ }), /***/ 11316: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['fms'] = {}; AWS.FMS = Service.defineService('fms', ['2018-01-01']); Object.defineProperty(apiLoader.services['fms'], '2018-01-01', { get: function get() { var model = __webpack_require__(86359); model.paginators = __webpack_require__(47569)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.FMS; /***/ }), /***/ 36822: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['forecastqueryservice'] = {}; AWS.ForecastQueryService = Service.defineService('forecastqueryservice', ['2018-06-26']); Object.defineProperty(apiLoader.services['forecastqueryservice'], '2018-06-26', { get: function get() { var model = __webpack_require__(6430); model.paginators = __webpack_require__(30372)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ForecastQueryService; /***/ }), /***/ 12942: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['forecastservice'] = {}; AWS.ForecastService = Service.defineService('forecastservice', ['2018-06-26']); Object.defineProperty(apiLoader.services['forecastservice'], '2018-06-26', { get: function get() { var model = __webpack_require__(55586); model.paginators = __webpack_require__(83052)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ForecastService; /***/ }), /***/ 99830: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['frauddetector'] = {}; AWS.FraudDetector = Service.defineService('frauddetector', ['2019-11-15']); Object.defineProperty(apiLoader.services['frauddetector'], '2019-11-15', { get: function get() { var model = __webpack_require__(93807); model.paginators = __webpack_require__(32681)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.FraudDetector; /***/ }), /***/ 60642: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['fsx'] = {}; AWS.FSx = Service.defineService('fsx', ['2018-03-01']); Object.defineProperty(apiLoader.services['fsx'], '2018-03-01', { get: function get() { var model = __webpack_require__(85233); model.paginators = __webpack_require__(8719)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.FSx; /***/ }), /***/ 8085: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['gamelift'] = {}; AWS.GameLift = Service.defineService('gamelift', ['2015-10-01']); Object.defineProperty(apiLoader.services['gamelift'], '2015-10-01', { get: function get() { var model = __webpack_require__(71658); model.paginators = __webpack_require__(32274)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.GameLift; /***/ }), /***/ 63249: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['glacier'] = {}; AWS.Glacier = Service.defineService('glacier', ['2012-06-01']); __webpack_require__(14472); Object.defineProperty(apiLoader.services['glacier'], '2012-06-01', { get: function get() { var model = __webpack_require__(47563); model.paginators = __webpack_require__(77100)/* .pagination */ .o; model.waiters = __webpack_require__(81219)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Glacier; /***/ }), /***/ 19306: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['globalaccelerator'] = {}; AWS.GlobalAccelerator = Service.defineService('globalaccelerator', ['2018-08-08']); Object.defineProperty(apiLoader.services['globalaccelerator'], '2018-08-08', { get: function get() { var model = __webpack_require__(5157); model.paginators = __webpack_require__(9696)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.GlobalAccelerator; /***/ }), /***/ 31658: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['glue'] = {}; AWS.Glue = Service.defineService('glue', ['2017-03-31']); Object.defineProperty(apiLoader.services['glue'], '2017-03-31', { get: function get() { var model = __webpack_require__(91789); model.paginators = __webpack_require__(14005)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Glue; /***/ }), /***/ 20690: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['greengrass'] = {}; AWS.Greengrass = Service.defineService('greengrass', ['2017-06-07']); Object.defineProperty(apiLoader.services['greengrass'], '2017-06-07', { get: function get() { var model = __webpack_require__(25031); return model; }, enumerable: true, configurable: true }); module.exports = AWS.Greengrass; /***/ }), /***/ 45126: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['greengrassv2'] = {}; AWS.GreengrassV2 = Service.defineService('greengrassv2', ['2020-11-30']); Object.defineProperty(apiLoader.services['greengrassv2'], '2020-11-30', { get: function get() { var model = __webpack_require__(22710); model.paginators = __webpack_require__(94180)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.GreengrassV2; /***/ }), /***/ 80494: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['groundstation'] = {}; AWS.GroundStation = Service.defineService('groundstation', ['2019-05-23']); Object.defineProperty(apiLoader.services['groundstation'], '2019-05-23', { get: function get() { var model = __webpack_require__(78309); model.paginators = __webpack_require__(76938)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.GroundStation; /***/ }), /***/ 40755: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['guardduty'] = {}; AWS.GuardDuty = Service.defineService('guardduty', ['2017-11-28']); Object.defineProperty(apiLoader.services['guardduty'], '2017-11-28', { get: function get() { var model = __webpack_require__(89297); model.paginators = __webpack_require__(69484)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.GuardDuty; /***/ }), /***/ 21834: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['health'] = {}; AWS.Health = Service.defineService('health', ['2016-08-04']); Object.defineProperty(apiLoader.services['health'], '2016-08-04', { get: function get() { var model = __webpack_require__(48698); model.paginators = __webpack_require__(87844)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Health; /***/ }), /***/ 64254: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['healthlake'] = {}; AWS.HealthLake = Service.defineService('healthlake', ['2017-07-01']); Object.defineProperty(apiLoader.services['healthlake'], '2017-07-01', { get: function get() { var model = __webpack_require__(78700); model.paginators = __webpack_require__(31590)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.HealthLake; /***/ }), /***/ 38889: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['honeycode'] = {}; AWS.Honeycode = Service.defineService('honeycode', ['2020-03-01']); Object.defineProperty(apiLoader.services['honeycode'], '2020-03-01', { get: function get() { var model = __webpack_require__(77536); model.paginators = __webpack_require__(83349)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Honeycode; /***/ }), /***/ 50058: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iam'] = {}; AWS.IAM = Service.defineService('iam', ['2010-05-08']); Object.defineProperty(apiLoader.services['iam'], '2010-05-08', { get: function get() { var model = __webpack_require__(46818); model.paginators = __webpack_require__(49015)/* .pagination */ .o; model.waiters = __webpack_require__(48986)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IAM; /***/ }), /***/ 60222: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['identitystore'] = {}; AWS.IdentityStore = Service.defineService('identitystore', ['2020-06-15']); Object.defineProperty(apiLoader.services['identitystore'], '2020-06-15', { get: function get() { var model = __webpack_require__(14536); model.paginators = __webpack_require__(96554)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IdentityStore; /***/ }), /***/ 57511: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['imagebuilder'] = {}; AWS.Imagebuilder = Service.defineService('imagebuilder', ['2019-12-02']); Object.defineProperty(apiLoader.services['imagebuilder'], '2019-12-02', { get: function get() { var model = __webpack_require__(79595); model.paginators = __webpack_require__(57060)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Imagebuilder; /***/ }), /***/ 6769: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['importexport'] = {}; AWS.ImportExport = Service.defineService('importexport', ['2010-06-01']); Object.defineProperty(apiLoader.services['importexport'], '2010-06-01', { get: function get() { var model = __webpack_require__(85415); model.paginators = __webpack_require__(60069)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ImportExport; /***/ }), /***/ 89439: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['inspector'] = {}; AWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']); Object.defineProperty(apiLoader.services['inspector'], '2016-02-16', { get: function get() { var model = __webpack_require__(92652); model.paginators = __webpack_require__(98432)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Inspector; /***/ }), /***/ 98392: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iot'] = {}; AWS.Iot = Service.defineService('iot', ['2015-05-28']); Object.defineProperty(apiLoader.services['iot'], '2015-05-28', { get: function get() { var model = __webpack_require__(47091); model.paginators = __webpack_require__(39946)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Iot; /***/ }), /***/ 39474: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iot1clickdevicesservice'] = {}; AWS.IoT1ClickDevicesService = Service.defineService('iot1clickdevicesservice', ['2018-05-14']); Object.defineProperty(apiLoader.services['iot1clickdevicesservice'], '2018-05-14', { get: function get() { var model = __webpack_require__(69668); return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoT1ClickDevicesService; /***/ }), /***/ 4686: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iot1clickprojects'] = {}; AWS.IoT1ClickProjects = Service.defineService('iot1clickprojects', ['2018-05-14']); Object.defineProperty(apiLoader.services['iot1clickprojects'], '2018-05-14', { get: function get() { var model = __webpack_require__(66389); model.paginators = __webpack_require__(42078)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoT1ClickProjects; /***/ }), /***/ 67409: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotanalytics'] = {}; AWS.IoTAnalytics = Service.defineService('iotanalytics', ['2017-11-27']); Object.defineProperty(apiLoader.services['iotanalytics'], '2017-11-27', { get: function get() { var model = __webpack_require__(87696); model.paginators = __webpack_require__(58536)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTAnalytics; /***/ }), /***/ 6564: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotdata'] = {}; AWS.IotData = Service.defineService('iotdata', ['2015-05-28']); __webpack_require__(27062); Object.defineProperty(apiLoader.services['iotdata'], '2015-05-28', { get: function get() { var model = __webpack_require__(94126); model.paginators = __webpack_require__(6435)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IotData; /***/ }), /***/ 97569: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotdeviceadvisor'] = {}; AWS.IotDeviceAdvisor = Service.defineService('iotdeviceadvisor', ['2020-09-18']); Object.defineProperty(apiLoader.services['iotdeviceadvisor'], '2020-09-18', { get: function get() { var model = __webpack_require__(19317); model.paginators = __webpack_require__(9465)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IotDeviceAdvisor; /***/ }), /***/ 88065: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotevents'] = {}; AWS.IoTEvents = Service.defineService('iotevents', ['2018-07-27']); Object.defineProperty(apiLoader.services['iotevents'], '2018-07-27', { get: function get() { var model = __webpack_require__(55666); model.paginators = __webpack_require__(13523)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTEvents; /***/ }), /***/ 56973: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ioteventsdata'] = {}; AWS.IoTEventsData = Service.defineService('ioteventsdata', ['2018-10-23']); Object.defineProperty(apiLoader.services['ioteventsdata'], '2018-10-23', { get: function get() { var model = __webpack_require__(14647); model.paginators = __webpack_require__(12541)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTEventsData; /***/ }), /***/ 42513: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotfleethub'] = {}; AWS.IoTFleetHub = Service.defineService('iotfleethub', ['2020-11-03']); Object.defineProperty(apiLoader.services['iotfleethub'], '2020-11-03', { get: function get() { var model = __webpack_require__(53518); model.paginators = __webpack_require__(90350)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTFleetHub; /***/ }), /***/ 42332: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotjobsdataplane'] = {}; AWS.IoTJobsDataPlane = Service.defineService('iotjobsdataplane', ['2017-09-29']); Object.defineProperty(apiLoader.services['iotjobsdataplane'], '2017-09-29', { get: function get() { var model = __webpack_require__(27052); model.paginators = __webpack_require__(87653)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTJobsDataPlane; /***/ }), /***/ 98562: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotsecuretunneling'] = {}; AWS.IoTSecureTunneling = Service.defineService('iotsecuretunneling', ['2018-10-05']); Object.defineProperty(apiLoader.services['iotsecuretunneling'], '2018-10-05', { get: function get() { var model = __webpack_require__(47810); model.paginators = __webpack_require__(16978)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTSecureTunneling; /***/ }), /***/ 89690: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotsitewise'] = {}; AWS.IoTSiteWise = Service.defineService('iotsitewise', ['2019-12-02']); Object.defineProperty(apiLoader.services['iotsitewise'], '2019-12-02', { get: function get() { var model = __webpack_require__(94166); model.paginators = __webpack_require__(81755)/* .pagination */ .o; model.waiters = __webpack_require__(4197)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTSiteWise; /***/ }), /***/ 58905: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotthingsgraph'] = {}; AWS.IoTThingsGraph = Service.defineService('iotthingsgraph', ['2018-09-06']); Object.defineProperty(apiLoader.services['iotthingsgraph'], '2018-09-06', { get: function get() { var model = __webpack_require__(6038); model.paginators = __webpack_require__(91296)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTThingsGraph; /***/ }), /***/ 8226: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['iotwireless'] = {}; AWS.IoTWireless = Service.defineService('iotwireless', ['2020-11-22']); Object.defineProperty(apiLoader.services['iotwireless'], '2020-11-22', { get: function get() { var model = __webpack_require__(44396); model.paginators = __webpack_require__(31164)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IoTWireless; /***/ }), /***/ 67701: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ivs'] = {}; AWS.IVS = Service.defineService('ivs', ['2020-07-14']); Object.defineProperty(apiLoader.services['ivs'], '2020-07-14', { get: function get() { var model = __webpack_require__(41816); model.paginators = __webpack_require__(38184)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.IVS; /***/ }), /***/ 56775: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kafka'] = {}; AWS.Kafka = Service.defineService('kafka', ['2018-11-14']); Object.defineProperty(apiLoader.services['kafka'], '2018-11-14', { get: function get() { var model = __webpack_require__(52315); model.paginators = __webpack_require__(71066)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Kafka; /***/ }), /***/ 66122: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kendra'] = {}; AWS.Kendra = Service.defineService('kendra', ['2019-02-03']); Object.defineProperty(apiLoader.services['kendra'], '2019-02-03', { get: function get() { var model = __webpack_require__(61785); model.paginators = __webpack_require__(31633)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Kendra; /***/ }), /***/ 49876: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesis'] = {}; AWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']); Object.defineProperty(apiLoader.services['kinesis'], '2013-12-02', { get: function get() { var model = __webpack_require__(74556); model.paginators = __webpack_require__(38540)/* .pagination */ .o; model.waiters = __webpack_require__(80745)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Kinesis; /***/ }), /***/ 90042: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesisanalytics'] = {}; AWS.KinesisAnalytics = Service.defineService('kinesisanalytics', ['2015-08-14']); Object.defineProperty(apiLoader.services['kinesisanalytics'], '2015-08-14', { get: function get() { var model = __webpack_require__(91105); model.paginators = __webpack_require__(18363)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KinesisAnalytics; /***/ }), /***/ 74631: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesisanalyticsv2'] = {}; AWS.KinesisAnalyticsV2 = Service.defineService('kinesisanalyticsv2', ['2018-05-23']); Object.defineProperty(apiLoader.services['kinesisanalyticsv2'], '2018-05-23', { get: function get() { var model = __webpack_require__(70128); model.paginators = __webpack_require__(6842)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KinesisAnalyticsV2; /***/ }), /***/ 89927: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesisvideo'] = {}; AWS.KinesisVideo = Service.defineService('kinesisvideo', ['2017-09-30']); Object.defineProperty(apiLoader.services['kinesisvideo'], '2017-09-30', { get: function get() { var model = __webpack_require__(28189); model.paginators = __webpack_require__(15191)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KinesisVideo; /***/ }), /***/ 5580: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesisvideoarchivedmedia'] = {}; AWS.KinesisVideoArchivedMedia = Service.defineService('kinesisvideoarchivedmedia', ['2017-09-30']); Object.defineProperty(apiLoader.services['kinesisvideoarchivedmedia'], '2017-09-30', { get: function get() { var model = __webpack_require__(64288); model.paginators = __webpack_require__(78514)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KinesisVideoArchivedMedia; /***/ }), /***/ 81308: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesisvideomedia'] = {}; AWS.KinesisVideoMedia = Service.defineService('kinesisvideomedia', ['2017-09-30']); Object.defineProperty(apiLoader.services['kinesisvideomedia'], '2017-09-30', { get: function get() { var model = __webpack_require__(97818); model.paginators = __webpack_require__(16923)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KinesisVideoMedia; /***/ }), /***/ 12710: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kinesisvideosignalingchannels'] = {}; AWS.KinesisVideoSignalingChannels = Service.defineService('kinesisvideosignalingchannels', ['2019-12-04']); Object.defineProperty(apiLoader.services['kinesisvideosignalingchannels'], '2019-12-04', { get: function get() { var model = __webpack_require__(58849); model.paginators = __webpack_require__(10473)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KinesisVideoSignalingChannels; /***/ }), /***/ 56782: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['kms'] = {}; AWS.KMS = Service.defineService('kms', ['2014-11-01']); Object.defineProperty(apiLoader.services['kms'], '2014-11-01', { get: function get() { var model = __webpack_require__(60611); model.paginators = __webpack_require__(97690)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.KMS; /***/ }), /***/ 6726: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lakeformation'] = {}; AWS.LakeFormation = Service.defineService('lakeformation', ['2017-03-31']); Object.defineProperty(apiLoader.services['lakeformation'], '2017-03-31', { get: function get() { var model = __webpack_require__(65408); model.paginators = __webpack_require__(89923)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LakeFormation; /***/ }), /***/ 13321: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lambda'] = {}; AWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']); __webpack_require__(8452); Object.defineProperty(apiLoader.services['lambda'], '2014-11-11', { get: function get() { var model = __webpack_require__(63935); model.paginators = __webpack_require__(86208)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['lambda'], '2015-03-31', { get: function get() { var model = __webpack_require__(50409); model.paginators = __webpack_require__(98920)/* .pagination */ .o; model.waiters = __webpack_require__(37582)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Lambda; /***/ }), /***/ 37397: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lexmodelbuildingservice'] = {}; AWS.LexModelBuildingService = Service.defineService('lexmodelbuildingservice', ['2017-04-19']); Object.defineProperty(apiLoader.services['lexmodelbuildingservice'], '2017-04-19', { get: function get() { var model = __webpack_require__(57942); model.paginators = __webpack_require__(34148)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LexModelBuildingService; /***/ }), /***/ 27254: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lexmodelsv2'] = {}; AWS.LexModelsV2 = Service.defineService('lexmodelsv2', ['2020-08-07']); __webpack_require__(22922); Object.defineProperty(apiLoader.services['lexmodelsv2'], '2020-08-07', { get: function get() { var model = __webpack_require__(28033); model.paginators = __webpack_require__(20751)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LexModelsV2; /***/ }), /***/ 62716: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lexruntime'] = {}; AWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']); Object.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', { get: function get() { var model = __webpack_require__(28098); model.paginators = __webpack_require__(17108)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LexRuntime; /***/ }), /***/ 33855: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lexruntimev2'] = {}; AWS.LexRuntimeV2 = Service.defineService('lexruntimev2', ['2020-08-07']); Object.defineProperty(apiLoader.services['lexruntimev2'], '2020-08-07', { get: function get() { var model = __webpack_require__(72007); model.paginators = __webpack_require__(88199)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LexRuntimeV2; /***/ }), /***/ 34693: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['licensemanager'] = {}; AWS.LicenseManager = Service.defineService('licensemanager', ['2018-08-01']); Object.defineProperty(apiLoader.services['licensemanager'], '2018-08-01', { get: function get() { var model = __webpack_require__(58445); model.paginators = __webpack_require__(73736)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LicenseManager; /***/ }), /***/ 22718: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lightsail'] = {}; AWS.Lightsail = Service.defineService('lightsail', ['2016-11-28']); Object.defineProperty(apiLoader.services['lightsail'], '2016-11-28', { get: function get() { var model = __webpack_require__(59034); model.paginators = __webpack_require__(96768)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Lightsail; /***/ }), /***/ 44594: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['location'] = {}; AWS.Location = Service.defineService('location', ['2020-11-19']); Object.defineProperty(apiLoader.services['location'], '2020-11-19', { get: function get() { var model = __webpack_require__(77371); model.paginators = __webpack_require__(23890)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Location; /***/ }), /***/ 21843: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lookoutequipment'] = {}; AWS.LookoutEquipment = Service.defineService('lookoutequipment', ['2020-12-15']); Object.defineProperty(apiLoader.services['lookoutequipment'], '2020-12-15', { get: function get() { var model = __webpack_require__(31015); model.paginators = __webpack_require__(93065)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LookoutEquipment; /***/ }), /***/ 78708: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lookoutmetrics'] = {}; AWS.LookoutMetrics = Service.defineService('lookoutmetrics', ['2017-07-25']); __webpack_require__(64605); Object.defineProperty(apiLoader.services['lookoutmetrics'], '2017-07-25', { get: function get() { var model = __webpack_require__(99604); model.paginators = __webpack_require__(86272)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LookoutMetrics; /***/ }), /***/ 65046: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['lookoutvision'] = {}; AWS.LookoutVision = Service.defineService('lookoutvision', ['2020-11-20']); Object.defineProperty(apiLoader.services['lookoutvision'], '2020-11-20', { get: function get() { var model = __webpack_require__(43317); model.paginators = __webpack_require__(34273)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.LookoutVision; /***/ }), /***/ 82907: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['machinelearning'] = {}; AWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']); __webpack_require__(19174); Object.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', { get: function get() { var model = __webpack_require__(41946); model.paginators = __webpack_require__(11688)/* .pagination */ .o; model.waiters = __webpack_require__(92349)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MachineLearning; /***/ }), /***/ 86427: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['macie'] = {}; AWS.Macie = Service.defineService('macie', ['2017-12-19']); Object.defineProperty(apiLoader.services['macie'], '2017-12-19', { get: function get() { var model = __webpack_require__(27101); model.paginators = __webpack_require__(9057)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Macie; /***/ }), /***/ 57330: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['macie2'] = {}; AWS.Macie2 = Service.defineService('macie2', ['2020-01-01']); Object.defineProperty(apiLoader.services['macie2'], '2020-01-01', { get: function get() { var model = __webpack_require__(27105); model.paginators = __webpack_require__(93284)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Macie2; /***/ }), /***/ 85143: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['managedblockchain'] = {}; AWS.ManagedBlockchain = Service.defineService('managedblockchain', ['2018-09-24']); Object.defineProperty(apiLoader.services['managedblockchain'], '2018-09-24', { get: function get() { var model = __webpack_require__(70690); model.paginators = __webpack_require__(45932)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ManagedBlockchain; /***/ }), /***/ 2609: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['marketplacecatalog'] = {}; AWS.MarketplaceCatalog = Service.defineService('marketplacecatalog', ['2018-09-17']); Object.defineProperty(apiLoader.services['marketplacecatalog'], '2018-09-17', { get: function get() { var model = __webpack_require__(15560); model.paginators = __webpack_require__(23129)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MarketplaceCatalog; /***/ }), /***/ 4540: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['marketplacecommerceanalytics'] = {}; AWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']); Object.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', { get: function get() { var model = __webpack_require__(30768); model.paginators = __webpack_require__(88266)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MarketplaceCommerceAnalytics; /***/ }), /***/ 53707: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['marketplaceentitlementservice'] = {}; AWS.MarketplaceEntitlementService = Service.defineService('marketplaceentitlementservice', ['2017-01-11']); Object.defineProperty(apiLoader.services['marketplaceentitlementservice'], '2017-01-11', { get: function get() { var model = __webpack_require__(23864); model.paginators = __webpack_require__(98218)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MarketplaceEntitlementService; /***/ }), /***/ 39297: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['marketplacemetering'] = {}; AWS.MarketplaceMetering = Service.defineService('marketplacemetering', ['2016-01-14']); Object.defineProperty(apiLoader.services['marketplacemetering'], '2016-01-14', { get: function get() { var model = __webpack_require__(150); model.paginators = __webpack_require__(34742)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MarketplaceMetering; /***/ }), /***/ 67639: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediaconnect'] = {}; AWS.MediaConnect = Service.defineService('mediaconnect', ['2018-11-14']); Object.defineProperty(apiLoader.services['mediaconnect'], '2018-11-14', { get: function get() { var model = __webpack_require__(38828); model.paginators = __webpack_require__(52701)/* .pagination */ .o; model.waiters = __webpack_require__(69547)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaConnect; /***/ }), /***/ 57220: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediaconvert'] = {}; AWS.MediaConvert = Service.defineService('mediaconvert', ['2017-08-29']); Object.defineProperty(apiLoader.services['mediaconvert'], '2017-08-29', { get: function get() { var model = __webpack_require__(95103); model.paginators = __webpack_require__(12236)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaConvert; /***/ }), /***/ 7509: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['medialive'] = {}; AWS.MediaLive = Service.defineService('medialive', ['2017-10-14']); Object.defineProperty(apiLoader.services['medialive'], '2017-10-14', { get: function get() { var model = __webpack_require__(71020); model.paginators = __webpack_require__(45939)/* .pagination */ .o; model.waiters = __webpack_require__(77702)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaLive; /***/ }), /***/ 91620: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediapackage'] = {}; AWS.MediaPackage = Service.defineService('mediapackage', ['2017-10-12']); Object.defineProperty(apiLoader.services['mediapackage'], '2017-10-12', { get: function get() { var model = __webpack_require__(3524); model.paginators = __webpack_require__(28168)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaPackage; /***/ }), /***/ 14962: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediapackagevod'] = {}; AWS.MediaPackageVod = Service.defineService('mediapackagevod', ['2018-11-07']); Object.defineProperty(apiLoader.services['mediapackagevod'], '2018-11-07', { get: function get() { var model = __webpack_require__(62182); model.paginators = __webpack_require__(9108)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaPackageVod; /***/ }), /***/ 83748: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediastore'] = {}; AWS.MediaStore = Service.defineService('mediastore', ['2017-09-01']); Object.defineProperty(apiLoader.services['mediastore'], '2017-09-01', { get: function get() { var model = __webpack_require__(86331); model.paginators = __webpack_require__(85011)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaStore; /***/ }), /***/ 98703: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediastoredata'] = {}; AWS.MediaStoreData = Service.defineService('mediastoredata', ['2017-09-01']); Object.defineProperty(apiLoader.services['mediastoredata'], '2017-09-01', { get: function get() { var model = __webpack_require__(78855); model.paginators = __webpack_require__(12340)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaStoreData; /***/ }), /***/ 99658: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mediatailor'] = {}; AWS.MediaTailor = Service.defineService('mediatailor', ['2018-04-23']); Object.defineProperty(apiLoader.services['mediatailor'], '2018-04-23', { get: function get() { var model = __webpack_require__(32863); model.paginators = __webpack_require__(76134)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MediaTailor; /***/ }), /***/ 41339: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mgn'] = {}; AWS.Mgn = Service.defineService('mgn', ['2020-02-26']); Object.defineProperty(apiLoader.services['mgn'], '2020-02-26', { get: function get() { var model = __webpack_require__(96297); model.paginators = __webpack_require__(36566)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Mgn; /***/ }), /***/ 14688: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['migrationhub'] = {}; AWS.MigrationHub = Service.defineService('migrationhub', ['2017-05-31']); Object.defineProperty(apiLoader.services['migrationhub'], '2017-05-31', { get: function get() { var model = __webpack_require__(51639); model.paginators = __webpack_require__(63013)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MigrationHub; /***/ }), /***/ 62658: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['migrationhubconfig'] = {}; AWS.MigrationHubConfig = Service.defineService('migrationhubconfig', ['2019-06-30']); Object.defineProperty(apiLoader.services['migrationhubconfig'], '2019-06-30', { get: function get() { var model = __webpack_require__(89101); model.paginators = __webpack_require__(59977)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MigrationHubConfig; /***/ }), /***/ 39782: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mobile'] = {}; AWS.Mobile = Service.defineService('mobile', ['2017-07-01']); Object.defineProperty(apiLoader.services['mobile'], '2017-07-01', { get: function get() { var model = __webpack_require__(44027); model.paginators = __webpack_require__(81940)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Mobile; /***/ }), /***/ 66690: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mobileanalytics'] = {}; AWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']); Object.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', { get: function get() { var model = __webpack_require__(40634); return model; }, enumerable: true, configurable: true }); module.exports = AWS.MobileAnalytics; /***/ }), /***/ 23093: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mq'] = {}; AWS.MQ = Service.defineService('mq', ['2017-11-27']); Object.defineProperty(apiLoader.services['mq'], '2017-11-27', { get: function get() { var model = __webpack_require__(73219); model.paginators = __webpack_require__(59835)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MQ; /***/ }), /***/ 79954: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mturk'] = {}; AWS.MTurk = Service.defineService('mturk', ['2017-01-17']); Object.defineProperty(apiLoader.services['mturk'], '2017-01-17', { get: function get() { var model = __webpack_require__(55676); model.paginators = __webpack_require__(51396)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MTurk; /***/ }), /***/ 32712: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['mwaa'] = {}; AWS.MWAA = Service.defineService('mwaa', ['2020-07-01']); Object.defineProperty(apiLoader.services['mwaa'], '2020-07-01', { get: function get() { var model = __webpack_require__(3499); model.paginators = __webpack_require__(30606)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.MWAA; /***/ }), /***/ 30047: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['neptune'] = {}; AWS.Neptune = Service.defineService('neptune', ['2014-10-31']); __webpack_require__(73090); Object.defineProperty(apiLoader.services['neptune'], '2014-10-31', { get: function get() { var model = __webpack_require__(44749); model.paginators = __webpack_require__(36058)/* .pagination */ .o; model.waiters = __webpack_require__(83629)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Neptune; /***/ }), /***/ 84626: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['networkfirewall'] = {}; AWS.NetworkFirewall = Service.defineService('networkfirewall', ['2020-11-12']); Object.defineProperty(apiLoader.services['networkfirewall'], '2020-11-12', { get: function get() { var model = __webpack_require__(71930); model.paginators = __webpack_require__(50334)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.NetworkFirewall; /***/ }), /***/ 37610: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['networkmanager'] = {}; AWS.NetworkManager = Service.defineService('networkmanager', ['2019-07-05']); Object.defineProperty(apiLoader.services['networkmanager'], '2019-07-05', { get: function get() { var model = __webpack_require__(11902); model.paginators = __webpack_require__(91477)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.NetworkManager; /***/ }), /***/ 75691: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['opsworks'] = {}; AWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']); Object.defineProperty(apiLoader.services['opsworks'], '2013-02-18', { get: function get() { var model = __webpack_require__(95315); model.paginators = __webpack_require__(63589)/* .pagination */ .o; model.waiters = __webpack_require__(8700)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.OpsWorks; /***/ }), /***/ 80388: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['opsworkscm'] = {}; AWS.OpsWorksCM = Service.defineService('opsworkscm', ['2016-11-01']); Object.defineProperty(apiLoader.services['opsworkscm'], '2016-11-01', { get: function get() { var model = __webpack_require__(25033); model.paginators = __webpack_require__(68422)/* .pagination */ .o; model.waiters = __webpack_require__(89353)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.OpsWorksCM; /***/ }), /***/ 44670: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['organizations'] = {}; AWS.Organizations = Service.defineService('organizations', ['2016-11-28']); Object.defineProperty(apiLoader.services['organizations'], '2016-11-28', { get: function get() { var model = __webpack_require__(28258); model.paginators = __webpack_require__(70916)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Organizations; /***/ }), /***/ 27551: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['outposts'] = {}; AWS.Outposts = Service.defineService('outposts', ['2019-12-03']); Object.defineProperty(apiLoader.services['outposts'], '2019-12-03', { get: function get() { var model = __webpack_require__(79304); model.paginators = __webpack_require__(91740)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Outposts; /***/ }), /***/ 33696: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['personalize'] = {}; AWS.Personalize = Service.defineService('personalize', ['2018-05-22']); Object.defineProperty(apiLoader.services['personalize'], '2018-05-22', { get: function get() { var model = __webpack_require__(16402); model.paginators = __webpack_require__(76828)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Personalize; /***/ }), /***/ 88170: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['personalizeevents'] = {}; AWS.PersonalizeEvents = Service.defineService('personalizeevents', ['2018-03-22']); Object.defineProperty(apiLoader.services['personalizeevents'], '2018-03-22', { get: function get() { var model = __webpack_require__(8792); model.paginators = __webpack_require__(52110)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.PersonalizeEvents; /***/ }), /***/ 66184: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['personalizeruntime'] = {}; AWS.PersonalizeRuntime = Service.defineService('personalizeruntime', ['2018-05-22']); Object.defineProperty(apiLoader.services['personalizeruntime'], '2018-05-22', { get: function get() { var model = __webpack_require__(86682); model.paginators = __webpack_require__(32049)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.PersonalizeRuntime; /***/ }), /***/ 15505: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['pi'] = {}; AWS.PI = Service.defineService('pi', ['2018-02-27']); Object.defineProperty(apiLoader.services['pi'], '2018-02-27', { get: function get() { var model = __webpack_require__(38006); model.paginators = __webpack_require__(75147)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.PI; /***/ }), /***/ 18388: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['pinpoint'] = {}; AWS.Pinpoint = Service.defineService('pinpoint', ['2016-12-01']); Object.defineProperty(apiLoader.services['pinpoint'], '2016-12-01', { get: function get() { var model = __webpack_require__(73536); return model; }, enumerable: true, configurable: true }); module.exports = AWS.Pinpoint; /***/ }), /***/ 83060: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['pinpointemail'] = {}; AWS.PinpointEmail = Service.defineService('pinpointemail', ['2018-07-26']); Object.defineProperty(apiLoader.services['pinpointemail'], '2018-07-26', { get: function get() { var model = __webpack_require__(42680); model.paginators = __webpack_require__(58107)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.PinpointEmail; /***/ }), /***/ 46605: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['pinpointsmsvoice'] = {}; AWS.PinpointSMSVoice = Service.defineService('pinpointsmsvoice', ['2018-09-05']); Object.defineProperty(apiLoader.services['pinpointsmsvoice'], '2018-09-05', { get: function get() { var model = __webpack_require__(6641); return model; }, enumerable: true, configurable: true }); module.exports = AWS.PinpointSMSVoice; /***/ }), /***/ 97332: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['polly'] = {}; AWS.Polly = Service.defineService('polly', ['2016-06-10']); __webpack_require__(53199); Object.defineProperty(apiLoader.services['polly'], '2016-06-10', { get: function get() { var model = __webpack_require__(58020); model.paginators = __webpack_require__(28573)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Polly; /***/ }), /***/ 92765: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['pricing'] = {}; AWS.Pricing = Service.defineService('pricing', ['2017-10-15']); Object.defineProperty(apiLoader.services['pricing'], '2017-10-15', { get: function get() { var model = __webpack_require__(19792); model.paginators = __webpack_require__(45992)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Pricing; /***/ }), /***/ 71266: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['qldb'] = {}; AWS.QLDB = Service.defineService('qldb', ['2019-01-02']); Object.defineProperty(apiLoader.services['qldb'], '2019-01-02', { get: function get() { var model = __webpack_require__(52675); model.paginators = __webpack_require__(4367)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.QLDB; /***/ }), /***/ 55423: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['qldbsession'] = {}; AWS.QLDBSession = Service.defineService('qldbsession', ['2019-07-11']); Object.defineProperty(apiLoader.services['qldbsession'], '2019-07-11', { get: function get() { var model = __webpack_require__(67426); model.paginators = __webpack_require__(96527)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.QLDBSession; /***/ }), /***/ 29898: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['quicksight'] = {}; AWS.QuickSight = Service.defineService('quicksight', ['2018-04-01']); Object.defineProperty(apiLoader.services['quicksight'], '2018-04-01', { get: function get() { var model = __webpack_require__(6807); model.paginators = __webpack_require__(81489)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.QuickSight; /***/ }), /***/ 94394: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ram'] = {}; AWS.RAM = Service.defineService('ram', ['2018-01-04']); Object.defineProperty(apiLoader.services['ram'], '2018-01-04', { get: function get() { var model = __webpack_require__(83728); model.paginators = __webpack_require__(83147)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.RAM; /***/ }), /***/ 71578: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['rds'] = {}; AWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01', '2014-09-01*', '2014-10-31']); __webpack_require__(71928); Object.defineProperty(apiLoader.services['rds'], '2013-01-10', { get: function get() { var model = __webpack_require__(56144); model.paginators = __webpack_require__(76660)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['rds'], '2013-02-12', { get: function get() { var model = __webpack_require__(15633); model.paginators = __webpack_require__(37654)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['rds'], '2013-09-09', { get: function get() { var model = __webpack_require__(53439); model.paginators = __webpack_require__(17223)/* .pagination */ .o; model.waiters = __webpack_require__(60967)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['rds'], '2014-09-01', { get: function get() { var model = __webpack_require__(72333); model.paginators = __webpack_require__(86022)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); Object.defineProperty(apiLoader.services['rds'], '2014-10-31', { get: function get() { var model = __webpack_require__(6210); model.paginators = __webpack_require__(60972)/* .pagination */ .o; model.waiters = __webpack_require__(6606)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.RDS; /***/ }), /***/ 30147: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['rdsdataservice'] = {}; AWS.RDSDataService = Service.defineService('rdsdataservice', ['2018-08-01']); __webpack_require__(64070); Object.defineProperty(apiLoader.services['rdsdataservice'], '2018-08-01', { get: function get() { var model = __webpack_require__(4983); model.paginators = __webpack_require__(1270)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.RDSDataService; /***/ }), /***/ 84853: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['redshift'] = {}; AWS.Redshift = Service.defineService('redshift', ['2012-12-01']); Object.defineProperty(apiLoader.services['redshift'], '2012-12-01', { get: function get() { var model = __webpack_require__(17066); model.paginators = __webpack_require__(7755)/* .pagination */ .o; model.waiters = __webpack_require__(91400)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Redshift; /***/ }), /***/ 203: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['redshiftdata'] = {}; AWS.RedshiftData = Service.defineService('redshiftdata', ['2019-12-20']); Object.defineProperty(apiLoader.services['redshiftdata'], '2019-12-20', { get: function get() { var model = __webpack_require__(34805); model.paginators = __webpack_require__(28484)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.RedshiftData; /***/ }), /***/ 65470: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['rekognition'] = {}; AWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']); Object.defineProperty(apiLoader.services['rekognition'], '2016-06-27', { get: function get() { var model = __webpack_require__(65852); model.paginators = __webpack_require__(49860)/* .pagination */ .o; model.waiters = __webpack_require__(19491)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Rekognition; /***/ }), /***/ 58756: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['resourcegroups'] = {}; AWS.ResourceGroups = Service.defineService('resourcegroups', ['2017-11-27']); Object.defineProperty(apiLoader.services['resourcegroups'], '2017-11-27', { get: function get() { var model = __webpack_require__(28629); model.paginators = __webpack_require__(71378)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ResourceGroups; /***/ }), /***/ 7385: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['resourcegroupstaggingapi'] = {}; AWS.ResourceGroupsTaggingAPI = Service.defineService('resourcegroupstaggingapi', ['2017-01-26']); Object.defineProperty(apiLoader.services['resourcegroupstaggingapi'], '2017-01-26', { get: function get() { var model = __webpack_require__(83914); model.paginators = __webpack_require__(64865)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ResourceGroupsTaggingAPI; /***/ }), /***/ 18068: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['robomaker'] = {}; AWS.RoboMaker = Service.defineService('robomaker', ['2018-06-29']); Object.defineProperty(apiLoader.services['robomaker'], '2018-06-29', { get: function get() { var model = __webpack_require__(36854); model.paginators = __webpack_require__(52592)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.RoboMaker; /***/ }), /***/ 44968: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['route53'] = {}; AWS.Route53 = Service.defineService('route53', ['2013-04-01']); __webpack_require__(69627); Object.defineProperty(apiLoader.services['route53'], '2013-04-01', { get: function get() { var model = __webpack_require__(91499); model.paginators = __webpack_require__(54519)/* .pagination */ .o; model.waiters = __webpack_require__(4628)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Route53; /***/ }), /***/ 51994: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['route53domains'] = {}; AWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']); Object.defineProperty(apiLoader.services['route53domains'], '2014-05-15', { get: function get() { var model = __webpack_require__(6535); model.paginators = __webpack_require__(26777)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Route53Domains; /***/ }), /***/ 25894: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['route53resolver'] = {}; AWS.Route53Resolver = Service.defineService('route53resolver', ['2018-04-01']); Object.defineProperty(apiLoader.services['route53resolver'], '2018-04-01', { get: function get() { var model = __webpack_require__(99309); model.paginators = __webpack_require__(21261)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Route53Resolver; /***/ }), /***/ 83256: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['s3'] = {}; AWS.S3 = Service.defineService('s3', ['2006-03-01']); __webpack_require__(26543); Object.defineProperty(apiLoader.services['s3'], '2006-03-01', { get: function get() { var model = __webpack_require__(32581); model.paginators = __webpack_require__(53175)/* .pagination */ .o; model.waiters = __webpack_require__(44494)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.S3; /***/ }), /***/ 99817: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['s3control'] = {}; AWS.S3Control = Service.defineService('s3control', ['2018-08-20']); __webpack_require__(71207); Object.defineProperty(apiLoader.services['s3control'], '2018-08-20', { get: function get() { var model = __webpack_require__(52092); model.paginators = __webpack_require__(62498)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.S3Control; /***/ }), /***/ 90493: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['s3outposts'] = {}; AWS.S3Outposts = Service.defineService('s3outposts', ['2017-07-25']); Object.defineProperty(apiLoader.services['s3outposts'], '2017-07-25', { get: function get() { var model = __webpack_require__(90331); model.paginators = __webpack_require__(8746)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.S3Outposts; /***/ }), /***/ 77657: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sagemaker'] = {}; AWS.SageMaker = Service.defineService('sagemaker', ['2017-07-24']); Object.defineProperty(apiLoader.services['sagemaker'], '2017-07-24', { get: function get() { var model = __webpack_require__(20227); model.paginators = __webpack_require__(44955)/* .pagination */ .o; model.waiters = __webpack_require__(50026)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SageMaker; /***/ }), /***/ 38966: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sagemakeredge'] = {}; AWS.SagemakerEdge = Service.defineService('sagemakeredge', ['2020-09-23']); Object.defineProperty(apiLoader.services['sagemakeredge'], '2020-09-23', { get: function get() { var model = __webpack_require__(48750); model.paginators = __webpack_require__(2769)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SagemakerEdge; /***/ }), /***/ 67644: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sagemakerfeaturestoreruntime'] = {}; AWS.SageMakerFeatureStoreRuntime = Service.defineService('sagemakerfeaturestoreruntime', ['2020-07-01']); Object.defineProperty(apiLoader.services['sagemakerfeaturestoreruntime'], '2020-07-01', { get: function get() { var model = __webpack_require__(98420); model.paginators = __webpack_require__(45590)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SageMakerFeatureStoreRuntime; /***/ }), /***/ 85044: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sagemakerruntime'] = {}; AWS.SageMakerRuntime = Service.defineService('sagemakerruntime', ['2017-05-13']); Object.defineProperty(apiLoader.services['sagemakerruntime'], '2017-05-13', { get: function get() { var model = __webpack_require__(82783); model.paginators = __webpack_require__(17272)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SageMakerRuntime; /***/ }), /***/ 62825: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['savingsplans'] = {}; AWS.SavingsPlans = Service.defineService('savingsplans', ['2019-06-28']); Object.defineProperty(apiLoader.services['savingsplans'], '2019-06-28', { get: function get() { var model = __webpack_require__(2810); model.paginators = __webpack_require__(56794)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SavingsPlans; /***/ }), /***/ 55713: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['schemas'] = {}; AWS.Schemas = Service.defineService('schemas', ['2019-12-02']); Object.defineProperty(apiLoader.services['schemas'], '2019-12-02', { get: function get() { var model = __webpack_require__(85225); model.paginators = __webpack_require__(50738)/* .pagination */ .o; model.waiters = __webpack_require__(34671)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Schemas; /***/ }), /***/ 85131: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['secretsmanager'] = {}; AWS.SecretsManager = Service.defineService('secretsmanager', ['2017-10-17']); Object.defineProperty(apiLoader.services['secretsmanager'], '2017-10-17', { get: function get() { var model = __webpack_require__(97209); model.paginators = __webpack_require__(38503)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SecretsManager; /***/ }), /***/ 21550: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['securityhub'] = {}; AWS.SecurityHub = Service.defineService('securityhub', ['2018-10-26']); Object.defineProperty(apiLoader.services['securityhub'], '2018-10-26', { get: function get() { var model = __webpack_require__(40359); model.paginators = __webpack_require__(27612)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SecurityHub; /***/ }), /***/ 62402: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['serverlessapplicationrepository'] = {}; AWS.ServerlessApplicationRepository = Service.defineService('serverlessapplicationrepository', ['2017-09-08']); Object.defineProperty(apiLoader.services['serverlessapplicationrepository'], '2017-09-08', { get: function get() { var model = __webpack_require__(8591); model.paginators = __webpack_require__(96164)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ServerlessApplicationRepository; /***/ }), /***/ 822: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['servicecatalog'] = {}; AWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']); Object.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', { get: function get() { var model = __webpack_require__(80503); model.paginators = __webpack_require__(71855)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ServiceCatalog; /***/ }), /***/ 79068: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['servicecatalogappregistry'] = {}; AWS.ServiceCatalogAppRegistry = Service.defineService('servicecatalogappregistry', ['2020-06-24']); Object.defineProperty(apiLoader.services['servicecatalogappregistry'], '2020-06-24', { get: function get() { var model = __webpack_require__(47635); model.paginators = __webpack_require__(67278)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ServiceCatalogAppRegistry; /***/ }), /***/ 91569: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['servicediscovery'] = {}; AWS.ServiceDiscovery = Service.defineService('servicediscovery', ['2017-03-14']); Object.defineProperty(apiLoader.services['servicediscovery'], '2017-03-14', { get: function get() { var model = __webpack_require__(20459); model.paginators = __webpack_require__(19834)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ServiceDiscovery; /***/ }), /***/ 57800: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['servicequotas'] = {}; AWS.ServiceQuotas = Service.defineService('servicequotas', ['2019-06-24']); Object.defineProperty(apiLoader.services['servicequotas'], '2019-06-24', { get: function get() { var model = __webpack_require__(14304); model.paginators = __webpack_require__(90635)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.ServiceQuotas; /***/ }), /***/ 46816: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ses'] = {}; AWS.SES = Service.defineService('ses', ['2010-12-01']); Object.defineProperty(apiLoader.services['ses'], '2010-12-01', { get: function get() { var model = __webpack_require__(87825); model.paginators = __webpack_require__(61348)/* .pagination */ .o; model.waiters = __webpack_require__(84476)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SES; /***/ }), /***/ 20142: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sesv2'] = {}; AWS.SESV2 = Service.defineService('sesv2', ['2019-09-27']); Object.defineProperty(apiLoader.services['sesv2'], '2019-09-27', { get: function get() { var model = __webpack_require__(32530); model.paginators = __webpack_require__(39567)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SESV2; /***/ }), /***/ 20271: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['shield'] = {}; AWS.Shield = Service.defineService('shield', ['2016-06-02']); Object.defineProperty(apiLoader.services['shield'], '2016-06-02', { get: function get() { var model = __webpack_require__(78621); model.paginators = __webpack_require__(75743)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Shield; /***/ }), /***/ 71596: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['signer'] = {}; AWS.Signer = Service.defineService('signer', ['2017-08-25']); Object.defineProperty(apiLoader.services['signer'], '2017-08-25', { get: function get() { var model = __webpack_require__(21884); model.paginators = __webpack_require__(69839)/* .pagination */ .o; model.waiters = __webpack_require__(61331)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Signer; /***/ }), /***/ 10120: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['simpledb'] = {}; AWS.SimpleDB = Service.defineService('simpledb', ['2009-04-15']); Object.defineProperty(apiLoader.services['simpledb'], '2009-04-15', { get: function get() { var model = __webpack_require__(96016); model.paginators = __webpack_require__(73820)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SimpleDB; /***/ }), /***/ 57719: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sms'] = {}; AWS.SMS = Service.defineService('sms', ['2016-10-24']); Object.defineProperty(apiLoader.services['sms'], '2016-10-24', { get: function get() { var model = __webpack_require__(51530); model.paginators = __webpack_require__(72874)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SMS; /***/ }), /***/ 510: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['snowball'] = {}; AWS.Snowball = Service.defineService('snowball', ['2016-06-30']); Object.defineProperty(apiLoader.services['snowball'], '2016-06-30', { get: function get() { var model = __webpack_require__(41624); model.paginators = __webpack_require__(14147)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Snowball; /***/ }), /***/ 28581: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sns'] = {}; AWS.SNS = Service.defineService('sns', ['2010-03-31']); Object.defineProperty(apiLoader.services['sns'], '2010-03-31', { get: function get() { var model = __webpack_require__(22671); model.paginators = __webpack_require__(92788)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SNS; /***/ }), /***/ 63172: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sqs'] = {}; AWS.SQS = Service.defineService('sqs', ['2012-11-05']); __webpack_require__(94571); Object.defineProperty(apiLoader.services['sqs'], '2012-11-05', { get: function get() { var model = __webpack_require__(31635); model.paginators = __webpack_require__(48324)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SQS; /***/ }), /***/ 83380: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ssm'] = {}; AWS.SSM = Service.defineService('ssm', ['2014-11-06']); Object.defineProperty(apiLoader.services['ssm'], '2014-11-06', { get: function get() { var model = __webpack_require__(7667); model.paginators = __webpack_require__(84951)/* .pagination */ .o; model.waiters = __webpack_require__(80315)/* .waiters */ .V; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SSM; /***/ }), /***/ 71096: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sso'] = {}; AWS.SSO = Service.defineService('sso', ['2019-06-10']); Object.defineProperty(apiLoader.services['sso'], '2019-06-10', { get: function get() { var model = __webpack_require__(77888); model.paginators = __webpack_require__(18046)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SSO; /***/ }), /***/ 66644: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ssoadmin'] = {}; AWS.SSOAdmin = Service.defineService('ssoadmin', ['2020-07-20']); Object.defineProperty(apiLoader.services['ssoadmin'], '2020-07-20', { get: function get() { var model = __webpack_require__(93165); model.paginators = __webpack_require__(61022)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SSOAdmin; /***/ }), /***/ 49870: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['ssooidc'] = {}; AWS.SSOOIDC = Service.defineService('ssooidc', ['2019-06-10']); Object.defineProperty(apiLoader.services['ssooidc'], '2019-06-10', { get: function get() { var model = __webpack_require__(43979); model.paginators = __webpack_require__(16125)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SSOOIDC; /***/ }), /***/ 8136: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['stepfunctions'] = {}; AWS.StepFunctions = Service.defineService('stepfunctions', ['2016-11-23']); Object.defineProperty(apiLoader.services['stepfunctions'], '2016-11-23', { get: function get() { var model = __webpack_require__(58492); model.paginators = __webpack_require__(95424)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.StepFunctions; /***/ }), /***/ 89190: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['storagegateway'] = {}; AWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']); Object.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', { get: function get() { var model = __webpack_require__(33480); model.paginators = __webpack_require__(6062)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.StorageGateway; /***/ }), /***/ 57513: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['sts'] = {}; AWS.STS = Service.defineService('sts', ['2011-06-15']); __webpack_require__(91055); Object.defineProperty(apiLoader.services['sts'], '2011-06-15', { get: function get() { var model = __webpack_require__(18976); model.paginators = __webpack_require__(82952)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.STS; /***/ }), /***/ 1099: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['support'] = {}; AWS.Support = Service.defineService('support', ['2013-04-15']); Object.defineProperty(apiLoader.services['support'], '2013-04-15', { get: function get() { var model = __webpack_require__(77180); model.paginators = __webpack_require__(83878)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Support; /***/ }), /***/ 32327: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['swf'] = {}; AWS.SWF = Service.defineService('swf', ['2012-01-25']); __webpack_require__(31987); Object.defineProperty(apiLoader.services['swf'], '2012-01-25', { get: function get() { var model = __webpack_require__(4974); model.paginators = __webpack_require__(65798)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.SWF; /***/ }), /***/ 25910: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['synthetics'] = {}; AWS.Synthetics = Service.defineService('synthetics', ['2017-10-11']); Object.defineProperty(apiLoader.services['synthetics'], '2017-10-11', { get: function get() { var model = __webpack_require__(82853); model.paginators = __webpack_require__(27742)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Synthetics; /***/ }), /***/ 58523: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['textract'] = {}; AWS.Textract = Service.defineService('textract', ['2018-06-27']); Object.defineProperty(apiLoader.services['textract'], '2018-06-27', { get: function get() { var model = __webpack_require__(66368); model.paginators = __webpack_require__(75909)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Textract; /***/ }), /***/ 24529: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['timestreamquery'] = {}; AWS.TimestreamQuery = Service.defineService('timestreamquery', ['2018-11-01']); Object.defineProperty(apiLoader.services['timestreamquery'], '2018-11-01', { get: function get() { var model = __webpack_require__(27578); model.paginators = __webpack_require__(99094)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.TimestreamQuery; /***/ }), /***/ 1573: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['timestreamwrite'] = {}; AWS.TimestreamWrite = Service.defineService('timestreamwrite', ['2018-11-01']); Object.defineProperty(apiLoader.services['timestreamwrite'], '2018-11-01', { get: function get() { var model = __webpack_require__(79095); model.paginators = __webpack_require__(50262)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.TimestreamWrite; /***/ }), /***/ 75811: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['transcribeservice'] = {}; AWS.TranscribeService = Service.defineService('transcribeservice', ['2017-10-26']); Object.defineProperty(apiLoader.services['transcribeservice'], '2017-10-26', { get: function get() { var model = __webpack_require__(10903); model.paginators = __webpack_require__(92036)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.TranscribeService; /***/ }), /***/ 51585: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['transfer'] = {}; AWS.Transfer = Service.defineService('transfer', ['2018-11-05']); Object.defineProperty(apiLoader.services['transfer'], '2018-11-05', { get: function get() { var model = __webpack_require__(42419); model.paginators = __webpack_require__(70586)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Transfer; /***/ }), /***/ 72544: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['translate'] = {}; AWS.Translate = Service.defineService('translate', ['2017-07-01']); Object.defineProperty(apiLoader.services['translate'], '2017-07-01', { get: function get() { var model = __webpack_require__(12983); model.paginators = __webpack_require__(85886)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.Translate; /***/ }), /***/ 72742: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['waf'] = {}; AWS.WAF = Service.defineService('waf', ['2015-08-24']); Object.defineProperty(apiLoader.services['waf'], '2015-08-24', { get: function get() { var model = __webpack_require__(93997); model.paginators = __webpack_require__(45770)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WAF; /***/ }), /***/ 23153: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['wafregional'] = {}; AWS.WAFRegional = Service.defineService('wafregional', ['2016-11-28']); Object.defineProperty(apiLoader.services['wafregional'], '2016-11-28', { get: function get() { var model = __webpack_require__(72867); model.paginators = __webpack_require__(68917)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WAFRegional; /***/ }), /***/ 50353: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['wafv2'] = {}; AWS.WAFV2 = Service.defineService('wafv2', ['2019-07-29']); Object.defineProperty(apiLoader.services['wafv2'], '2019-07-29', { get: function get() { var model = __webpack_require__(27916); model.paginators = __webpack_require__(51265)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WAFV2; /***/ }), /***/ 86263: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['wellarchitected'] = {}; AWS.WellArchitected = Service.defineService('wellarchitected', ['2020-03-31']); Object.defineProperty(apiLoader.services['wellarchitected'], '2020-03-31', { get: function get() { var model = __webpack_require__(5684); model.paginators = __webpack_require__(47645)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WellArchitected; /***/ }), /***/ 38835: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['workdocs'] = {}; AWS.WorkDocs = Service.defineService('workdocs', ['2016-05-01']); Object.defineProperty(apiLoader.services['workdocs'], '2016-05-01', { get: function get() { var model = __webpack_require__(12789); model.paginators = __webpack_require__(20074)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WorkDocs; /***/ }), /***/ 48579: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['worklink'] = {}; AWS.WorkLink = Service.defineService('worklink', ['2018-09-25']); Object.defineProperty(apiLoader.services['worklink'], '2018-09-25', { get: function get() { var model = __webpack_require__(44786); model.paginators = __webpack_require__(88012)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WorkLink; /***/ }), /***/ 38374: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['workmail'] = {}; AWS.WorkMail = Service.defineService('workmail', ['2017-10-01']); Object.defineProperty(apiLoader.services['workmail'], '2017-10-01', { get: function get() { var model = __webpack_require__(31611); model.paginators = __webpack_require__(64931)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WorkMail; /***/ }), /***/ 67025: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['workmailmessageflow'] = {}; AWS.WorkMailMessageFlow = Service.defineService('workmailmessageflow', ['2019-05-01']); Object.defineProperty(apiLoader.services['workmailmessageflow'], '2019-05-01', { get: function get() { var model = __webpack_require__(15648); model.paginators = __webpack_require__(88532)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WorkMailMessageFlow; /***/ }), /***/ 25513: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['workspaces'] = {}; AWS.WorkSpaces = Service.defineService('workspaces', ['2015-04-08']); Object.defineProperty(apiLoader.services['workspaces'], '2015-04-08', { get: function get() { var model = __webpack_require__(66372); model.paginators = __webpack_require__(37567)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.WorkSpaces; /***/ }), /***/ 41548: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); var Service = AWS.Service; var apiLoader = AWS.apiLoader; apiLoader.services['xray'] = {}; AWS.XRay = Service.defineService('xray', ['2016-04-12']); Object.defineProperty(apiLoader.services['xray'], '2016-04-12', { get: function get() { var model = __webpack_require__(37289); model.paginators = __webpack_require__(83127)/* .pagination */ .o; return model; }, enumerable: true, configurable: true }); module.exports = AWS.XRay; /***/ }), /***/ 52793: /***/ ((module) => { function apiLoader(svc, version) { if (!apiLoader.services.hasOwnProperty(svc)) { throw new Error('InvalidService: Failed to load api for ' + svc); } return apiLoader.services[svc][version]; } /** * @api private * * This member of AWS.apiLoader is private, but changing it will necessitate a * change to ../scripts/services-table-generator.ts */ apiLoader.services = {}; /** * @api private */ module.exports = apiLoader; /***/ }), /***/ 71786: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(73639); var AWS = __webpack_require__(28437); // Load all service classes __webpack_require__(26296); /** * @api private */ module.exports = AWS; /***/ }), /***/ 93260: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437), url = AWS.util.url, crypto = AWS.util.crypto.lib, base64Encode = AWS.util.base64.encode, inherit = AWS.util.inherit; var queryEncode = function (string) { var replacements = { '+': '-', '=': '_', '/': '~' }; return string.replace(/[\+=\/]/g, function (match) { return replacements[match]; }); }; var signPolicy = function (policy, privateKey) { var sign = crypto.createSign('RSA-SHA1'); sign.write(policy); return queryEncode(sign.sign(privateKey, 'base64')); }; var signWithCannedPolicy = function (url, expires, keyPairId, privateKey) { var policy = JSON.stringify({ Statement: [ { Resource: url, Condition: { DateLessThan: { 'AWS:EpochTime': expires } } } ] }); return { Expires: expires, 'Key-Pair-Id': keyPairId, Signature: signPolicy(policy.toString(), privateKey) }; }; var signWithCustomPolicy = function (policy, keyPairId, privateKey) { policy = policy.replace(/\s/mg, ''); return { Policy: queryEncode(base64Encode(policy)), 'Key-Pair-Id': keyPairId, Signature: signPolicy(policy, privateKey) }; }; var determineScheme = function (url) { var parts = url.split('://'); if (parts.length < 2) { throw new Error('Invalid URL.'); } return parts[0].replace('*', ''); }; var getRtmpUrl = function (rtmpUrl) { var parsed = url.parse(rtmpUrl); return parsed.path.replace(/^\//, '') + (parsed.hash || ''); }; var getResource = function (url) { switch (determineScheme(url)) { case 'http': case 'https': return url; case 'rtmp': return getRtmpUrl(url); default: throw new Error('Invalid URI scheme. Scheme must be one of' + ' http, https, or rtmp'); } }; var handleError = function (err, callback) { if (!callback || typeof callback !== 'function') { throw err; } callback(err); }; var handleSuccess = function (result, callback) { if (!callback || typeof callback !== 'function') { return result; } callback(null, result); }; AWS.CloudFront.Signer = inherit({ /** * A signer object can be used to generate signed URLs and cookies for granting * access to content on restricted CloudFront distributions. * * @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html * * @param keyPairId [String] (Required) The ID of the CloudFront key pair * being used. * @param privateKey [String] (Required) A private key in RSA format. */ constructor: function Signer(keyPairId, privateKey) { if (keyPairId === void 0 || privateKey === void 0) { throw new Error('A key pair ID and private key are required'); } this.keyPairId = keyPairId; this.privateKey = privateKey; }, /** * Create a signed Amazon CloudFront Cookie. * * @param options [Object] The options to create a signed cookie. * @option options url [String] The URL to which the signature will grant * access. Required unless you pass in a full * policy. * @option options expires [Number] A Unix UTC timestamp indicating when the * signature should expire. Required unless you * pass in a full policy. * @option options policy [String] A CloudFront JSON policy. Required unless * you pass in a url and an expiry time. * * @param cb [Function] if a callback is provided, this function will * pass the hash as the second parameter (after the error parameter) to * the callback function. * * @return [Object] if called synchronously (with no callback), returns the * signed cookie parameters. * @return [null] nothing is returned if a callback is provided. */ getSignedCookie: function (options, cb) { var signatureHash = 'policy' in options ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey) : signWithCannedPolicy(options.url, options.expires, this.keyPairId, this.privateKey); var cookieHash = {}; for (var key in signatureHash) { if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { cookieHash['CloudFront-' + key] = signatureHash[key]; } } return handleSuccess(cookieHash, cb); }, /** * Create a signed Amazon CloudFront URL. * * Keep in mind that URLs meant for use in media/flash players may have * different requirements for URL formats (e.g. some require that the * extension be removed, some require the file name to be prefixed * - mp4:, some require you to add "/cfx/st" into your URL). * * @param options [Object] The options to create a signed URL. * @option options url [String] The URL to which the signature will grant * access. Any query params included with * the URL should be encoded. Required. * @option options expires [Number] A Unix UTC timestamp indicating when the * signature should expire. Required unless you * pass in a full policy. * @option options policy [String] A CloudFront JSON policy. Required unless * you pass in a url and an expiry time. * * @param cb [Function] if a callback is provided, this function will * pass the URL as the second parameter (after the error parameter) to * the callback function. * * @return [String] if called synchronously (with no callback), returns the * signed URL. * @return [null] nothing is returned if a callback is provided. */ getSignedUrl: function (options, cb) { try { var resource = getResource(options.url); } catch (err) { return handleError(err, cb); } var parsedUrl = url.parse(options.url, true), signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy') ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey) : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey); parsedUrl.search = null; for (var key in signatureHash) { if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { parsedUrl.query[key] = signatureHash[key]; } } try { var signedUrl = determineScheme(options.url) === 'rtmp' ? getRtmpUrl(url.format(parsedUrl)) : url.format(parsedUrl); } catch (err) { return handleError(err, cb); } return handleSuccess(signedUrl, cb); } }); /** * @api private */ module.exports = AWS.CloudFront.Signer; /***/ }), /***/ 38110: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); __webpack_require__(53819); __webpack_require__(36965); var PromisesDependency; /** * The main configuration class used by all service objects to set * the region, credentials, and other options for requests. * * By default, credentials and region settings are left unconfigured. * This should be configured by the application before using any * AWS service APIs. * * In order to set global configuration options, properties should * be assigned to the global {AWS.config} object. * * @see AWS.config * * @!group General Configuration Options * * @!attribute credentials * @return [AWS.Credentials] the AWS credentials to sign requests with. * * @!attribute region * @example Set the global region setting to us-west-2 * AWS.config.update({region: 'us-west-2'}); * @return [AWS.Credentials] The region to send service requests to. * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html * A list of available endpoints for each AWS service * * @!attribute maxRetries * @return [Integer] the maximum amount of retries to perform for a * service request. By default this value is calculated by the specific * service object that the request is being made to. * * @!attribute maxRedirects * @return [Integer] the maximum amount of redirects to follow for a * service request. Defaults to 10. * * @!attribute paramValidation * @return [Boolean|map] whether input parameters should be validated against * the operation description before sending the request. Defaults to true. * Pass a map to enable any of the following specific validation features: * * * **min** [Boolean] — Validates that a value meets the min * constraint. This is enabled by default when paramValidation is set * to `true`. * * **max** [Boolean] — Validates that a value meets the max * constraint. * * **pattern** [Boolean] — Validates that a string value matches a * regular expression. * * **enum** [Boolean] — Validates that a string value matches one * of the allowable enum values. * * @!attribute computeChecksums * @return [Boolean] whether to compute checksums for payload bodies when * the service accepts it (currently supported in S3 only). * * @!attribute convertResponseTypes * @return [Boolean] whether types are converted when parsing response data. * Currently only supported for JSON based services. Turning this off may * improve performance on large response payloads. Defaults to `true`. * * @!attribute correctClockSkew * @return [Boolean] whether to apply a clock skew correction and retry * requests that fail because of an skewed client clock. Defaults to * `false`. * * @!attribute sslEnabled * @return [Boolean] whether SSL is enabled for requests * * @!attribute s3ForcePathStyle * @return [Boolean] whether to force path style URLs for S3 objects * * @!attribute s3BucketEndpoint * @note Setting this configuration option requires an `endpoint` to be * provided explicitly to the service constructor. * @return [Boolean] whether the provided endpoint addresses an individual * bucket (false if it addresses the root API endpoint). * * @!attribute s3DisableBodySigning * @return [Boolean] whether to disable S3 body signing when using signature version `v4`. * Body signing can only be disabled when using https. Defaults to `true`. * * @!attribute s3UsEast1RegionalEndpoint * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3 * request to global endpoints or 'us-east-1' regional endpoints. This config is only * applicable to S3 client; * Defaults to 'legacy' * @!attribute s3UseArnRegion * @return [Boolean] whether to override the request region with the region inferred * from requested resource's ARN. Only available for S3 buckets * Defaults to `true` * * @!attribute useAccelerateEndpoint * @note This configuration option is only compatible with S3 while accessing * dns-compatible buckets. * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service. * Defaults to `false`. * * @!attribute retryDelayOptions * @example Set the base retry delay for all services to 300 ms * AWS.config.update({retryDelayOptions: {base: 300}}); * // Delays with maxRetries = 3: 300, 600, 1200 * @example Set a custom backoff function to provide delay values on retries * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) { * // returns delay in ms * }}}); * @return [map] A set of options to configure the retry delay on retryable errors. * Currently supported options are: * * * **base** [Integer] — The base number of milliseconds to use in the * exponential backoff for operation retries. Defaults to 100 ms for all services except * DynamoDB, where it defaults to 50ms. * * * **customBackoff ** [function] — A custom function that accepts a * retry count and error and returns the amount of time to delay in * milliseconds. If the result is a non-zero negative value, no further * retry attempts will be made. The `base` option will be ignored if this * option is supplied. The function is only called for retryable errors. * * @!attribute httpOptions * @return [map] A set of options to pass to the low-level HTTP request. * Currently supported options are: * * * **proxy** [String] — the URL to proxy requests through * * **agent** [http.Agent, https.Agent] — the Agent object to perform * HTTP requests with. Used for connection pooling. Note that for * SSL connections, a special Agent object is used in order to enable * peer certificate verification. This feature is only supported in the * Node.js environment. * * **connectTimeout** [Integer] — Sets the socket to timeout after * failing to establish a connection with the server after * `connectTimeout` milliseconds. This timeout has no effect once a socket * connection has been established. * * **timeout** [Integer] — The number of milliseconds a request can * take before automatically being terminated. * Defaults to two minutes (120000). * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous * HTTP requests. Used in the browser environment only. Set to false to * send requests synchronously. Defaults to true (async on). * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" * property of an XMLHttpRequest object. Used in the browser environment * only. Defaults to false. * @!attribute logger * @return [#write,#log] an object that responds to .write() (like a stream) * or .log() (like the console object) in order to log information about * requests * * @!attribute systemClockOffset * @return [Number] an offset value in milliseconds to apply to all signing * times. Use this to compensate for clock skew when your system may be * out of sync with the service time. Note that this configuration option * can only be applied to the global `AWS.config` object and cannot be * overridden in service-specific configuration. Defaults to 0 milliseconds. * * @!attribute signatureVersion * @return [String] the signature version to sign requests with (overriding * the API configuration). Possible values are: 'v2', 'v3', 'v4'. * * @!attribute signatureCache * @return [Boolean] whether the signature to sign requests with (overriding * the API configuration) is cached. Only applies to the signature version 'v4'. * Defaults to `true`. * * @!attribute endpointDiscoveryEnabled * @return [Boolean|undefined] whether to call operations with endpoints * given by service dynamically. Setting this config to `true` will enable * endpoint discovery for all applicable operations. Setting it to `false` * will explicitly disable endpoint discovery even though operations that * require endpoint discovery will presumably fail. Leaving it to * `undefined` means SDK only do endpoint discovery when it's required. * Defaults to `undefined` * * @!attribute endpointCacheSize * @return [Number] the size of the global cache storing endpoints from endpoint * discovery operations. Once endpoint cache is created, updating this setting * cannot change existing cache size. * Defaults to 1000 * * @!attribute hostPrefixEnabled * @return [Boolean] whether to marshal request parameters to the prefix of * hostname. Defaults to `true`. * * @!attribute stsRegionalEndpoints * @return ['legacy'|'regional'] whether to send sts request to global endpoints or * regional endpoints. * Defaults to 'legacy' */ AWS.Config = AWS.util.inherit({ /** * @!endgroup */ /** * Creates a new configuration object. This is the object that passes * option data along to service requests, including credentials, security, * region information, and some service specific settings. * * @example Creating a new configuration object with credentials and region * var config = new AWS.Config({ * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2' * }); * @option options accessKeyId [String] your AWS access key ID. * @option options secretAccessKey [String] your AWS secret access key. * @option options sessionToken [AWS.Credentials] the optional AWS * session token to sign requests with. * @option options credentials [AWS.Credentials] the AWS credentials * to sign requests with. You can either specify this object, or * specify the accessKeyId and secretAccessKey options directly. * @option options credentialProvider [AWS.CredentialProviderChain] the * provider chain used to resolve credentials if no static `credentials` * property is set. * @option options region [String] the region to send service requests to. * See {region} for more information. * @option options maxRetries [Integer] the maximum amount of retries to * attempt with a request. See {maxRetries} for more information. * @option options maxRedirects [Integer] the maximum amount of redirects to * follow with a request. See {maxRedirects} for more information. * @option options sslEnabled [Boolean] whether to enable SSL for * requests. * @option options paramValidation [Boolean|map] whether input parameters * should be validated against the operation description before sending * the request. Defaults to true. Pass a map to enable any of the * following specific validation features: * * * **min** [Boolean] — Validates that a value meets the min * constraint. This is enabled by default when paramValidation is set * to `true`. * * **max** [Boolean] — Validates that a value meets the max * constraint. * * **pattern** [Boolean] — Validates that a string value matches a * regular expression. * * **enum** [Boolean] — Validates that a string value matches one * of the allowable enum values. * @option options computeChecksums [Boolean] whether to compute checksums * for payload bodies when the service accepts it (currently supported * in S3 only) * @option options convertResponseTypes [Boolean] whether types are converted * when parsing response data. Currently only supported for JSON based * services. Turning this off may improve performance on large response * payloads. Defaults to `true`. * @option options correctClockSkew [Boolean] whether to apply a clock skew * correction and retry requests that fail because of an skewed client * clock. Defaults to `false`. * @option options s3ForcePathStyle [Boolean] whether to force path * style URLs for S3 objects. * @option options s3BucketEndpoint [Boolean] whether the provided endpoint * addresses an individual bucket (false if it addresses the root API * endpoint). Note that setting this configuration option requires an * `endpoint` to be provided explicitly to the service constructor. * @option options s3DisableBodySigning [Boolean] whether S3 body signing * should be disabled when using signature version `v4`. Body signing * can only be disabled when using https. Defaults to `true`. * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region * is set to 'us-east-1', whether to send s3 request to global endpoints or * 'us-east-1' regional endpoints. This config is only applicable to S3 client. * Defaults to `legacy` * @option options s3UseArnRegion [Boolean] whether to override the request region * with the region inferred from requested resource's ARN. Only available for S3 buckets * Defaults to `true` * * @option options retryDelayOptions [map] A set of options to configure * the retry delay on retryable errors. Currently supported options are: * * * **base** [Integer] — The base number of milliseconds to use in the * exponential backoff for operation retries. Defaults to 100 ms for all * services except DynamoDB, where it defaults to 50ms. * * **customBackoff ** [function] — A custom function that accepts a * retry count and error and returns the amount of time to delay in * milliseconds. If the result is a non-zero negative value, no further * retry attempts will be made. The `base` option will be ignored if this * option is supplied. The function is only called for retryable errors. * @option options httpOptions [map] A set of options to pass to the low-level * HTTP request. Currently supported options are: * * * **proxy** [String] — the URL to proxy requests through * * **agent** [http.Agent, https.Agent] — the Agent object to perform * HTTP requests with. Used for connection pooling. Defaults to the global * agent (`http.globalAgent`) for non-SSL connections. Note that for * SSL connections, a special Agent object is used in order to enable * peer certificate verification. This feature is only available in the * Node.js environment. * * **connectTimeout** [Integer] — Sets the socket to timeout after * failing to establish a connection with the server after * `connectTimeout` milliseconds. This timeout has no effect once a socket * connection has been established. * * **timeout** [Integer] — Sets the socket to timeout after timeout * milliseconds of inactivity on the socket. Defaults to two minutes * (120000). * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous * HTTP requests. Used in the browser environment only. Set to false to * send requests synchronously. Defaults to true (async on). * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" * property of an XMLHttpRequest object. Used in the browser environment * only. Defaults to false. * @option options apiVersion [String, Date] a String in YYYY-MM-DD format * (or a date) that represents the latest possible API version that can be * used in all services (unless overridden by `apiVersions`). Specify * 'latest' to use the latest possible version. * @option options apiVersions [map] a map of service * identifiers (the lowercase service class name) with the API version to * use when instantiating a service. Specify 'latest' for each individual * that can use the latest available version. * @option options logger [#write,#log] an object that responds to .write() * (like a stream) or .log() (like the console object) in order to log * information about requests * @option options systemClockOffset [Number] an offset value in milliseconds * to apply to all signing times. Use this to compensate for clock skew * when your system may be out of sync with the service time. Note that * this configuration option can only be applied to the global `AWS.config` * object and cannot be overridden in service-specific configuration. * Defaults to 0 milliseconds. * @option options signatureVersion [String] the signature version to sign * requests with (overriding the API configuration). Possible values are: * 'v2', 'v3', 'v4'. * @option options signatureCache [Boolean] whether the signature to sign * requests with (overriding the API configuration) is cached. Only applies * to the signature version 'v4'. Defaults to `true`. * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32 * checksum of HTTP response bodies returned by DynamoDB. Default: `true`. * @option options useAccelerateEndpoint [Boolean] Whether to use the * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`. * @option options clientSideMonitoring [Boolean] whether to collect and * publish this client's performance metrics of all its API requests. * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to * call operations with endpoints given by service dynamically. Setting this * config to `true` will enable endpoint discovery for all applicable operations. * Setting it to `false` will explicitly disable endpoint discovery even though * operations that require endpoint discovery will presumably fail. Leaving it * to `undefined` means SDK will only do endpoint discovery when it's required. * Defaults to `undefined` * @option options endpointCacheSize [Number] the size of the global cache storing * endpoints from endpoint discovery operations. Once endpoint cache is created, * updating this setting cannot change existing cache size. * Defaults to 1000 * @option options hostPrefixEnabled [Boolean] whether to marshal request * parameters to the prefix of hostname. * Defaults to `true`. * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request * to global endpoints or regional endpoints. * Defaults to 'legacy'. */ constructor: function Config(options) { if (options === undefined) options = {}; options = this.extractCredentials(options); AWS.util.each.call(this, this.keys, function (key, value) { this.set(key, options[key], value); }); }, /** * @!group Managing Credentials */ /** * Loads credentials from the configuration object. This is used internally * by the SDK to ensure that refreshable {Credentials} objects are properly * refreshed and loaded when sending a request. If you want to ensure that * your credentials are loaded prior to a request, you can use this method * directly to provide accurate credential data stored in the object. * * @note If you configure the SDK with static or environment credentials, * the credential data should already be present in {credentials} attribute. * This method is primarily necessary to load credentials from asynchronous * sources, or sources that can refresh credentials periodically. * @example Getting your access key * AWS.config.getCredentials(function(err) { * if (err) console.log(err.stack); // credentials not loaded * else console.log("Access Key:", AWS.config.credentials.accessKeyId); * }) * @callback callback function(err) * Called when the {credentials} have been properly set on the configuration * object. * * @param err [Error] if this is set, credentials were not successfully * loaded and this error provides information why. * @see credentials * @see Credentials */ getCredentials: function getCredentials(callback) { var self = this; function finish(err) { callback(err, err ? null : self.credentials); } function credError(msg, err) { return new AWS.util.error(err || new Error(), { code: 'CredentialsError', message: msg, name: 'CredentialsError' }); } function getAsyncCredentials() { self.credentials.get(function(err) { if (err) { var msg = 'Could not load credentials from ' + self.credentials.constructor.name; err = credError(msg, err); } finish(err); }); } function getStaticCredentials() { var err = null; if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) { err = credError('Missing credentials'); } finish(err); } if (self.credentials) { if (typeof self.credentials.get === 'function') { getAsyncCredentials(); } else { // static credentials getStaticCredentials(); } } else if (self.credentialProvider) { self.credentialProvider.resolve(function(err, creds) { if (err) { err = credError('Could not load credentials from any providers', err); } self.credentials = creds; finish(err); }); } else { finish(credError('No credentials to load')); } }, /** * @!group Loading and Setting Configuration Options */ /** * @overload update(options, allowUnknownKeys = false) * Updates the current configuration object with new options. * * @example Update maxRetries property of a configuration object * config.update({maxRetries: 10}); * @param [Object] options a map of option keys and values. * @param [Boolean] allowUnknownKeys whether unknown keys can be set on * the configuration object. Defaults to `false`. * @see constructor */ update: function update(options, allowUnknownKeys) { allowUnknownKeys = allowUnknownKeys || false; options = this.extractCredentials(options); AWS.util.each.call(this, options, function (key, value) { if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) || AWS.Service.hasService(key)) { this.set(key, value); } }); }, /** * Loads configuration data from a JSON file into this config object. * @note Loading configuration will reset all existing configuration * on the object. * @!macro nobrowser * @param path [String] the path relative to your process's current * working directory to load configuration from. * @return [AWS.Config] the same configuration object */ loadFromPath: function loadFromPath(path) { this.clear(); var options = JSON.parse(AWS.util.readFileSync(path)); var fileSystemCreds = new AWS.FileSystemCredentials(path); var chain = new AWS.CredentialProviderChain(); chain.providers.unshift(fileSystemCreds); chain.resolve(function (err, creds) { if (err) throw err; else options.credentials = creds; }); this.constructor(options); return this; }, /** * Clears configuration data on this object * * @api private */ clear: function clear() { /*jshint forin:false */ AWS.util.each.call(this, this.keys, function (key) { delete this[key]; }); // reset credential provider this.set('credentials', undefined); this.set('credentialProvider', undefined); }, /** * Sets a property on the configuration object, allowing for a * default value * @api private */ set: function set(property, value, defaultValue) { if (value === undefined) { if (defaultValue === undefined) { defaultValue = this.keys[property]; } if (typeof defaultValue === 'function') { this[property] = defaultValue.call(this); } else { this[property] = defaultValue; } } else if (property === 'httpOptions' && this[property]) { // deep merge httpOptions this[property] = AWS.util.merge(this[property], value); } else { this[property] = value; } }, /** * All of the keys with their default values. * * @constant * @api private */ keys: { credentials: null, credentialProvider: null, region: null, logger: null, apiVersions: {}, apiVersion: null, endpoint: undefined, httpOptions: { timeout: 120000 }, maxRetries: undefined, maxRedirects: 10, paramValidation: true, sslEnabled: true, s3ForcePathStyle: false, s3BucketEndpoint: false, s3DisableBodySigning: true, s3UsEast1RegionalEndpoint: 'legacy', s3UseArnRegion: undefined, computeChecksums: true, convertResponseTypes: true, correctClockSkew: false, customUserAgent: null, dynamoDbCrc32: true, systemClockOffset: 0, signatureVersion: null, signatureCache: true, retryDelayOptions: {}, useAccelerateEndpoint: false, clientSideMonitoring: false, endpointDiscoveryEnabled: undefined, endpointCacheSize: 1000, hostPrefixEnabled: true, stsRegionalEndpoints: 'legacy' }, /** * Extracts accessKeyId, secretAccessKey and sessionToken * from a configuration hash. * * @api private */ extractCredentials: function extractCredentials(options) { if (options.accessKeyId && options.secretAccessKey) { options = AWS.util.copy(options); options.credentials = new AWS.Credentials(options); } return options; }, /** * Sets the promise dependency the SDK will use wherever Promises are returned. * Passing `null` will force the SDK to use native Promises if they are available. * If native Promises are not available, passing `null` will have no effect. * @param [Constructor] dep A reference to a Promise constructor */ setPromisesDependency: function setPromisesDependency(dep) { PromisesDependency = dep; // if null was passed in, we should try to use native promises if (dep === null && typeof Promise === 'function') { PromisesDependency = Promise; } var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain]; if (AWS.S3) { constructors.push(AWS.S3); if (AWS.S3.ManagedUpload) { constructors.push(AWS.S3.ManagedUpload); } } AWS.util.addPromises(constructors, PromisesDependency); }, /** * Gets the promise dependency set by `AWS.config.setPromisesDependency`. */ getPromisesDependency: function getPromisesDependency() { return PromisesDependency; } }); /** * @return [AWS.Config] The global configuration object singleton instance * @readonly * @see AWS.Config */ AWS.config = new AWS.Config(); /***/ }), /***/ 85566: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * @api private */ function validateRegionalEndpointsFlagValue(configValue, errorOptions) { if (typeof configValue !== 'string') return undefined; else if (['legacy', 'regional'].indexOf(configValue.toLowerCase()) >= 0) { return configValue.toLowerCase(); } else { throw AWS.util.error(new Error(), errorOptions); } } /** * Resolve the configuration value for regional endpoint from difference sources: client * config, environmental variable, shared config file. Value can be case-insensitive * 'legacy' or 'reginal'. * @param originalConfig user-supplied config object to resolve * @param options a map of config property names from individual configuration source * - env: name of environmental variable that refers to the config * - sharedConfig: name of shared configuration file property that refers to the config * - clientConfig: name of client configuration property that refers to the config * * @api private */ function resolveRegionalEndpointsFlag(originalConfig, options) { originalConfig = originalConfig || {}; //validate config value var resolved; if (originalConfig[options.clientConfig]) { resolved = validateRegionalEndpointsFlagValue(originalConfig[options.clientConfig], { code: 'InvalidConfiguration', message: 'invalid "' + options.clientConfig + '" configuration. Expect "legacy" ' + ' or "regional". Got "' + originalConfig[options.clientConfig] + '".' }); if (resolved) return resolved; } if (!AWS.util.isNode()) return resolved; //validate environmental variable if (Object.prototype.hasOwnProperty.call(process.env, options.env)) { var envFlag = process.env[options.env]; resolved = validateRegionalEndpointsFlagValue(envFlag, { code: 'InvalidEnvironmentalVariable', message: 'invalid ' + options.env + ' environmental variable. Expect "legacy" ' + ' or "regional". Got "' + process.env[options.env] + '".' }); if (resolved) return resolved; } //validate shared config file var profile = {}; try { var profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader); profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; } catch (e) {}; if (profile && Object.prototype.hasOwnProperty.call(profile, options.sharedConfig)) { var fileFlag = profile[options.sharedConfig]; resolved = validateRegionalEndpointsFlagValue(fileFlag, { code: 'InvalidConfiguration', message: 'invalid ' + options.sharedConfig + ' profile config. Expect "legacy" ' + ' or "regional". Got "' + profile[options.sharedConfig] + '".' }); if (resolved) return resolved; } return resolved; } module.exports = resolveRegionalEndpointsFlag; /***/ }), /***/ 28437: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * The main AWS namespace */ var AWS = { util: __webpack_require__(77985) }; /** * @api private * @!macro [new] nobrowser * @note This feature is not supported in the browser environment of the SDK. */ var _hidden = {}; _hidden.toString(); // hack to parse macro /** * @api private */ module.exports = AWS; AWS.util.update(AWS, { /** * @constant */ VERSION: '2.889.0', /** * @api private */ Signers: {}, /** * @api private */ Protocol: { Json: __webpack_require__(30083), Query: __webpack_require__(90761), Rest: __webpack_require__(98200), RestJson: __webpack_require__(5883), RestXml: __webpack_require__(15143) }, /** * @api private */ XML: { Builder: __webpack_require__(23546), Parser: null // conditionally set based on environment }, /** * @api private */ JSON: { Builder: __webpack_require__(47495), Parser: __webpack_require__(5474) }, /** * @api private */ Model: { Api: __webpack_require__(17657), Operation: __webpack_require__(28083), Shape: __webpack_require__(71349), Paginator: __webpack_require__(45938), ResourceWaiter: __webpack_require__(41368) }, /** * @api private */ apiLoader: __webpack_require__(52793), /** * @api private */ EndpointCache: __webpack_require__(96323)/* .EndpointCache */ .$ }); __webpack_require__(55948); __webpack_require__(68903); __webpack_require__(38110); __webpack_require__(1556); __webpack_require__(54995); __webpack_require__(78652); __webpack_require__(58743); __webpack_require__(39925); __webpack_require__(9897); __webpack_require__(99127); /** * @readonly * @return [AWS.SequentialExecutor] a collection of global event listeners that * are attached to every sent request. * @see AWS.Request AWS.Request for a list of events to listen for * @example Logging the time taken to send a request * AWS.events.on('send', function startSend(resp) { * resp.startTime = new Date().getTime(); * }).on('complete', function calculateTime(resp) { * var time = (new Date().getTime() - resp.startTime) / 1000; * console.log('Request took ' + time + ' seconds'); * }); * * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' */ AWS.events = new AWS.SequentialExecutor(); //create endpoint cache lazily AWS.util.memoizedProperty(AWS, 'endpointCache', function() { return new AWS.EndpointCache(AWS.config.endpointCacheSize); }, true); /***/ }), /***/ 53819: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Represents your AWS security credentials, specifically the * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. * Creating a `Credentials` object allows you to pass around your * security information to configuration and service objects. * * Note that this class typically does not need to be constructed manually, * as the {AWS.Config} and {AWS.Service} classes both accept simple * options hashes with the three keys. These structures will be converted * into Credentials objects automatically. * * ## Expiring and Refreshing Credentials * * Occasionally credentials can expire in the middle of a long-running * application. In this case, the SDK will automatically attempt to * refresh the credentials from the storage location if the Credentials * class implements the {refresh} method. * * If you are implementing a credential storage location, you * will want to create a subclass of the `Credentials` class and * override the {refresh} method. This method allows credentials to be * retrieved from the backing store, be it a file system, database, or * some network storage. The method should reset the credential attributes * on the object. * * @!attribute expired * @return [Boolean] whether the credentials have been expired and * require a refresh. Used in conjunction with {expireTime}. * @!attribute expireTime * @return [Date] a time when credentials should be considered expired. Used * in conjunction with {expired}. * @!attribute accessKeyId * @return [String] the AWS access key ID * @!attribute secretAccessKey * @return [String] the AWS secret access key * @!attribute sessionToken * @return [String] an optional AWS session token */ AWS.Credentials = AWS.util.inherit({ /** * A credentials object can be created using positional arguments or an options * hash. * * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null) * Creates a Credentials object with a given set of credential information * as positional arguments. * @param accessKeyId [String] the AWS access key ID * @param secretAccessKey [String] the AWS secret access key * @param sessionToken [String] the optional AWS session token * @example Create a credentials object with AWS credentials * var creds = new AWS.Credentials('akid', 'secret', 'session'); * @overload AWS.Credentials(options) * Creates a Credentials object with a given set of credential information * as an options hash. * @option options accessKeyId [String] the AWS access key ID * @option options secretAccessKey [String] the AWS secret access key * @option options sessionToken [String] the optional AWS session token * @example Create a credentials object with AWS credentials * var creds = new AWS.Credentials({ * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session' * }); */ constructor: function Credentials() { // hide secretAccessKey from being displayed with util.inspect AWS.util.hideProperties(this, ['secretAccessKey']); this.expired = false; this.expireTime = null; this.refreshCallbacks = []; if (arguments.length === 1 && typeof arguments[0] === 'object') { var creds = arguments[0].credentials || arguments[0]; this.accessKeyId = creds.accessKeyId; this.secretAccessKey = creds.secretAccessKey; this.sessionToken = creds.sessionToken; } else { this.accessKeyId = arguments[0]; this.secretAccessKey = arguments[1]; this.sessionToken = arguments[2]; } }, /** * @return [Integer] the number of seconds before {expireTime} during which * the credentials will be considered expired. */ expiryWindow: 15, /** * @return [Boolean] whether the credentials object should call {refresh} * @note Subclasses should override this method to provide custom refresh * logic. */ needsRefresh: function needsRefresh() { var currentTime = AWS.util.date.getDate().getTime(); var adjustedTime = new Date(currentTime + this.expiryWindow * 1000); if (this.expireTime && adjustedTime > this.expireTime) { return true; } else { return this.expired || !this.accessKeyId || !this.secretAccessKey; } }, /** * Gets the existing credentials, refreshing them if they are not yet loaded * or have expired. Users should call this method before using {refresh}, * as this will not attempt to reload credentials when they are already * loaded into the object. * * @callback callback function(err) * When this callback is called with no error, it means either credentials * do not need to be refreshed or refreshed credentials information has * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, * and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled */ get: function get(callback) { var self = this; if (this.needsRefresh()) { this.refresh(function(err) { if (!err) self.expired = false; // reset expired flag if (callback) callback(err); }); } else if (callback) { callback(); } }, /** * @!method getPromise() * Returns a 'thenable' promise. * Gets the existing credentials, refreshing them if they are not yet loaded * or have expired. Users should call this method before using {refresh}, * as this will not attempt to reload credentials when they are already * loaded into the object. * * Two callbacks can be provided to the `then` method on the returned promise. * The first callback will be called if the promise is fulfilled, and the second * callback will be called if the promise is rejected. * @callback fulfilledCallback function() * Called if the promise is fulfilled. When this callback is called, it * means either credentials do not need to be refreshed or refreshed * credentials information has been loaded into the object (as the * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). * @callback rejectedCallback function(err) * Called if the promise is rejected. * @param err [Error] if an error occurred, this value will be filled * @return [Promise] A promise that represents the state of the `get` call. * @example Calling the `getPromise` method. * var promise = credProvider.getPromise(); * promise.then(function() { ... }, function(err) { ... }); */ /** * @!method refreshPromise() * Returns a 'thenable' promise. * Refreshes the credentials. Users should call {get} before attempting * to forcibly refresh credentials. * * Two callbacks can be provided to the `then` method on the returned promise. * The first callback will be called if the promise is fulfilled, and the second * callback will be called if the promise is rejected. * @callback fulfilledCallback function() * Called if the promise is fulfilled. When this callback is called, it * means refreshed credentials information has been loaded into the object * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). * @callback rejectedCallback function(err) * Called if the promise is rejected. * @param err [Error] if an error occurred, this value will be filled * @return [Promise] A promise that represents the state of the `refresh` call. * @example Calling the `refreshPromise` method. * var promise = credProvider.refreshPromise(); * promise.then(function() { ... }, function(err) { ... }); */ /** * Refreshes the credentials. Users should call {get} before attempting * to forcibly refresh credentials. * * @callback callback function(err) * When this callback is called with no error, it means refreshed * credentials information has been loaded into the object (as the * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @note Subclasses should override this class to reset the * {accessKeyId}, {secretAccessKey} and optional {sessionToken} * on the credentials object and then call the callback with * any error information. * @see get */ refresh: function refresh(callback) { this.expired = false; callback(); }, /** * @api private * @param callback */ coalesceRefresh: function coalesceRefresh(callback, sync) { var self = this; if (self.refreshCallbacks.push(callback) === 1) { self.load(function onLoad(err) { AWS.util.arrayEach(self.refreshCallbacks, function(callback) { if (sync) { callback(err); } else { // callback could throw, so defer to ensure all callbacks are notified AWS.util.defer(function () { callback(err); }); } }); self.refreshCallbacks.length = 0; }); } }, /** * @api private * @param callback */ load: function load(callback) { callback(); } }); /** * @api private */ AWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) { this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency); this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency); }; /** * @api private */ AWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() { delete this.prototype.getPromise; delete this.prototype.refreshPromise; }; AWS.util.addPromises(AWS.Credentials); /***/ }), /***/ 57083: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var STS = __webpack_require__(57513); /** * Represents temporary credentials retrieved from {AWS.STS}. Without any * extra parameters, credentials will be fetched from the * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the * {AWS.STS.assumeRole} operation will be used to fetch credentials for the * role instead. * * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in * the way masterCredentials and refreshes are handled. * AWS.ChainableTemporaryCredentials refreshes expired credentials using the * masterCredentials passed by the user to support chaining of STS credentials. * However, AWS.TemporaryCredentials recursively collapses the masterCredentials * during instantiation, precluding the ability to refresh credentials which * require intermediate, temporary credentials. * * For example, if the application should use RoleA, which must be assumed from * RoleB, and the environment provides credentials which can assume RoleB, then * AWS.ChainableTemporaryCredentials must be used to support refreshing the * temporary credentials for RoleA: * * ```javascript * var roleACreds = new AWS.ChainableTemporaryCredentials({ * params: {RoleArn: 'RoleA'}, * masterCredentials: new AWS.ChainableTemporaryCredentials({ * params: {RoleArn: 'RoleB'}, * masterCredentials: new AWS.EnvironmentCredentials('AWS') * }) * }); * ``` * * If AWS.TemporaryCredentials had been used in the previous example, * `roleACreds` would fail to refresh because `roleACreds` would * use the environment credentials for the AssumeRole request. * * Another difference is that AWS.ChainableTemporaryCredentials creates the STS * service instance during instantiation while AWS.TemporaryCredentials creates * the STS service instance during the first refresh. Creating the service * instance during instantiation effectively captures the master credentials * from the global config, so that subsequent changes to the global config do * not affect the master credentials used to refresh the temporary credentials. * * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned * to AWS.config.credentials: * * ```javascript * var envCreds = new AWS.EnvironmentCredentials('AWS'); * AWS.config.credentials = envCreds; * // masterCredentials will be envCreds * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ * params: {RoleArn: '...'} * }); * ``` * * Similarly, to use the CredentialProviderChain's default providers as the * master credentials, simply create a new instance of * AWS.ChainableTemporaryCredentials: * * ```javascript * AWS.config.credentials = new ChainableTemporaryCredentials({ * params: {RoleArn: '...'} * }); * ``` * * @!attribute service * @return [AWS.STS] the STS service instance used to * get and refresh temporary credentials from AWS STS. * @note (see constructor) */ AWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new temporary credentials object. * * @param options [map] a set of options * @option options params [map] ({}) a map of options that are passed to the * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. * If a `RoleArn` parameter is passed in, credentials will be based on the * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must * also be passed in or an error will be thrown. * @option options masterCredentials [AWS.Credentials] the master credentials * used to get and refresh temporary credentials from AWS STS. By default, * AWS.config.credentials or AWS.config.credentialProvider will be used. * @option options tokenCodeFn [Function] (null) Function to provide * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function * is called with value of `SerialNumber` and `callback`, and should provide * the `TokenCode` or an error to the callback in the format * `callback(err, token)`. * @example Creating a new credentials object for generic temporary credentials * AWS.config.credentials = new AWS.ChainableTemporaryCredentials(); * @example Creating a new credentials object for an IAM role * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ * params: { * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials' * } * }); * @see AWS.STS.assumeRole * @see AWS.STS.getSessionToken */ constructor: function ChainableTemporaryCredentials(options) { AWS.Credentials.call(this); options = options || {}; this.errorCode = 'ChainableTemporaryCredentialsProviderFailure'; this.expired = true; this.tokenCodeFn = null; var params = AWS.util.copy(options.params) || {}; if (params.RoleArn) { params.RoleSessionName = params.RoleSessionName || 'temporary-credentials'; } if (params.SerialNumber) { if (!options.tokenCodeFn || (typeof options.tokenCodeFn !== 'function')) { throw new AWS.util.error( new Error('tokenCodeFn must be a function when params.SerialNumber is given'), {code: this.errorCode} ); } else { this.tokenCodeFn = options.tokenCodeFn; } } var config = AWS.util.merge( { params: params, credentials: options.masterCredentials || AWS.config.credentials }, options.stsConfig || {} ); this.service = new STS(config); }, /** * Refreshes credentials using {AWS.STS.assumeRole} or * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed * to the credentials {constructor}. * * @callback callback function(err) * Called when the STS service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see AWS.Credentials.get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private * @param callback */ load: function load(callback) { var self = this; var operation = self.service.config.params.RoleArn ? 'assumeRole' : 'getSessionToken'; this.getTokenCode(function (err, tokenCode) { var params = {}; if (err) { callback(err); return; } if (tokenCode) { params.TokenCode = tokenCode; } self.service[operation](params, function (err, data) { if (!err) { self.service.credentialsFrom(data, self); } callback(err); }); }); }, /** * @api private */ getTokenCode: function getTokenCode(callback) { var self = this; if (this.tokenCodeFn) { this.tokenCodeFn(this.service.config.params.SerialNumber, function (err, token) { if (err) { var message = err; if (err instanceof Error) { message = err.message; } callback( AWS.util.error( new Error('Error fetching MFA token: ' + message), { code: self.errorCode} ) ); return; } callback(null, token); }); } else { callback(null); } } }); /***/ }), /***/ 3498: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var CognitoIdentity = __webpack_require__(58291); var STS = __webpack_require__(57513); /** * Represents credentials retrieved from STS Web Identity Federation using * the Amazon Cognito Identity service. * * By default this provider gets credentials using the * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to * obtain an `IdentityId`. If the identity or identity pool is not configured in * the Amazon Cognito Console to use IAM roles with the appropriate permissions, * then additionally a `RoleArn` is required containing the ARN of the IAM trust * policy for the Amazon Cognito role that the user will log into. If a `RoleArn` * is provided, then this provider gets credentials using the * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}. * * In addition, if this credential provider is used to provide authenticated * login, the `Logins` map may be set to the tokens provided by the respective * identity providers. See {constructor} for an example on creating a credentials * object with proper property values. * * ## Refreshing Credentials from Identity Service * * In addition to AWS credentials expiring after a given amount of time, the * login token from the identity provider will also expire. Once this token * expires, it will not be usable to refresh AWS credentials, and another * token will be needed. The SDK does not manage refreshing of the token value, * but this can be done through a "refresh token" supported by most identity * providers. Consult the documentation for the identity provider for refreshing * tokens. Once the refreshed token is acquired, you should make sure to update * this new token in the credentials object's {params} property. The following * code will update the WebIdentityToken, assuming you have retrieved an updated * token from the identity provider: * * ```javascript * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken; * ``` * * Future calls to `credentials.refresh()` will now use the new token. * * @!attribute params * @return [map] the map of params passed to * {AWS.CognitoIdentity.getId}, * {AWS.CognitoIdentity.getOpenIdToken}, and * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the * `params.WebIdentityToken` property. * @!attribute data * @return [map] the raw data response from the call to * {AWS.CognitoIdentity.getCredentialsForIdentity}, or * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get * access to other properties from the response. * @!attribute identityId * @return [String] the Cognito ID returned by the last call to * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual * final resolved identity ID from Amazon Cognito. */ AWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, { /** * @api private */ localStorageKey: { id: 'aws.cognito.identity-id.', providers: 'aws.cognito.identity-providers.' }, /** * Creates a new credentials object. * @example Creating a new credentials object * AWS.config.credentials = new AWS.CognitoIdentityCredentials({ * * // either IdentityPoolId or IdentityId is required * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below) * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity * // or AWS.CognitoIdentity.getOpenIdToken (linked below) * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030', * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f' * * // optional, only necessary when the identity pool is not configured * // to use IAM roles in the Amazon Cognito Console * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below) * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity', * * // optional tokens, used for authenticated login * // See the Logins param for AWS.CognitoIdentity.getID (linked below) * Logins: { * 'graph.facebook.com': 'FBTOKEN', * 'www.amazon.com': 'AMAZONTOKEN', * 'accounts.google.com': 'GOOGLETOKEN', * 'api.twitter.com': 'TWITTERTOKEN', * 'www.digits.com': 'DIGITSTOKEN' * }, * * // optional name, defaults to web-identity * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below) * RoleSessionName: 'web', * * // optional, only necessary when application runs in a browser * // and multiple users are signed in at once, used for caching * LoginId: 'example@gmail.com' * * }, { * // optionally provide configuration to apply to the underlying service clients * // if configuration is not provided, then configuration will be pulled from AWS.config * * // region should match the region your identity pool is located in * region: 'us-east-1', * * // specify timeout options * httpOptions: { * timeout: 100 * } * }); * @see AWS.CognitoIdentity.getId * @see AWS.CognitoIdentity.getCredentialsForIdentity * @see AWS.STS.assumeRoleWithWebIdentity * @see AWS.CognitoIdentity.getOpenIdToken * @see AWS.Config * @note If a region is not provided in the global AWS.config, or * specified in the `clientConfig` to the CognitoIdentityCredentials * constructor, you may encounter a 'Missing credentials in config' error * when calling making a service call. */ constructor: function CognitoIdentityCredentials(params, clientConfig) { AWS.Credentials.call(this); this.expired = true; this.params = params; this.data = null; this._identityId = null; this._clientConfig = AWS.util.copy(clientConfig || {}); this.loadCachedId(); var self = this; Object.defineProperty(this, 'identityId', { get: function() { self.loadCachedId(); return self._identityId || self.params.IdentityId; }, set: function(identityId) { self._identityId = identityId; } }); }, /** * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity}, * or {AWS.STS.assumeRoleWithWebIdentity}. * * @callback callback function(err) * Called when the STS service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see AWS.Credentials.get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private * @param callback */ load: function load(callback) { var self = this; self.createClients(); self.data = null; self._identityId = null; self.getId(function(err) { if (!err) { if (!self.params.RoleArn) { self.getCredentialsForIdentity(callback); } else { self.getCredentialsFromSTS(callback); } } else { self.clearIdOnNotAuthorized(err); callback(err); } }); }, /** * Clears the cached Cognito ID associated with the currently configured * identity pool ID. Use this to manually invalidate your cache if * the identity pool ID was deleted. */ clearCachedId: function clearCache() { this._identityId = null; delete this.params.IdentityId; var poolId = this.params.IdentityPoolId; var loginId = this.params.LoginId || ''; delete this.storage[this.localStorageKey.id + poolId + loginId]; delete this.storage[this.localStorageKey.providers + poolId + loginId]; }, /** * @api private */ clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) { var self = this; if (err.code == 'NotAuthorizedException') { self.clearCachedId(); } }, /** * Retrieves a Cognito ID, loading from cache if it was already retrieved * on this device. * * @callback callback function(err, identityId) * @param err [Error, null] an error object if the call failed or null if * it succeeded. * @param identityId [String, null] if successful, the callback will return * the Cognito ID. * @note If not loaded explicitly, the Cognito ID is loaded and stored in * localStorage in the browser environment of a device. * @api private */ getId: function getId(callback) { var self = this; if (typeof self.params.IdentityId === 'string') { return callback(null, self.params.IdentityId); } self.cognito.getId(function(err, data) { if (!err && data.IdentityId) { self.params.IdentityId = data.IdentityId; callback(null, data.IdentityId); } else { callback(err); } }); }, /** * @api private */ loadCredentials: function loadCredentials(data, credentials) { if (!data || !credentials) return; credentials.expired = false; credentials.accessKeyId = data.Credentials.AccessKeyId; credentials.secretAccessKey = data.Credentials.SecretKey; credentials.sessionToken = data.Credentials.SessionToken; credentials.expireTime = data.Credentials.Expiration; }, /** * @api private */ getCredentialsForIdentity: function getCredentialsForIdentity(callback) { var self = this; self.cognito.getCredentialsForIdentity(function(err, data) { if (!err) { self.cacheId(data); self.data = data; self.loadCredentials(self.data, self); } else { self.clearIdOnNotAuthorized(err); } callback(err); }); }, /** * @api private */ getCredentialsFromSTS: function getCredentialsFromSTS(callback) { var self = this; self.cognito.getOpenIdToken(function(err, data) { if (!err) { self.cacheId(data); self.params.WebIdentityToken = data.Token; self.webIdentityCredentials.refresh(function(webErr) { if (!webErr) { self.data = self.webIdentityCredentials.data; self.sts.credentialsFrom(self.data, self); } callback(webErr); }); } else { self.clearIdOnNotAuthorized(err); callback(err); } }); }, /** * @api private */ loadCachedId: function loadCachedId() { var self = this; // in the browser we source default IdentityId from localStorage if (AWS.util.isBrowser() && !self.params.IdentityId) { var id = self.getStorage('id'); if (id && self.params.Logins) { var actualProviders = Object.keys(self.params.Logins); var cachedProviders = (self.getStorage('providers') || '').split(','); // only load ID if at least one provider used this ID before var intersect = cachedProviders.filter(function(n) { return actualProviders.indexOf(n) !== -1; }); if (intersect.length !== 0) { self.params.IdentityId = id; } } else if (id) { self.params.IdentityId = id; } } }, /** * @api private */ createClients: function() { var clientConfig = this._clientConfig; this.webIdentityCredentials = this.webIdentityCredentials || new AWS.WebIdentityCredentials(this.params, clientConfig); if (!this.cognito) { var cognitoConfig = AWS.util.merge({}, clientConfig); cognitoConfig.params = this.params; this.cognito = new CognitoIdentity(cognitoConfig); } this.sts = this.sts || new STS(clientConfig); }, /** * @api private */ cacheId: function cacheId(data) { this._identityId = data.IdentityId; this.params.IdentityId = this._identityId; // cache this IdentityId in browser localStorage if possible if (AWS.util.isBrowser()) { this.setStorage('id', data.IdentityId); if (this.params.Logins) { this.setStorage('providers', Object.keys(this.params.Logins).join(',')); } } }, /** * @api private */ getStorage: function getStorage(key) { return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')]; }, /** * @api private */ setStorage: function setStorage(key, val) { try { this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val; } catch (_) {} }, /** * @api private */ storage: (function() { try { var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ? window.localStorage : {}; // Test set/remove which would throw an error in Safari's private browsing storage['aws.test-storage'] = 'foobar'; delete storage['aws.test-storage']; return storage; } catch (_) { return {}; } })() }); /***/ }), /***/ 36965: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Creates a credential provider chain that searches for AWS credentials * in a list of credential providers specified by the {providers} property. * * By default, the chain will use the {defaultProviders} to resolve credentials. * These providers will look in the environment using the * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes. * * ## Setting Providers * * Each provider in the {providers} list should be a function that returns * a {AWS.Credentials} object, or a hardcoded credentials object. The function * form allows for delayed execution of the credential construction. * * ## Resolving Credentials from a Chain * * Call {resolve} to return the first valid credential object that can be * loaded by the provider chain. * * For example, to resolve a chain with a custom provider that checks a file * on disk after the set of {defaultProviders}: * * ```javascript * var diskProvider = new AWS.FileSystemCredentials('./creds.json'); * var chain = new AWS.CredentialProviderChain(); * chain.providers.push(diskProvider); * chain.resolve(); * ``` * * The above code will return the `diskProvider` object if the * file contains credentials and the `defaultProviders` do not contain * any credential settings. * * @!attribute providers * @return [Array] * a list of credentials objects or functions that return credentials * objects. If the provider is a function, the function will be * executed lazily when the provider needs to be checked for valid * credentials. By default, this object will be set to the * {defaultProviders}. * @see defaultProviders */ AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, { /** * Creates a new CredentialProviderChain with a default set of providers * specified by {defaultProviders}. */ constructor: function CredentialProviderChain(providers) { if (providers) { this.providers = providers; } else { this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0); } this.resolveCallbacks = []; }, /** * @!method resolvePromise() * Returns a 'thenable' promise. * Resolves the provider chain by searching for the first set of * credentials in {providers}. * * Two callbacks can be provided to the `then` method on the returned promise. * The first callback will be called if the promise is fulfilled, and the second * callback will be called if the promise is rejected. * @callback fulfilledCallback function(credentials) * Called if the promise is fulfilled and the provider resolves the chain * to a credentials object * @param credentials [AWS.Credentials] the credentials object resolved * by the provider chain. * @callback rejectedCallback function(error) * Called if the promise is rejected. * @param err [Error] the error object returned if no credentials are found. * @return [Promise] A promise that represents the state of the `resolve` method call. * @example Calling the `resolvePromise` method. * var promise = chain.resolvePromise(); * promise.then(function(credentials) { ... }, function(err) { ... }); */ /** * Resolves the provider chain by searching for the first set of * credentials in {providers}. * * @callback callback function(err, credentials) * Called when the provider resolves the chain to a credentials object * or null if no credentials can be found. * * @param err [Error] the error object returned if no credentials are * found. * @param credentials [AWS.Credentials] the credentials object resolved * by the provider chain. * @return [AWS.CredentialProviderChain] the provider, for chaining. */ resolve: function resolve(callback) { var self = this; if (self.providers.length === 0) { callback(new Error('No providers')); return self; } if (self.resolveCallbacks.push(callback) === 1) { var index = 0; var providers = self.providers.slice(0); function resolveNext(err, creds) { if ((!err && creds) || index === providers.length) { AWS.util.arrayEach(self.resolveCallbacks, function (callback) { callback(err, creds); }); self.resolveCallbacks.length = 0; return; } var provider = providers[index++]; if (typeof provider === 'function') { creds = provider.call(); } else { creds = provider; } if (creds.get) { creds.get(function (getErr) { resolveNext(getErr, getErr ? null : creds); }); } else { resolveNext(null, creds); } } resolveNext(); } return self; } }); /** * The default set of providers used by a vanilla CredentialProviderChain. * * In the browser: * * ```javascript * AWS.CredentialProviderChain.defaultProviders = [] * ``` * * In Node.js: * * ```javascript * AWS.CredentialProviderChain.defaultProviders = [ * function () { return new AWS.EnvironmentCredentials('AWS'); }, * function () { return new AWS.EnvironmentCredentials('AMAZON'); }, * function () { return new AWS.SharedIniFileCredentials(); }, * function () { return new AWS.ECSCredentials(); }, * function () { return new AWS.ProcessCredentials(); }, * function () { return new AWS.TokenFileWebIdentityCredentials(); }, * function () { return new AWS.EC2MetadataCredentials() } * ] * ``` */ AWS.CredentialProviderChain.defaultProviders = []; /** * @api private */ AWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) { this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency); }; /** * @api private */ AWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() { delete this.prototype.resolvePromise; }; AWS.util.addPromises(AWS.CredentialProviderChain); /***/ }), /***/ 73379: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); __webpack_require__(25768); /** * Represents credentials received from the metadata service on an EC2 instance. * * By default, this class will connect to the metadata service using * {AWS.MetadataService} and attempt to load any available credentials. If it * can connect, and credentials are available, these will be used with zero * configuration. * * This credentials class will by default timeout after 1 second of inactivity * and retry 3 times. * If your requests to the EC2 metadata service are timing out, you can increase * these values by configuring them directly: * * ```javascript * AWS.config.credentials = new AWS.EC2MetadataCredentials({ * httpOptions: { timeout: 5000 }, // 5 second timeout * maxRetries: 10, // retry 10 times * retryDelayOptions: { base: 200 } // see AWS.Config for information * }); * * If your requests are timing out in connecting to the metadata service, such * as when testing on a development machine, you can use the connectTimeout * option, specified in milliseconds, which also defaults to 1 second. * ``` * * @see AWS.Config.retryDelayOptions * * @!macro nobrowser */ AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { constructor: function EC2MetadataCredentials(options) { AWS.Credentials.call(this); options = options ? AWS.util.copy(options) : {}; options = AWS.util.merge( {maxRetries: this.defaultMaxRetries}, options); if (!options.httpOptions) options.httpOptions = {}; options.httpOptions = AWS.util.merge( {timeout: this.defaultTimeout, connectTimeout: this.defaultConnectTimeout}, options.httpOptions); this.metadataService = new AWS.MetadataService(options); this.metadata = {}; }, /** * @api private */ defaultTimeout: 1000, /** * @api private */ defaultConnectTimeout: 1000, /** * @api private */ defaultMaxRetries: 3, /** * Loads the credentials from the instance metadata service * * @callback callback function(err) * Called when the instance metadata service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private * @param callback */ load: function load(callback) { var self = this; self.metadataService.loadCredentials(function(err, creds) { if (!err) { var currentTime = AWS.util.date.getDate(); var expireTime = new Date(creds.Expiration); if (expireTime < currentTime) { err = AWS.util.error( new Error('EC2 Instance Metadata Serivce provided expired credentials'), { code: 'EC2MetadataCredentialsProviderFailure' } ); } else { self.expired = false; self.metadata = creds; self.accessKeyId = creds.AccessKeyId; self.secretAccessKey = creds.SecretAccessKey; self.sessionToken = creds.Token; self.expireTime = expireTime; } } callback(err); }); } }); /***/ }), /***/ 10645: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Represents credentials received from relative URI specified in the ECS container. * * This class will request refreshable credentials from the relative URI * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials * are returned in the response, these will be used with zero configuration. * * This credentials class will by default timeout after 1 second of inactivity * and retry 3 times. * If your requests to the relative URI are timing out, you can increase * the value by configuring them directly: * * ```javascript * AWS.config.credentials = new AWS.ECSCredentials({ * httpOptions: { timeout: 5000 }, // 5 second timeout * maxRetries: 10, // retry 10 times * retryDelayOptions: { base: 200 } // see AWS.Config for information * }); * ``` * * @see AWS.Config.retryDelayOptions * * @!macro nobrowser */ AWS.ECSCredentials = AWS.RemoteCredentials; /***/ }), /***/ 57714: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Represents credentials from the environment. * * By default, this class will look for the matching environment variables * prefixed by a given {envPrefix}. The un-prefixed environment variable names * for each credential value is listed below: * * ```javascript * accessKeyId: ACCESS_KEY_ID * secretAccessKey: SECRET_ACCESS_KEY * sessionToken: SESSION_TOKEN * ``` * * With the default prefix of 'AWS', the environment variables would be: * * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN * * @!attribute envPrefix * @readonly * @return [String] the prefix for the environment variable names excluding * the separating underscore ('_'). */ AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new EnvironmentCredentials class with a given variable * prefix {envPrefix}. For example, to load credentials using the 'AWS' * prefix: * * ```javascript * var creds = new AWS.EnvironmentCredentials('AWS'); * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var * ``` * * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment * variables. Do not include the separating underscore. */ constructor: function EnvironmentCredentials(envPrefix) { AWS.Credentials.call(this); this.envPrefix = envPrefix; this.get(function() {}); }, /** * Loads credentials from the environment using the prefixed * environment variables. * * @callback callback function(err) * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and * SESSION_TOKEN environment variables are read. When this callback is * called with no error, it means that the credentials information has * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, * and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { if (!callback) callback = AWS.util.fn.callback; if (!process || !process.env) { callback(AWS.util.error( new Error('No process info or environment variables available'), { code: 'EnvironmentCredentialsProviderFailure' } )); return; } var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN']; var values = []; for (var i = 0; i < keys.length; i++) { var prefix = ''; if (this.envPrefix) prefix = this.envPrefix + '_'; values[i] = process.env[prefix + keys[i]]; if (!values[i] && keys[i] !== 'SESSION_TOKEN') { callback(AWS.util.error( new Error('Variable ' + prefix + keys[i] + ' not set.'), { code: 'EnvironmentCredentialsProviderFailure' } )); return; } } this.expired = false; AWS.Credentials.apply(this, values); callback(); } }); /***/ }), /***/ 27454: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Represents credentials from a JSON file on disk. * If the credentials expire, the SDK can {refresh} the credentials * from the file. * * The format of the file should be similar to the options passed to * {AWS.Config}: * * ```javascript * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} * ``` * * @example Loading credentials from disk * var creds = new AWS.FileSystemCredentials('./configuration.json'); * creds.accessKeyId == 'AKID' * * @!attribute filename * @readonly * @return [String] the path to the JSON file on disk containing the * credentials. * @!macro nobrowser */ AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { /** * @overload AWS.FileSystemCredentials(filename) * Creates a new FileSystemCredentials object from a filename * * @param filename [String] the path on disk to the JSON file to load. */ constructor: function FileSystemCredentials(filename) { AWS.Credentials.call(this); this.filename = filename; this.get(function() {}); }, /** * Loads the credentials from the {filename} on disk. * * @callback callback function(err) * Called after the JSON file on disk is read and parsed. When this callback * is called with no error, it means that the credentials information * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`, * and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { if (!callback) callback = AWS.util.fn.callback; try { var creds = JSON.parse(AWS.util.readFileSync(this.filename)); AWS.Credentials.call(this, creds); if (!this.accessKeyId || !this.secretAccessKey) { throw AWS.util.error( new Error('Credentials not set in ' + this.filename), { code: 'FileSystemCredentialsProviderFailure' } ); } this.expired = false; callback(); } catch (err) { callback(err); } } }); /***/ }), /***/ 80371: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var proc = __webpack_require__(63129); var iniLoader = AWS.util.iniLoader; /** * Represents credentials loaded from shared credentials file * (defaulting to ~/.aws/credentials or defined by the * `AWS_SHARED_CREDENTIALS_FILE` environment variable). * * ## Using process credentials * * The credentials file can specify a credential provider that executes * a given process and attempts to read its stdout to recieve a JSON payload * containing the credentials: * * [default] * credential_process = /usr/bin/credential_proc * * Automatically handles refreshing credentials if an Expiration time is * provided in the credentials payload. Credentials supplied in the same profile * will take precedence over the credential_process. * * Sourcing credentials from an external process can potentially be dangerous, * so proceed with caution. Other credential providers should be preferred if * at all possible. If using this option, you should make sure that the shared * credentials file is as locked down as possible using security best practices * for your operating system. * * ## Using custom profiles * * The SDK supports loading credentials for separate profiles. This can be done * in two ways: * * 1. Set the `AWS_PROFILE` environment variable in your process prior to * loading the SDK. * 2. Directly load the AWS.ProcessCredentials provider: * * ```javascript * var creds = new AWS.ProcessCredentials({profile: 'myprofile'}); * AWS.config.credentials = creds; * ``` * * @!macro nobrowser */ AWS.ProcessCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new ProcessCredentials object. * * @param options [map] a set of options * @option options profile [String] (AWS_PROFILE env var or 'default') * the name of the profile to load. * @option options filename [String] ('~/.aws/credentials' or defined by * AWS_SHARED_CREDENTIALS_FILE process env var) * the filename to use when loading credentials. * @option options callback [Function] (err) Credentials are eagerly loaded * by the constructor. When the callback is called with no error, the * credentials have been loaded successfully. */ constructor: function ProcessCredentials(options) { AWS.Credentials.call(this); options = options || {}; this.filename = options.filename; this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile; this.get(options.callback || AWS.util.fn.noop); }, /** * @api private */ load: function load(callback) { var self = this; try { var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename); var profile = profiles[this.profile] || {}; if (Object.keys(profile).length === 0) { throw AWS.util.error( new Error('Profile ' + this.profile + ' not found'), { code: 'ProcessCredentialsProviderFailure' } ); } if (profile['credential_process']) { this.loadViaCredentialProcess(profile, function(err, data) { if (err) { callback(err, null); } else { self.expired = false; self.accessKeyId = data.AccessKeyId; self.secretAccessKey = data.SecretAccessKey; self.sessionToken = data.SessionToken; if (data.Expiration) { self.expireTime = new Date(data.Expiration); } callback(null); } }); } else { throw AWS.util.error( new Error('Profile ' + this.profile + ' did not include credential process'), { code: 'ProcessCredentialsProviderFailure' } ); } } catch (err) { callback(err); } }, /** * Executes the credential_process and retrieves * credentials from the output * @api private * @param profile [map] credentials profile * @throws ProcessCredentialsProviderFailure */ loadViaCredentialProcess: function loadViaCredentialProcess(profile, callback) { proc.exec(profile['credential_process'], function(err, stdOut, stdErr) { if (err) { callback(AWS.util.error( new Error('credential_process returned error'), { code: 'ProcessCredentialsProviderFailure'} ), null); } else { try { var credData = JSON.parse(stdOut); if (credData.Expiration) { var currentTime = AWS.util.date.getDate(); var expireTime = new Date(credData.Expiration); if (expireTime < currentTime) { throw Error('credential_process returned expired credentials'); } } if (credData.Version !== 1) { throw Error('credential_process does not return Version == 1'); } callback(null, credData); } catch (err) { callback(AWS.util.error( new Error(err.message), { code: 'ProcessCredentialsProviderFailure'} ), null); } } }); }, /** * Loads the credentials from the credential process * * @callback callback function(err) * Called after the credential process has been executed. When this * callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { iniLoader.clearCachedFiles(); this.coalesceRefresh(callback || AWS.util.fn.callback); } }); /***/ }), /***/ 88764: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437), ENV_RELATIVE_URI = 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI', ENV_FULL_URI = 'AWS_CONTAINER_CREDENTIALS_FULL_URI', ENV_AUTH_TOKEN = 'AWS_CONTAINER_AUTHORIZATION_TOKEN', FULL_URI_UNRESTRICTED_PROTOCOLS = ['https:'], FULL_URI_ALLOWED_PROTOCOLS = ['http:', 'https:'], FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1'], RELATIVE_URI_HOST = '169.254.170.2'; /** * Represents credentials received from specified URI. * * This class will request refreshable credentials from the relative URI * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials * are returned in the response, these will be used with zero configuration. * * This credentials class will by default timeout after 1 second of inactivity * and retry 3 times. * If your requests to the relative URI are timing out, you can increase * the value by configuring them directly: * * ```javascript * AWS.config.credentials = new AWS.RemoteCredentials({ * httpOptions: { timeout: 5000 }, // 5 second timeout * maxRetries: 10, // retry 10 times * retryDelayOptions: { base: 200 } // see AWS.Config for information * }); * ``` * * @see AWS.Config.retryDelayOptions * * @!macro nobrowser */ AWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, { constructor: function RemoteCredentials(options) { AWS.Credentials.call(this); options = options ? AWS.util.copy(options) : {}; if (!options.httpOptions) options.httpOptions = {}; options.httpOptions = AWS.util.merge( this.httpOptions, options.httpOptions); AWS.util.update(this, options); }, /** * @api private */ httpOptions: { timeout: 1000 }, /** * @api private */ maxRetries: 3, /** * @api private */ isConfiguredForEcsCredentials: function isConfiguredForEcsCredentials() { return Boolean( process && process.env && (process.env[ENV_RELATIVE_URI] || process.env[ENV_FULL_URI]) ); }, /** * @api private */ getECSFullUri: function getECSFullUri() { if (process && process.env) { var relative = process.env[ENV_RELATIVE_URI], full = process.env[ENV_FULL_URI]; if (relative) { return 'http://' + RELATIVE_URI_HOST + relative; } else if (full) { var parsed = AWS.util.urlParse(full); if (FULL_URI_ALLOWED_PROTOCOLS.indexOf(parsed.protocol) < 0) { throw AWS.util.error( new Error('Unsupported protocol: AWS.RemoteCredentials supports ' + FULL_URI_ALLOWED_PROTOCOLS.join(',') + ' only; ' + parsed.protocol + ' requested.'), { code: 'ECSCredentialsProviderFailure' } ); } if (FULL_URI_UNRESTRICTED_PROTOCOLS.indexOf(parsed.protocol) < 0 && FULL_URI_ALLOWED_HOSTNAMES.indexOf(parsed.hostname) < 0) { throw AWS.util.error( new Error('Unsupported hostname: AWS.RemoteCredentials only supports ' + FULL_URI_ALLOWED_HOSTNAMES.join(',') + ' for ' + parsed.protocol + '; ' + parsed.protocol + '//' + parsed.hostname + ' requested.'), { code: 'ECSCredentialsProviderFailure' } ); } return full; } else { throw AWS.util.error( new Error('Variable ' + ENV_RELATIVE_URI + ' or ' + ENV_FULL_URI + ' must be set to use AWS.RemoteCredentials.'), { code: 'ECSCredentialsProviderFailure' } ); } } else { throw AWS.util.error( new Error('No process info available'), { code: 'ECSCredentialsProviderFailure' } ); } }, /** * @api private */ getECSAuthToken: function getECSAuthToken() { if (process && process.env && process.env[ENV_FULL_URI]) { return process.env[ENV_AUTH_TOKEN]; } }, /** * @api private */ credsFormatIsValid: function credsFormatIsValid(credData) { return (!!credData.accessKeyId && !!credData.secretAccessKey && !!credData.sessionToken && !!credData.expireTime); }, /** * @api private */ formatCreds: function formatCreds(credData) { if (!!credData.credentials) { credData = credData.credentials; } return { expired: false, accessKeyId: credData.accessKeyId || credData.AccessKeyId, secretAccessKey: credData.secretAccessKey || credData.SecretAccessKey, sessionToken: credData.sessionToken || credData.Token, expireTime: new Date(credData.expiration || credData.Expiration) }; }, /** * @api private */ request: function request(url, callback) { var httpRequest = new AWS.HttpRequest(url); httpRequest.method = 'GET'; httpRequest.headers.Accept = 'application/json'; var token = this.getECSAuthToken(); if (token) { httpRequest.headers.Authorization = token; } AWS.util.handleRequestWithRetries(httpRequest, this, callback); }, /** * Loads the credentials from the relative URI specified by container * * @callback callback function(err) * Called when the request to the relative URI responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, `sessionToken`, and `expireTime` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private */ load: function load(callback) { var self = this; var fullUri; try { fullUri = this.getECSFullUri(); } catch (err) { callback(err); return; } this.request(fullUri, function(err, data) { if (!err) { try { data = JSON.parse(data); var creds = self.formatCreds(data); if (!self.credsFormatIsValid(creds)) { throw AWS.util.error( new Error('Response data is not in valid format'), { code: 'ECSCredentialsProviderFailure' } ); } AWS.util.update(self, creds); } catch (dataError) { err = dataError; } } callback(err, creds); }); } }); /***/ }), /***/ 15037: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var STS = __webpack_require__(57513); /** * Represents credentials retrieved from STS SAML support. * * By default this provider gets credentials using the * {AWS.STS.assumeRoleWithSAML} service operation. This operation * requires a `RoleArn` containing the ARN of the IAM trust policy for the * application for which credentials will be given, as well as a `PrincipalArn` * representing the ARN for the SAML identity provider. In addition, the * `SAMLAssertion` must be set to the token provided by the identity * provider. See {constructor} for an example on creating a credentials * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values. * * ## Refreshing Credentials from Identity Service * * In addition to AWS credentials expiring after a given amount of time, the * login token from the identity provider will also expire. Once this token * expires, it will not be usable to refresh AWS credentials, and another * token will be needed. The SDK does not manage refreshing of the token value, * but this can be done through a "refresh token" supported by most identity * providers. Consult the documentation for the identity provider for refreshing * tokens. Once the refreshed token is acquired, you should make sure to update * this new token in the credentials object's {params} property. The following * code will update the SAMLAssertion, assuming you have retrieved an updated * token from the identity provider: * * ```javascript * AWS.config.credentials.params.SAMLAssertion = updatedToken; * ``` * * Future calls to `credentials.refresh()` will now use the new token. * * @!attribute params * @return [map] the map of params passed to * {AWS.STS.assumeRoleWithSAML}. To update the token, set the * `params.SAMLAssertion` property. */ AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new credentials object. * @param (see AWS.STS.assumeRoleWithSAML) * @example Creating a new credentials object * AWS.config.credentials = new AWS.SAMLCredentials({ * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole', * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal', * SAMLAssertion: 'base64-token', // base64-encoded token from IdP * }); * @see AWS.STS.assumeRoleWithSAML */ constructor: function SAMLCredentials(params) { AWS.Credentials.call(this); this.expired = true; this.params = params; }, /** * Refreshes credentials using {AWS.STS.assumeRoleWithSAML} * * @callback callback function(err) * Called when the STS service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private */ load: function load(callback) { var self = this; self.createClients(); self.service.assumeRoleWithSAML(function (err, data) { if (!err) { self.service.credentialsFrom(data, self); } callback(err); }); }, /** * @api private */ createClients: function() { this.service = this.service || new STS({params: this.params}); } }); /***/ }), /***/ 13754: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var STS = __webpack_require__(57513); var iniLoader = AWS.util.iniLoader; var ASSUME_ROLE_DEFAULT_REGION = 'us-east-1'; /** * Represents credentials loaded from shared credentials file * (defaulting to ~/.aws/credentials or defined by the * `AWS_SHARED_CREDENTIALS_FILE` environment variable). * * ## Using the shared credentials file * * This provider is checked by default in the Node.js environment. To use the * credentials file provider, simply add your access and secret keys to the * ~/.aws/credentials file in the following format: * * [default] * aws_access_key_id = AKID... * aws_secret_access_key = YOUR_SECRET_KEY * * ## Using custom profiles * * The SDK supports loading credentials for separate profiles. This can be done * in two ways: * * 1. Set the `AWS_PROFILE` environment variable in your process prior to * loading the SDK. * 2. Directly load the AWS.SharedIniFileCredentials provider: * * ```javascript * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'}); * AWS.config.credentials = creds; * ``` * * @!macro nobrowser */ AWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new SharedIniFileCredentials object. * * @param options [map] a set of options * @option options profile [String] (AWS_PROFILE env var or 'default') * the name of the profile to load. * @option options filename [String] ('~/.aws/credentials' or defined by * AWS_SHARED_CREDENTIALS_FILE process env var) * the filename to use when loading credentials. * @option options disableAssumeRole [Boolean] (false) True to disable * support for profiles that assume an IAM role. If true, and an assume * role profile is selected, an error is raised. * @option options preferStaticCredentials [Boolean] (false) True to * prefer static credentials to role_arn if both are present. * @option options tokenCodeFn [Function] (null) Function to provide * STS Assume Role TokenCode, if mfa_serial is provided for profile in ini * file. Function is called with value of mfa_serial and callback, and * should provide the TokenCode or an error to the callback in the format * callback(err, token) * @option options callback [Function] (err) Credentials are eagerly loaded * by the constructor. When the callback is called with no error, the * credentials have been loaded successfully. * @option options httpOptions [map] A set of options to pass to the low-level * HTTP request. Currently supported options are: * * **proxy** [String] — the URL to proxy requests through * * **agent** [http.Agent, https.Agent] — the Agent object to perform * HTTP requests with. Used for connection pooling. Defaults to the global * agent (`http.globalAgent`) for non-SSL connections. Note that for * SSL connections, a special Agent object is used in order to enable * peer certificate verification. This feature is only available in the * Node.js environment. * * **connectTimeout** [Integer] — Sets the socket to timeout after * failing to establish a connection with the server after * `connectTimeout` milliseconds. This timeout has no effect once a socket * connection has been established. * * **timeout** [Integer] — The number of milliseconds a request can * take before automatically being terminated. * Defaults to two minutes (120000). */ constructor: function SharedIniFileCredentials(options) { AWS.Credentials.call(this); options = options || {}; this.filename = options.filename; this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile; this.disableAssumeRole = Boolean(options.disableAssumeRole); this.preferStaticCredentials = Boolean(options.preferStaticCredentials); this.tokenCodeFn = options.tokenCodeFn || null; this.httpOptions = options.httpOptions || null; this.get(options.callback || AWS.util.fn.noop); }, /** * @api private */ load: function load(callback) { var self = this; try { var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename); var profile = profiles[this.profile] || {}; if (Object.keys(profile).length === 0) { throw AWS.util.error( new Error('Profile ' + this.profile + ' not found'), { code: 'SharedIniFileCredentialsProviderFailure' } ); } /* In the CLI, the presence of both a role_arn and static credentials have different meanings depending on how many profiles have been visited. For the first profile processed, role_arn takes precedence over any static credentials, but for all subsequent profiles, static credentials are used if present, and only in their absence will the profile's source_profile and role_arn keys be used to load another set of credentials. This var is intended to yield compatible behaviour in this sdk. */ var preferStaticCredentialsToRoleArn = Boolean( this.preferStaticCredentials && profile['aws_access_key_id'] && profile['aws_secret_access_key'] ); if (profile['role_arn'] && !preferStaticCredentialsToRoleArn) { this.loadRoleProfile(profiles, profile, function(err, data) { if (err) { callback(err); } else { self.expired = false; self.accessKeyId = data.Credentials.AccessKeyId; self.secretAccessKey = data.Credentials.SecretAccessKey; self.sessionToken = data.Credentials.SessionToken; self.expireTime = data.Credentials.Expiration; callback(null); } }); return; } this.accessKeyId = profile['aws_access_key_id']; this.secretAccessKey = profile['aws_secret_access_key']; this.sessionToken = profile['aws_session_token']; if (!this.accessKeyId || !this.secretAccessKey) { throw AWS.util.error( new Error('Credentials not set for profile ' + this.profile), { code: 'SharedIniFileCredentialsProviderFailure' } ); } this.expired = false; callback(null); } catch (err) { callback(err); } }, /** * Loads the credentials from the shared credentials file * * @callback callback function(err) * Called after the shared INI file on disk is read and parsed. When this * callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { iniLoader.clearCachedFiles(); this.coalesceRefresh( callback || AWS.util.fn.callback, this.disableAssumeRole ); }, /** * @api private */ loadRoleProfile: function loadRoleProfile(creds, roleProfile, callback) { if (this.disableAssumeRole) { throw AWS.util.error( new Error('Role assumption profiles are disabled. ' + 'Failed to load profile ' + this.profile + ' from ' + creds.filename), { code: 'SharedIniFileCredentialsProviderFailure' } ); } var self = this; var roleArn = roleProfile['role_arn']; var roleSessionName = roleProfile['role_session_name']; var externalId = roleProfile['external_id']; var mfaSerial = roleProfile['mfa_serial']; var sourceProfileName = roleProfile['source_profile']; // From experimentation, the following behavior mimics the AWS CLI: // // 1. Use region from the profile if present. // 2. Otherwise fall back to N. Virginia (global endpoint). // // It is necessary to do the fallback explicitly, because if // 'AWS_STS_REGIONAL_ENDPOINTS=regional', the underlying STS client will // otherwise throw an error if region is left 'undefined'. // // Experimentation shows that the AWS CLI (tested at version 1.18.136) // ignores the following potential sources of a region for the purposes of // this AssumeRole call: // // - The [default] profile // - The AWS_REGION environment variable // // Ignoring the [default] profile for the purposes of AssumeRole is arguably // a bug in the CLI since it does use the [default] region for service // calls... but right now we're matching behavior of the other tool. var profileRegion = roleProfile['region'] || ASSUME_ROLE_DEFAULT_REGION; if (!sourceProfileName) { throw AWS.util.error( new Error('source_profile is not set using profile ' + this.profile), { code: 'SharedIniFileCredentialsProviderFailure' } ); } var sourceProfileExistanceTest = creds[sourceProfileName]; if (typeof sourceProfileExistanceTest !== 'object') { throw AWS.util.error( new Error('source_profile ' + sourceProfileName + ' using profile ' + this.profile + ' does not exist'), { code: 'SharedIniFileCredentialsProviderFailure' } ); } var sourceCredentials = new AWS.SharedIniFileCredentials( AWS.util.merge(this.options || {}, { profile: sourceProfileName, preferStaticCredentials: true }) ); this.roleArn = roleArn; var sts = new STS({ credentials: sourceCredentials, region: profileRegion, httpOptions: this.httpOptions }); var roleParams = { RoleArn: roleArn, RoleSessionName: roleSessionName || 'aws-sdk-js-' + Date.now() }; if (externalId) { roleParams.ExternalId = externalId; } if (mfaSerial && self.tokenCodeFn) { roleParams.SerialNumber = mfaSerial; self.tokenCodeFn(mfaSerial, function(err, token) { if (err) { var message; if (err instanceof Error) { message = err.message; } else { message = err; } callback( AWS.util.error( new Error('Error fetching MFA token: ' + message), { code: 'SharedIniFileCredentialsProviderFailure' } )); return; } roleParams.TokenCode = token; sts.assumeRole(roleParams, callback); }); return; } sts.assumeRole(roleParams, callback); } }); /***/ }), /***/ 77360: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var STS = __webpack_require__(57513); /** * Represents temporary credentials retrieved from {AWS.STS}. Without any * extra parameters, credentials will be fetched from the * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the * {AWS.STS.assumeRole} operation will be used to fetch credentials for the * role instead. * * @note AWS.TemporaryCredentials is deprecated, but remains available for * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the * preferred class for temporary credentials. * * To setup temporary credentials, configure a set of master credentials * using the standard credentials providers (environment, EC2 instance metadata, * or from the filesystem), then set the global credentials to a new * temporary credentials object: * * ```javascript * // Note that environment credentials are loaded by default, * // the following line is shown for clarity: * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS'); * * // Now set temporary credentials seeded from the master credentials * AWS.config.credentials = new AWS.TemporaryCredentials(); * * // subsequent requests will now use temporary credentials from AWS STS. * new AWS.S3().listBucket(function(err, data) { ... }); * ``` * * @!attribute masterCredentials * @return [AWS.Credentials] the master (non-temporary) credentials used to * get and refresh temporary credentials from AWS STS. * @note (see constructor) */ AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new temporary credentials object. * * @note In order to create temporary credentials, you first need to have * "master" credentials configured in {AWS.Config.credentials}. These * master credentials are necessary to retrieve the temporary credentials, * as well as refresh the credentials when they expire. * @param params [map] a map of options that are passed to the * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. * If a `RoleArn` parameter is passed in, credentials will be based on the * IAM role. * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials * used to get and refresh temporary credentials from AWS STS. * @example Creating a new credentials object for generic temporary credentials * AWS.config.credentials = new AWS.TemporaryCredentials(); * @example Creating a new credentials object for an IAM role * AWS.config.credentials = new AWS.TemporaryCredentials({ * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials', * }); * @see AWS.STS.assumeRole * @see AWS.STS.getSessionToken */ constructor: function TemporaryCredentials(params, masterCredentials) { AWS.Credentials.call(this); this.loadMasterCredentials(masterCredentials); this.expired = true; this.params = params || {}; if (this.params.RoleArn) { this.params.RoleSessionName = this.params.RoleSessionName || 'temporary-credentials'; } }, /** * Refreshes credentials using {AWS.STS.assumeRole} or * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed * to the credentials {constructor}. * * @callback callback function(err) * Called when the STS service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh (callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private */ load: function load (callback) { var self = this; self.createClients(); self.masterCredentials.get(function () { self.service.config.credentials = self.masterCredentials; var operation = self.params.RoleArn ? self.service.assumeRole : self.service.getSessionToken; operation.call(self.service, function (err, data) { if (!err) { self.service.credentialsFrom(data, self); } callback(err); }); }); }, /** * @api private */ loadMasterCredentials: function loadMasterCredentials (masterCredentials) { this.masterCredentials = masterCredentials || AWS.config.credentials; while (this.masterCredentials.masterCredentials) { this.masterCredentials = this.masterCredentials.masterCredentials; } if (typeof this.masterCredentials.get !== 'function') { this.masterCredentials = new AWS.Credentials(this.masterCredentials); } }, /** * @api private */ createClients: function () { this.service = this.service || new STS({params: this.params}); } }); /***/ }), /***/ 11017: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var fs = __webpack_require__(35747); var STS = __webpack_require__(57513); var iniLoader = AWS.util.iniLoader; /** * Represents OIDC credentials from a file on disk * If the credentials expire, the SDK can {refresh} the credentials * from the file. * * ## Using the web identity token file * * This provider is checked by default in the Node.js environment. To use * the provider simply add your OIDC token to a file (ASCII encoding) and * share the filename in either AWS_WEB_IDENTITY_TOKEN_FILE environment * variable or web_identity_token_file shared config variable * * The file contains encoded OIDC token and the characters are * ASCII encoded. OIDC tokens are JSON Web Tokens (JWT). * JWT's are 3 base64 encoded strings joined by the '.' character. * * This class will read filename from AWS_WEB_IDENTITY_TOKEN_FILE * environment variable or web_identity_token_file shared config variable, * and get the OIDC token from filename. * It will also read IAM role to be assumed from AWS_ROLE_ARN * environment variable or role_arn shared config variable. * This provider gets credetials using the {AWS.STS.assumeRoleWithWebIdentity} * service operation * * @!macro nobrowser */ AWS.TokenFileWebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { /** * @example Creating a new credentials object * AWS.config.credentials = new AWS.TokenFileWebIdentityCredentials( * // optionally provide configuration to apply to the underlying AWS.STS service client * // if configuration is not provided, then configuration will be pulled from AWS.config * { * // specify timeout options * httpOptions: { * timeout: 100 * } * }); * @see AWS.Config */ constructor: function TokenFileWebIdentityCredentials(clientConfig) { AWS.Credentials.call(this); this.data = null; this.clientConfig = AWS.util.copy(clientConfig || {}); }, /** * Returns params from environment variables * * @api private */ getParamsFromEnv: function getParamsFromEnv() { var ENV_TOKEN_FILE = 'AWS_WEB_IDENTITY_TOKEN_FILE', ENV_ROLE_ARN = 'AWS_ROLE_ARN'; if (process.env[ENV_TOKEN_FILE] && process.env[ENV_ROLE_ARN]) { return [{ envTokenFile: process.env[ENV_TOKEN_FILE], roleArn: process.env[ENV_ROLE_ARN], roleSessionName: process.env['AWS_ROLE_SESSION_NAME'] }]; } }, /** * Returns params from shared config variables * * @api private */ getParamsFromSharedConfig: function getParamsFromSharedConfig() { var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader); var profileName = process.env.AWS_PROFILE || AWS.util.defaultProfile; var profile = profiles[profileName] || {}; if (Object.keys(profile).length === 0) { throw AWS.util.error( new Error('Profile ' + profileName + ' not found'), { code: 'TokenFileWebIdentityCredentialsProviderFailure' } ); } var paramsArray = []; while (!profile['web_identity_token_file'] && profile['source_profile']) { paramsArray.unshift({ roleArn: profile['role_arn'], roleSessionName: profile['role_session_name'] }); var sourceProfile = profile['source_profile']; profile = profiles[sourceProfile]; } paramsArray.unshift({ envTokenFile: profile['web_identity_token_file'], roleArn: profile['role_arn'], roleSessionName: profile['role_session_name'] }); return paramsArray; }, /** * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} * * @callback callback function(err) * Called when the STS service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see AWS.Credentials.get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private */ assumeRoleChaining: function assumeRoleChaining(paramsArray, callback) { var self = this; if (paramsArray.length === 0) { self.service.credentialsFrom(self.data, self); callback(); } else { var params = paramsArray.shift(); self.service.config.credentials = self.service.credentialsFrom(self.data, self); self.service.assumeRole( { RoleArn: params.roleArn, RoleSessionName: params.roleSessionName || 'token-file-web-identity' }, function (err, data) { self.data = null; if (err) { callback(err); } else { self.data = data; self.assumeRoleChaining(paramsArray, callback); } } ); } }, /** * @api private */ load: function load(callback) { var self = this; try { var paramsArray = self.getParamsFromEnv(); if (!paramsArray) { paramsArray = self.getParamsFromSharedConfig(); } if (paramsArray) { var params = paramsArray.shift(); var oidcToken = fs.readFileSync(params.envTokenFile, {encoding: 'ascii'}); if (!self.service) { self.createClients(); } self.service.assumeRoleWithWebIdentity( { WebIdentityToken: oidcToken, RoleArn: params.roleArn, RoleSessionName: params.roleSessionName || 'token-file-web-identity' }, function (err, data) { self.data = null; if (err) { callback(err); } else { self.data = data; self.assumeRoleChaining(paramsArray, callback); } } ); } } catch (err) { callback(err); } }, /** * @api private */ createClients: function() { if (!this.service) { var stsConfig = AWS.util.merge({}, this.clientConfig); this.service = new STS(stsConfig); // Retry in case of IDPCommunicationErrorException or InvalidIdentityToken this.service.retryableError = function(error) { if (error.code === 'IDPCommunicationErrorException' || error.code === 'InvalidIdentityToken') { return true; } else { return AWS.Service.prototype.retryableError.call(this, error); } }; } } }); /***/ }), /***/ 74998: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var STS = __webpack_require__(57513); /** * Represents credentials retrieved from STS Web Identity Federation support. * * By default this provider gets credentials using the * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation * requires a `RoleArn` containing the ARN of the IAM trust policy for the * application for which credentials will be given. In addition, the * `WebIdentityToken` must be set to the token provided by the identity * provider. See {constructor} for an example on creating a credentials * object with proper `RoleArn` and `WebIdentityToken` values. * * ## Refreshing Credentials from Identity Service * * In addition to AWS credentials expiring after a given amount of time, the * login token from the identity provider will also expire. Once this token * expires, it will not be usable to refresh AWS credentials, and another * token will be needed. The SDK does not manage refreshing of the token value, * but this can be done through a "refresh token" supported by most identity * providers. Consult the documentation for the identity provider for refreshing * tokens. Once the refreshed token is acquired, you should make sure to update * this new token in the credentials object's {params} property. The following * code will update the WebIdentityToken, assuming you have retrieved an updated * token from the identity provider: * * ```javascript * AWS.config.credentials.params.WebIdentityToken = updatedToken; * ``` * * Future calls to `credentials.refresh()` will now use the new token. * * @!attribute params * @return [map] the map of params passed to * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the * `params.WebIdentityToken` property. * @!attribute data * @return [map] the raw data response from the call to * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get * access to other properties from the response. */ AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { /** * Creates a new credentials object. * @param (see AWS.STS.assumeRoleWithWebIdentity) * @example Creating a new credentials object * AWS.config.credentials = new AWS.WebIdentityCredentials({ * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity', * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service * RoleSessionName: 'web' // optional name, defaults to web-identity * }, { * // optionally provide configuration to apply to the underlying AWS.STS service client * // if configuration is not provided, then configuration will be pulled from AWS.config * * // specify timeout options * httpOptions: { * timeout: 100 * } * }); * @see AWS.STS.assumeRoleWithWebIdentity * @see AWS.Config */ constructor: function WebIdentityCredentials(params, clientConfig) { AWS.Credentials.call(this); this.expired = true; this.params = params; this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity'; this.data = null; this._clientConfig = AWS.util.copy(clientConfig || {}); }, /** * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} * * @callback callback function(err) * Called when the STS service responds (or fails). When * this callback is called with no error, it means that the credentials * information has been loaded into the object (as the `accessKeyId`, * `secretAccessKey`, and `sessionToken` properties). * @param err [Error] if an error occurred, this value will be filled * @see get */ refresh: function refresh(callback) { this.coalesceRefresh(callback || AWS.util.fn.callback); }, /** * @api private */ load: function load(callback) { var self = this; self.createClients(); self.service.assumeRoleWithWebIdentity(function (err, data) { self.data = null; if (!err) { self.data = data; self.service.credentialsFrom(data, self); } callback(err); }); }, /** * @api private */ createClients: function() { if (!this.service) { var stsConfig = AWS.util.merge({}, this._clientConfig); stsConfig.params = this.params; this.service = new STS(stsConfig); } } }); /***/ }), /***/ 45313: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var util = __webpack_require__(77985); var endpointDiscoveryEnabledEnvs = ['AWS_ENABLE_ENDPOINT_DISCOVERY', 'AWS_ENDPOINT_DISCOVERY_ENABLED']; /** * Generate key (except resources and operation part) to index the endpoints in the cache * If input shape has endpointdiscoveryid trait then use * accessKey + operation + resources + region + service as cache key * If input shape doesn't have endpointdiscoveryid trait then use * accessKey + region + service as cache key * @return [map] object with keys to index endpoints. * @api private */ function getCacheKey(request) { var service = request.service; var api = service.api || {}; var operations = api.operations; var identifiers = {}; if (service.config.region) { identifiers.region = service.config.region; } if (api.serviceId) { identifiers.serviceId = api.serviceId; } if (service.config.credentials.accessKeyId) { identifiers.accessKeyId = service.config.credentials.accessKeyId; } return identifiers; } /** * Recursive helper for marshallCustomIdentifiers(). * Looks for required string input members that have 'endpointdiscoveryid' trait. * @api private */ function marshallCustomIdentifiersHelper(result, params, shape) { if (!shape || params === undefined || params === null) return; if (shape.type === 'structure' && shape.required && shape.required.length > 0) { util.arrayEach(shape.required, function(name) { var memberShape = shape.members[name]; if (memberShape.endpointDiscoveryId === true) { var locationName = memberShape.isLocationName ? memberShape.name : name; result[locationName] = String(params[name]); } else { marshallCustomIdentifiersHelper(result, params[name], memberShape); } }); } } /** * Get custom identifiers for cache key. * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait. * @param [object] request object * @param [object] input shape of the given operation's api * @api private */ function marshallCustomIdentifiers(request, shape) { var identifiers = {}; marshallCustomIdentifiersHelper(identifiers, request.params, shape); return identifiers; } /** * Call endpoint discovery operation when it's optional. * When endpoint is available in cache then use the cached endpoints. If endpoints * are unavailable then use regional endpoints and call endpoint discovery operation * asynchronously. This is turned off by default. * @param [object] request object * @api private */ function optionalDiscoverEndpoint(request) { var service = request.service; var api = service.api; var operationModel = api.operations ? api.operations[request.operation] : undefined; var inputShape = operationModel ? operationModel.input : undefined; var identifiers = marshallCustomIdentifiers(request, inputShape); var cacheKey = getCacheKey(request); if (Object.keys(identifiers).length > 0) { cacheKey = util.update(cacheKey, identifiers); if (operationModel) cacheKey.operation = operationModel.name; } var endpoints = AWS.endpointCache.get(cacheKey); if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') { //endpoint operation is being made but response not yet received //or endpoint operation just failed in 1 minute return; } else if (endpoints && endpoints.length > 0) { //found endpoint record from cache request.httpRequest.updateEndpoint(endpoints[0].Address); } else { //endpoint record not in cache or outdated. make discovery operation var endpointRequest = service.makeRequest(api.endpointOperation, { Operation: operationModel.name, Identifiers: identifiers, }); addApiVersionHeader(endpointRequest); endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); endpointRequest.removeListener('retry', AWS.EventListeners.Core.RETRY_CHECK); //put in a placeholder for endpoints already requested, prevent //too much in-flight calls AWS.endpointCache.put(cacheKey, [{ Address: '', CachePeriodInMinutes: 1 }]); endpointRequest.send(function(err, data) { if (data && data.Endpoints) { AWS.endpointCache.put(cacheKey, data.Endpoints); } else if (err) { AWS.endpointCache.put(cacheKey, [{ Address: '', CachePeriodInMinutes: 1 //not to make more endpoint operation in next 1 minute }]); } }); } } var requestQueue = {}; /** * Call endpoint discovery operation when it's required. * When endpoint is available in cache then use cached ones. If endpoints are * unavailable then SDK should call endpoint operation then use returned new * endpoint for the api call. SDK will automatically attempt to do endpoint * discovery. This is turned off by default * @param [object] request object * @api private */ function requiredDiscoverEndpoint(request, done) { var service = request.service; var api = service.api; var operationModel = api.operations ? api.operations[request.operation] : undefined; var inputShape = operationModel ? operationModel.input : undefined; var identifiers = marshallCustomIdentifiers(request, inputShape); var cacheKey = getCacheKey(request); if (Object.keys(identifiers).length > 0) { cacheKey = util.update(cacheKey, identifiers); if (operationModel) cacheKey.operation = operationModel.name; } var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey); var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') { //endpoint operation is being made but response not yet received //push request object to a pending queue if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = []; requestQueue[cacheKeyStr].push({request: request, callback: done}); return; } else if (endpoints && endpoints.length > 0) { request.httpRequest.updateEndpoint(endpoints[0].Address); done(); } else { var endpointRequest = service.makeRequest(api.endpointOperation, { Operation: operationModel.name, Identifiers: identifiers, }); endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); addApiVersionHeader(endpointRequest); //put in a placeholder for endpoints already requested, prevent //too much in-flight calls AWS.endpointCache.put(cacheKeyStr, [{ Address: '', CachePeriodInMinutes: 60 //long-live cache }]); endpointRequest.send(function(err, data) { if (err) { request.response.error = util.error(err, { retryable: false }); AWS.endpointCache.remove(cacheKey); //fail all the pending requests in batch if (requestQueue[cacheKeyStr]) { var pendingRequests = requestQueue[cacheKeyStr]; util.arrayEach(pendingRequests, function(requestContext) { requestContext.request.response.error = util.error(err, { retryable: false }); requestContext.callback(); }); delete requestQueue[cacheKeyStr]; } } else if (data) { AWS.endpointCache.put(cacheKeyStr, data.Endpoints); request.httpRequest.updateEndpoint(data.Endpoints[0].Address); //update the endpoint for all the pending requests in batch if (requestQueue[cacheKeyStr]) { var pendingRequests = requestQueue[cacheKeyStr]; util.arrayEach(pendingRequests, function(requestContext) { requestContext.request.httpRequest.updateEndpoint(data.Endpoints[0].Address); requestContext.callback(); }); delete requestQueue[cacheKeyStr]; } } done(); }); } } /** * add api version header to endpoint operation * @api private */ function addApiVersionHeader(endpointRequest) { var api = endpointRequest.service.api; var apiVersion = api.apiVersion; if (apiVersion && !endpointRequest.httpRequest.headers['x-amz-api-version']) { endpointRequest.httpRequest.headers['x-amz-api-version'] = apiVersion; } } /** * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid * endpoint from cache. * @api private */ function invalidateCachedEndpoints(response) { var error = response.error; var httpResponse = response.httpResponse; if (error && (error.code === 'InvalidEndpointException' || httpResponse.statusCode === 421) ) { var request = response.request; var operations = request.service.api.operations || {}; var inputShape = operations[request.operation] ? operations[request.operation].input : undefined; var identifiers = marshallCustomIdentifiers(request, inputShape); var cacheKey = getCacheKey(request); if (Object.keys(identifiers).length > 0) { cacheKey = util.update(cacheKey, identifiers); if (operations[request.operation]) cacheKey.operation = operations[request.operation].name; } AWS.endpointCache.remove(cacheKey); } } /** * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime. * @param [object] client Service client object. * @api private */ function hasCustomEndpoint(client) { //if set endpoint is set for specific client, enable endpoint discovery will raise an error. if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) { throw util.error(new Error(), { code: 'ConfigurationException', message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.' }); }; var svcConfig = AWS.config[client.serviceIdentifier] || {}; return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint)); } /** * @api private */ function isFalsy(value) { return ['false', '0'].indexOf(value) >= 0; } /** * If endpoint discovery should perform for this request when no operation requires endpoint * discovery for the given service. * SDK performs config resolution in order like below: * 1. If set in client configuration. * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY. * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'. * @param [object] request request object. * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this * function returns undefined * @api private */ function resolveEndpointDiscoveryConfig(request) { var service = request.service || {}; if (service.config.endpointDiscoveryEnabled !== undefined) { return service.config.endpointDiscoveryEnabled; } //shared ini file is only available in Node //not to check env in browser if (util.isBrowser()) return undefined; // If any of recognized endpoint discovery config env is set for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) { var env = endpointDiscoveryEnabledEnvs[i]; if (Object.prototype.hasOwnProperty.call(process.env, env)) { if (process.env[env] === '' || process.env[env] === undefined) { throw util.error(new Error(), { code: 'ConfigurationException', message: 'environmental variable ' + env + ' cannot be set to nothing' }); } return !isFalsy(process.env[env]); } } var configFile = {}; try { configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({ isConfig: true, filename: process.env[AWS.util.sharedConfigFileEnv] }) : {}; } catch (e) {} var sharedFileConfig = configFile[ process.env.AWS_PROFILE || AWS.util.defaultProfile ] || {}; if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) { if (sharedFileConfig.endpoint_discovery_enabled === undefined) { throw util.error(new Error(), { code: 'ConfigurationException', message: 'config file entry \'endpoint_discovery_enabled\' cannot be set to nothing' }); } return !isFalsy(sharedFileConfig.endpoint_discovery_enabled); } return undefined; } /** * attach endpoint discovery logic to request object * @param [object] request * @api private */ function discoverEndpoint(request, done) { var service = request.service || {}; if (hasCustomEndpoint(service) || request.isPresigned()) return done(); var operations = service.api.operations || {}; var operationModel = operations[request.operation]; var isEndpointDiscoveryRequired = operationModel ? operationModel.endpointDiscoveryRequired : 'NULL'; var isEnabled = resolveEndpointDiscoveryConfig(request); var hasRequiredEndpointDiscovery = service.api.hasRequiredEndpointDiscovery; if (isEnabled || hasRequiredEndpointDiscovery) { // Once a customer enables endpoint discovery, the SDK should start appending // the string endpoint-discovery to the user-agent on all requests. request.httpRequest.appendToUserAgent('endpoint-discovery'); } switch (isEndpointDiscoveryRequired) { case 'OPTIONAL': if (isEnabled || hasRequiredEndpointDiscovery) { // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery // by default for all operations of that service, including operations where endpoint discovery is optional. optionalDiscoverEndpoint(request); request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints); } done(); break; case 'REQUIRED': if (isEnabled === false) { // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client, // then the SDK must return a clear and actionable exception. request.response.error = util.error(new Error(), { code: 'ConfigurationException', message: 'Endpoint Discovery is disabled but ' + service.api.className + '.' + request.operation + '() requires it. Please check your configurations.' }); done(); break; } request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints); requiredDiscoverEndpoint(request, done); break; case 'NULL': default: done(); break; } } module.exports = { discoverEndpoint: discoverEndpoint, requiredDiscoverEndpoint: requiredDiscoverEndpoint, optionalDiscoverEndpoint: optionalDiscoverEndpoint, marshallCustomIdentifiers: marshallCustomIdentifiers, getCacheKey: getCacheKey, invalidateCachedEndpoint: invalidateCachedEndpoints, }; /***/ }), /***/ 76663: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var util = AWS.util; var typeOf = __webpack_require__(48084).typeOf; var DynamoDBSet = __webpack_require__(20304); var NumberValue = __webpack_require__(91593); AWS.DynamoDB.Converter = { /** * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type * * @param data [any] The data to convert to a DynamoDB AttributeValue * @param options [map] * @option options convertEmptyValues [Boolean] Whether to automatically * convert empty strings, blobs, * and sets to `null` * @option options wrapNumbers [Boolean] Whether to return numbers as a * NumberValue object instead of * converting them to native JavaScript * numbers. This allows for the safe * round-trip transport of numbers of * arbitrary size. * @return [map] An object in the Amazon DynamoDB AttributeValue format * * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to * convert entire records (rather than individual attributes) */ input: function convertInput(data, options) { options = options || {}; var type = typeOf(data); if (type === 'Object') { return formatMap(data, options); } else if (type === 'Array') { return formatList(data, options); } else if (type === 'Set') { return formatSet(data, options); } else if (type === 'String') { if (data.length === 0 && options.convertEmptyValues) { return convertInput(null); } return { S: data }; } else if (type === 'Number' || type === 'NumberValue') { return { N: data.toString() }; } else if (type === 'Binary') { if (data.length === 0 && options.convertEmptyValues) { return convertInput(null); } return { B: data }; } else if (type === 'Boolean') { return { BOOL: data }; } else if (type === 'null') { return { NULL: true }; } else if (type !== 'undefined' && type !== 'Function') { // this value has a custom constructor return formatMap(data, options); } }, /** * Convert a JavaScript object into a DynamoDB record. * * @param data [any] The data to convert to a DynamoDB record * @param options [map] * @option options convertEmptyValues [Boolean] Whether to automatically * convert empty strings, blobs, * and sets to `null` * @option options wrapNumbers [Boolean] Whether to return numbers as a * NumberValue object instead of * converting them to native JavaScript * numbers. This allows for the safe * round-trip transport of numbers of * arbitrary size. * * @return [map] An object in the DynamoDB record format. * * @example Convert a JavaScript object into a DynamoDB record * var marshalled = AWS.DynamoDB.Converter.marshall({ * string: 'foo', * list: ['fizz', 'buzz', 'pop'], * map: { * nestedMap: { * key: 'value', * } * }, * number: 123, * nullValue: null, * boolValue: true, * stringSet: new DynamoDBSet(['foo', 'bar', 'baz']) * }); */ marshall: function marshallItem(data, options) { return AWS.DynamoDB.Converter.input(data, options).M; }, /** * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type. * * @param data [map] An object in the Amazon DynamoDB AttributeValue format * @param options [map] * @option options convertEmptyValues [Boolean] Whether to automatically * convert empty strings, blobs, * and sets to `null` * @option options wrapNumbers [Boolean] Whether to return numbers as a * NumberValue object instead of * converting them to native JavaScript * numbers. This allows for the safe * round-trip transport of numbers of * arbitrary size. * * @return [Object|Array|String|Number|Boolean|null] * * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to * convert entire records (rather than individual attributes) */ output: function convertOutput(data, options) { options = options || {}; var list, map, i; for (var type in data) { var values = data[type]; if (type === 'M') { map = {}; for (var key in values) { map[key] = convertOutput(values[key], options); } return map; } else if (type === 'L') { list = []; for (i = 0; i < values.length; i++) { list.push(convertOutput(values[i], options)); } return list; } else if (type === 'SS') { list = []; for (i = 0; i < values.length; i++) { list.push(values[i] + ''); } return new DynamoDBSet(list); } else if (type === 'NS') { list = []; for (i = 0; i < values.length; i++) { list.push(convertNumber(values[i], options.wrapNumbers)); } return new DynamoDBSet(list); } else if (type === 'BS') { list = []; for (i = 0; i < values.length; i++) { list.push(AWS.util.buffer.toBuffer(values[i])); } return new DynamoDBSet(list); } else if (type === 'S') { return values + ''; } else if (type === 'N') { return convertNumber(values, options.wrapNumbers); } else if (type === 'B') { return util.buffer.toBuffer(values); } else if (type === 'BOOL') { return (values === 'true' || values === 'TRUE' || values === true); } else if (type === 'NULL') { return null; } } }, /** * Convert a DynamoDB record into a JavaScript object. * * @param data [any] The DynamoDB record * @param options [map] * @option options convertEmptyValues [Boolean] Whether to automatically * convert empty strings, blobs, * and sets to `null` * @option options wrapNumbers [Boolean] Whether to return numbers as a * NumberValue object instead of * converting them to native JavaScript * numbers. This allows for the safe * round-trip transport of numbers of * arbitrary size. * * @return [map] An object whose properties have been converted from * DynamoDB's AttributeValue format into their corresponding native * JavaScript types. * * @example Convert a record received from a DynamoDB stream * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({ * string: {S: 'foo'}, * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]}, * map: { * M: { * nestedMap: { * M: { * key: {S: 'value'} * } * } * } * }, * number: {N: '123'}, * nullValue: {NULL: true}, * boolValue: {BOOL: true} * }); */ unmarshall: function unmarshall(data, options) { return AWS.DynamoDB.Converter.output({M: data}, options); } }; /** * @api private * @param data [Array] * @param options [map] */ function formatList(data, options) { var list = {L: []}; for (var i = 0; i < data.length; i++) { list['L'].push(AWS.DynamoDB.Converter.input(data[i], options)); } return list; } /** * @api private * @param value [String] * @param wrapNumbers [Boolean] */ function convertNumber(value, wrapNumbers) { return wrapNumbers ? new NumberValue(value) : Number(value); } /** * @api private * @param data [map] * @param options [map] */ function formatMap(data, options) { var map = {M: {}}; for (var key in data) { var formatted = AWS.DynamoDB.Converter.input(data[key], options); if (formatted !== void 0) { map['M'][key] = formatted; } } return map; } /** * @api private */ function formatSet(data, options) { options = options || {}; var values = data.values; if (options.convertEmptyValues) { values = filterEmptySetValues(data); if (values.length === 0) { return AWS.DynamoDB.Converter.input(null); } } var map = {}; switch (data.type) { case 'String': map['SS'] = values; break; case 'Binary': map['BS'] = values; break; case 'Number': map['NS'] = values.map(function (value) { return value.toString(); }); } return map; } /** * @api private */ function filterEmptySetValues(set) { var nonEmptyValues = []; var potentiallyEmptyTypes = { String: true, Binary: true, Number: false }; if (potentiallyEmptyTypes[set.type]) { for (var i = 0; i < set.values.length; i++) { if (set.values[i].length === 0) { continue; } nonEmptyValues.push(set.values[i]); } return nonEmptyValues; } return set.values; } /** * @api private */ module.exports = AWS.DynamoDB.Converter; /***/ }), /***/ 90030: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var Translator = __webpack_require__(34222); var DynamoDBSet = __webpack_require__(20304); /** * The document client simplifies working with items in Amazon DynamoDB * by abstracting away the notion of attribute values. This abstraction * annotates native JavaScript types supplied as input parameters, as well * as converts annotated response data to native JavaScript types. * * ## Marshalling Input and Unmarshalling Response Data * * The document client affords developers the use of native JavaScript types * instead of `AttributeValue`s to simplify the JavaScript development * experience with Amazon DynamoDB. JavaScript objects passed in as parameters * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB. * Responses from DynamoDB are unmarshalled into plain JavaScript objects * by the `DocumentClient`. The `DocumentClient`, does not accept * `AttributeValue`s in favor of native JavaScript types. * * | JavaScript Type | DynamoDB AttributeValue | * |:----------------------------------------------------------------------:|-------------------------| * | String | S | * | Number | N | * | Boolean | BOOL | * | null | NULL | * | Array | L | * | Object | M | * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B | * * ## Support for Sets * * The `DocumentClient` offers a convenient way to create sets from * JavaScript Arrays. The type of set is inferred from the first element * in the array. DynamoDB supports string, number, and binary sets. To * learn more about supported types see the * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) * For more information see {AWS.DynamoDB.DocumentClient.createSet} * */ AWS.DynamoDB.DocumentClient = AWS.util.inherit({ /** * Creates a DynamoDB document client with a set of configuration options. * * @option options params [map] An optional map of parameters to bind to every * request sent by this service object. * @option options service [AWS.DynamoDB] An optional pre-configured instance * of the AWS.DynamoDB service object to use for requests. The object may * bound parameters used by the document client. * @option options convertEmptyValues [Boolean] set to true if you would like * the document client to convert empty values (0-length strings, binary * buffers, and sets) to be converted to NULL types when persisting to * DynamoDB. * @option options wrapNumbers [Boolean] Set to true to return numbers as a * NumberValue object instead of converting them to native JavaScript numbers. * This allows for the safe round-trip transport of numbers of arbitrary size. * @see AWS.DynamoDB.constructor * */ constructor: function DocumentClient(options) { var self = this; self.options = options || {}; self.configure(self.options); }, /** * @api private */ configure: function configure(options) { var self = this; self.service = options.service; self.bindServiceObject(options); self.attrValue = options.attrValue = self.service.api.operations.putItem.input.members.Item.value.shape; }, /** * @api private */ bindServiceObject: function bindServiceObject(options) { var self = this; options = options || {}; if (!self.service) { self.service = new AWS.DynamoDB(options); } else { var config = AWS.util.copy(self.service.config); self.service = new self.service.constructor.__super__(config); self.service.config.params = AWS.util.merge(self.service.config.params || {}, options.params); } }, /** * @api private */ makeServiceRequest: function(operation, params, callback) { var self = this; var request = self.service[operation](params); self.setupRequest(request); self.setupResponse(request); if (typeof callback === 'function') { request.send(callback); } return request; }, /** * @api private */ serviceClientOperationsMap: { batchGet: 'batchGetItem', batchWrite: 'batchWriteItem', delete: 'deleteItem', get: 'getItem', put: 'putItem', query: 'query', scan: 'scan', update: 'updateItem', transactGet: 'transactGetItems', transactWrite: 'transactWriteItems' }, /** * Returns the attributes of one or more items from one or more tables * by delegating to `AWS.DynamoDB.batchGetItem()`. * * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.batchGetItem * @example Get items from multiple tables * var params = { * RequestItems: { * 'Table-1': { * Keys: [ * { * HashKey: 'haskey', * NumberRangeKey: 1 * } * ] * }, * 'Table-2': { * Keys: [ * { foo: 'bar' }, * ] * } * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.batchGet(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ batchGet: function(params, callback) { var operation = this.serviceClientOperationsMap['batchGet']; return this.makeServiceRequest(operation, params, callback); }, /** * Puts or deletes multiple items in one or more tables by delegating * to `AWS.DynamoDB.batchWriteItem()`. * * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.batchWriteItem * @example Write to and delete from a table * var params = { * RequestItems: { * 'Table-1': [ * { * DeleteRequest: { * Key: { HashKey: 'someKey' } * } * }, * { * PutRequest: { * Item: { * HashKey: 'anotherKey', * NumAttribute: 1, * BoolAttribute: true, * ListAttribute: [1, 'two', false], * MapAttribute: { foo: 'bar' } * } * } * } * ] * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.batchWrite(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ batchWrite: function(params, callback) { var operation = this.serviceClientOperationsMap['batchWrite']; return this.makeServiceRequest(operation, params, callback); }, /** * Deletes a single item in a table by primary key by delegating to * `AWS.DynamoDB.deleteItem()` * * Supply the same parameters as {AWS.DynamoDB.deleteItem} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.deleteItem * @example Delete an item from a table * var params = { * TableName : 'Table', * Key: { * HashKey: 'hashkey', * NumberRangeKey: 1 * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.delete(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ delete: function(params, callback) { var operation = this.serviceClientOperationsMap['delete']; return this.makeServiceRequest(operation, params, callback); }, /** * Returns a set of attributes for the item with the given primary key * by delegating to `AWS.DynamoDB.getItem()`. * * Supply the same parameters as {AWS.DynamoDB.getItem} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.getItem * @example Get an item from a table * var params = { * TableName : 'Table', * Key: { * HashKey: 'hashkey' * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.get(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ get: function(params, callback) { var operation = this.serviceClientOperationsMap['get']; return this.makeServiceRequest(operation, params, callback); }, /** * Creates a new item, or replaces an old item with a new item by * delegating to `AWS.DynamoDB.putItem()`. * * Supply the same parameters as {AWS.DynamoDB.putItem} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.putItem * @example Create a new item in a table * var params = { * TableName : 'Table', * Item: { * HashKey: 'haskey', * NumAttribute: 1, * BoolAttribute: true, * ListAttribute: [1, 'two', false], * MapAttribute: { foo: 'bar'}, * NullAttribute: null * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.put(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ put: function(params, callback) { var operation = this.serviceClientOperationsMap['put']; return this.makeServiceRequest(operation, params, callback); }, /** * Edits an existing item's attributes, or adds a new item to the table if * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`. * * Supply the same parameters as {AWS.DynamoDB.updateItem} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.updateItem * @example Update an item with expressions * var params = { * TableName: 'Table', * Key: { HashKey : 'hashkey' }, * UpdateExpression: 'set #a = :x + :y', * ConditionExpression: '#a < :MAX', * ExpressionAttributeNames: {'#a' : 'Sum'}, * ExpressionAttributeValues: { * ':x' : 20, * ':y' : 45, * ':MAX' : 100, * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.update(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ update: function(params, callback) { var operation = this.serviceClientOperationsMap['update']; return this.makeServiceRequest(operation, params, callback); }, /** * Returns one or more items and item attributes by accessing every item * in a table or a secondary index. * * Supply the same parameters as {AWS.DynamoDB.scan} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.scan * @example Scan the table with a filter expression * var params = { * TableName : 'Table', * FilterExpression : 'Year = :this_year', * ExpressionAttributeValues : {':this_year' : 2015} * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.scan(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ scan: function(params, callback) { var operation = this.serviceClientOperationsMap['scan']; return this.makeServiceRequest(operation, params, callback); }, /** * Directly access items from a table by primary key or a secondary index. * * Supply the same parameters as {AWS.DynamoDB.query} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.query * @example Query an index * var params = { * TableName: 'Table', * IndexName: 'Index', * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey', * ExpressionAttributeValues: { * ':hkey': 'key', * ':rkey': 2015 * } * }; * * var documentClient = new AWS.DynamoDB.DocumentClient(); * * documentClient.query(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ query: function(params, callback) { var operation = this.serviceClientOperationsMap['query']; return this.makeServiceRequest(operation, params, callback); }, /** * Synchronous write operation that groups up to 10 action requests * * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.transactWriteItems * @example Get items from multiple tables * var params = { * TransactItems: [{ * Put: { * TableName : 'Table0', * Item: { * HashKey: 'haskey', * NumAttribute: 1, * BoolAttribute: true, * ListAttribute: [1, 'two', false], * MapAttribute: { foo: 'bar'}, * NullAttribute: null * } * } * }, { * Update: { * TableName: 'Table1', * Key: { HashKey : 'hashkey' }, * UpdateExpression: 'set #a = :x + :y', * ConditionExpression: '#a < :MAX', * ExpressionAttributeNames: {'#a' : 'Sum'}, * ExpressionAttributeValues: { * ':x' : 20, * ':y' : 45, * ':MAX' : 100, * } * } * }] * }; * * documentClient.transactWrite(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); */ transactWrite: function(params, callback) { var operation = this.serviceClientOperationsMap['transactWrite']; return this.makeServiceRequest(operation, params, callback); }, /** * Atomically retrieves multiple items from one or more tables (but not from indexes) * in a single account and region. * * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with * `AttributeValue`s substituted by native JavaScript types. * * @see AWS.DynamoDB.transactGetItems * @example Get items from multiple tables * var params = { * TransactItems: [{ * Get: { * TableName : 'Table0', * Key: { * HashKey: 'hashkey0' * } * } * }, { * Get: { * TableName : 'Table1', * Key: { * HashKey: 'hashkey1' * } * } * }] * }; * * documentClient.transactGet(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); */ transactGet: function(params, callback) { var operation = this.serviceClientOperationsMap['transactGet']; return this.makeServiceRequest(operation, params, callback); }, /** * Creates a set of elements inferring the type of set from * the type of the first element. Amazon DynamoDB currently supports * the number sets, string sets, and binary sets. For more information * about DynamoDB data types see the documentation on the * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes). * * @param list [Array] Collection to represent your DynamoDB Set * @param options [map] * * **validate** [Boolean] set to true if you want to validate the type * of each element in the set. Defaults to `false`. * @example Creating a number set * var documentClient = new AWS.DynamoDB.DocumentClient(); * * var params = { * Item: { * hashkey: 'hashkey' * numbers: documentClient.createSet([1, 2, 3]); * } * }; * * documentClient.put(params, function(err, data) { * if (err) console.log(err); * else console.log(data); * }); * */ createSet: function(list, options) { options = options || {}; return new DynamoDBSet(list, options); }, /** * @api private */ getTranslator: function() { return new Translator(this.options); }, /** * @api private */ setupRequest: function setupRequest(request) { var self = this; var translator = self.getTranslator(); var operation = request.operation; var inputShape = request.service.api.operations[operation].input; request._events.validate.unshift(function(req) { req.rawParams = AWS.util.copy(req.params); req.params = translator.translateInput(req.rawParams, inputShape); }); }, /** * @api private */ setupResponse: function setupResponse(request) { var self = this; var translator = self.getTranslator(); var outputShape = self.service.api.operations[request.operation].output; request.on('extractData', function(response) { response.data = translator.translateOutput(response.data, outputShape); }); var response = request.response; response.nextPage = function(cb) { var resp = this; var req = resp.request; var config; var service = req.service; var operation = req.operation; try { config = service.paginationConfig(operation, true); } catch (e) { resp.error = e; } if (!resp.hasNextPage()) { if (cb) cb(resp.error, null); else if (resp.error) throw resp.error; return null; } var params = AWS.util.copy(req.rawParams); if (!resp.nextPageTokens) { return cb ? cb(null, null) : null; } else { var inputTokens = config.inputToken; if (typeof inputTokens === 'string') inputTokens = [inputTokens]; for (var i = 0; i < inputTokens.length; i++) { params[inputTokens[i]] = resp.nextPageTokens[i]; } return self[operation](params, cb); } }; } }); /** * @api private */ module.exports = AWS.DynamoDB.DocumentClient; /***/ }), /***/ 91593: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; /** * An object recognizable as a numeric value that stores the underlying number * as a string. * * Intended to be a deserialization target for the DynamoDB Document Client when * the `wrapNumbers` flag is set. This allows for numeric values that lose * precision when converted to JavaScript's `number` type. */ var DynamoDBNumberValue = util.inherit({ constructor: function NumberValue(value) { this.wrapperName = 'NumberValue'; this.value = value.toString(); }, /** * Render the underlying value as a number when converting to JSON. */ toJSON: function () { return this.toNumber(); }, /** * Convert the underlying value to a JavaScript number. */ toNumber: function () { return Number(this.value); }, /** * Return a string representing the unaltered value provided to the * constructor. */ toString: function () { return this.value; } }); /** * @api private */ module.exports = DynamoDBNumberValue; /***/ }), /***/ 20304: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; var typeOf = __webpack_require__(48084).typeOf; /** * @api private */ var memberTypeToSetType = { 'String': 'String', 'Number': 'Number', 'NumberValue': 'Number', 'Binary': 'Binary' }; /** * @api private */ var DynamoDBSet = util.inherit({ constructor: function Set(list, options) { options = options || {}; this.wrapperName = 'Set'; this.initialize(list, options.validate); }, initialize: function(list, validate) { var self = this; self.values = [].concat(list); self.detectType(); if (validate) { self.validate(); } }, detectType: function() { this.type = memberTypeToSetType[typeOf(this.values[0])]; if (!this.type) { throw util.error(new Error(), { code: 'InvalidSetType', message: 'Sets can contain string, number, or binary values' }); } }, validate: function() { var self = this; var length = self.values.length; var values = self.values; for (var i = 0; i < length; i++) { if (memberTypeToSetType[typeOf(values[i])] !== self.type) { throw util.error(new Error(), { code: 'InvalidType', message: self.type + ' Set contains ' + typeOf(values[i]) + ' value' }); } } }, /** * Render the underlying values only when converting to JSON. */ toJSON: function() { var self = this; return self.values; } }); /** * @api private */ module.exports = DynamoDBSet; /***/ }), /***/ 34222: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; var convert = __webpack_require__(76663); var Translator = function(options) { options = options || {}; this.attrValue = options.attrValue; this.convertEmptyValues = Boolean(options.convertEmptyValues); this.wrapNumbers = Boolean(options.wrapNumbers); }; Translator.prototype.translateInput = function(value, shape) { this.mode = 'input'; return this.translate(value, shape); }; Translator.prototype.translateOutput = function(value, shape) { this.mode = 'output'; return this.translate(value, shape); }; Translator.prototype.translate = function(value, shape) { var self = this; if (!shape || value === undefined) return undefined; if (shape.shape === self.attrValue) { return convert[self.mode](value, { convertEmptyValues: self.convertEmptyValues, wrapNumbers: self.wrapNumbers, }); } switch (shape.type) { case 'structure': return self.translateStructure(value, shape); case 'map': return self.translateMap(value, shape); case 'list': return self.translateList(value, shape); default: return self.translateScalar(value, shape); } }; Translator.prototype.translateStructure = function(structure, shape) { var self = this; if (structure == null) return undefined; var struct = {}; util.each(structure, function(name, value) { var memberShape = shape.members[name]; if (memberShape) { var result = self.translate(value, memberShape); if (result !== undefined) struct[name] = result; } }); return struct; }; Translator.prototype.translateList = function(list, shape) { var self = this; if (list == null) return undefined; var out = []; util.arrayEach(list, function(value) { var result = self.translate(value, shape.member); if (result === undefined) out.push(null); else out.push(result); }); return out; }; Translator.prototype.translateMap = function(map, shape) { var self = this; if (map == null) return undefined; var out = {}; util.each(map, function(key, value) { var result = self.translate(value, shape.value); if (result === undefined) out[key] = null; else out[key] = result; }); return out; }; Translator.prototype.translateScalar = function(value, shape) { return shape.toType(value); }; /** * @api private */ module.exports = Translator; /***/ }), /***/ 48084: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; function typeOf(data) { if (data === null && typeof data === 'object') { return 'null'; } else if (data !== undefined && isBinary(data)) { return 'Binary'; } else if (data !== undefined && data.constructor) { return data.wrapperName || util.typeName(data.constructor); } else if (data !== undefined && typeof data === 'object') { // this object is the result of Object.create(null), hence the absence of a // defined constructor return 'Object'; } else { return 'undefined'; } } function isBinary(data) { var types = [ 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView', 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array' ]; if (util.isNode()) { var Stream = util.stream.Stream; if (util.Buffer.isBuffer(data) || data instanceof Stream) { return true; } } for (var i = 0; i < types.length; i++) { if (data !== undefined && data.constructor) { if (util.isType(data, types[i])) return true; if (util.typeName(data.constructor) === types[i]) return true; } } return false; } /** * @api private */ module.exports = { typeOf: typeOf, isBinary: isBinary }; /***/ }), /***/ 63727: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var eventMessageChunker = __webpack_require__(73630).eventMessageChunker; var parseEvent = __webpack_require__(52123).parseEvent; function createEventStream(body, parser, model) { var eventMessages = eventMessageChunker(body); var events = []; for (var i = 0; i < eventMessages.length; i++) { events.push(parseEvent(parser, eventMessages[i], model)); } return events; } /** * @api private */ module.exports = { createEventStream: createEventStream }; /***/ }), /***/ 18518: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; var Transform = __webpack_require__(92413).Transform; var allocBuffer = util.buffer.alloc; /** @type {Transform} */ function EventMessageChunkerStream(options) { Transform.call(this, options); this.currentMessageTotalLength = 0; this.currentMessagePendingLength = 0; /** @type {Buffer} */ this.currentMessage = null; /** @type {Buffer} */ this.messageLengthBuffer = null; } EventMessageChunkerStream.prototype = Object.create(Transform.prototype); /** * * @param {Buffer} chunk * @param {string} encoding * @param {*} callback */ EventMessageChunkerStream.prototype._transform = function(chunk, encoding, callback) { var chunkLength = chunk.length; var currentOffset = 0; while (currentOffset < chunkLength) { // create new message if necessary if (!this.currentMessage) { // working on a new message, determine total length var bytesRemaining = chunkLength - currentOffset; // prevent edge case where total length spans 2 chunks if (!this.messageLengthBuffer) { this.messageLengthBuffer = allocBuffer(4); } var numBytesForTotal = Math.min( 4 - this.currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer bytesRemaining // bytes left in chunk ); chunk.copy( this.messageLengthBuffer, this.currentMessagePendingLength, currentOffset, currentOffset + numBytesForTotal ); this.currentMessagePendingLength += numBytesForTotal; currentOffset += numBytesForTotal; if (this.currentMessagePendingLength < 4) { // not enough information to create the current message break; } this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0)); this.messageLengthBuffer = null; } // write data into current message var numBytesToWrite = Math.min( this.currentMessageTotalLength - this.currentMessagePendingLength, // number of bytes left to complete message chunkLength - currentOffset // number of bytes left in the original chunk ); chunk.copy( this.currentMessage, // target buffer this.currentMessagePendingLength, // target offset currentOffset, // chunk offset currentOffset + numBytesToWrite // chunk end to write ); this.currentMessagePendingLength += numBytesToWrite; currentOffset += numBytesToWrite; // check if a message is ready to be pushed if (this.currentMessageTotalLength && this.currentMessageTotalLength === this.currentMessagePendingLength) { // push out the message this.push(this.currentMessage); // cleanup this.currentMessage = null; this.currentMessageTotalLength = 0; this.currentMessagePendingLength = 0; } } callback(); }; EventMessageChunkerStream.prototype._flush = function(callback) { if (this.currentMessageTotalLength) { if (this.currentMessageTotalLength === this.currentMessagePendingLength) { callback(null, this.currentMessage); } else { callback(new Error('Truncated event message received.')); } } else { callback(); } }; /** * @param {number} size Size of the message to be allocated. * @api private */ EventMessageChunkerStream.prototype.allocateMessage = function(size) { if (typeof size !== 'number') { throw new Error('Attempted to allocate an event message where size was not a number: ' + size); } this.currentMessageTotalLength = size; this.currentMessagePendingLength = 4; this.currentMessage = allocBuffer(size); this.currentMessage.writeUInt32BE(size, 0); }; /** * @api private */ module.exports = { EventMessageChunkerStream: EventMessageChunkerStream }; /***/ }), /***/ 73630: /***/ ((module) => { /** * Takes in a buffer of event messages and splits them into individual messages. * @param {Buffer} buffer * @api private */ function eventMessageChunker(buffer) { /** @type Buffer[] */ var messages = []; var offset = 0; while (offset < buffer.length) { var totalLength = buffer.readInt32BE(offset); // create new buffer for individual message (shares memory with original) var message = buffer.slice(offset, totalLength + offset); // increment offset to it starts at the next message offset += totalLength; messages.push(message); } return messages; } /** * @api private */ module.exports = { eventMessageChunker: eventMessageChunker }; /***/ }), /***/ 93773: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Transform = __webpack_require__(92413).Transform; var parseEvent = __webpack_require__(52123).parseEvent; /** @type {Transform} */ function EventUnmarshallerStream(options) { options = options || {}; // set output to object mode options.readableObjectMode = true; Transform.call(this, options); this._readableState.objectMode = true; this.parser = options.parser; this.eventStreamModel = options.eventStreamModel; } EventUnmarshallerStream.prototype = Object.create(Transform.prototype); /** * * @param {Buffer} chunk * @param {string} encoding * @param {*} callback */ EventUnmarshallerStream.prototype._transform = function(chunk, encoding, callback) { try { var event = parseEvent(this.parser, chunk, this.eventStreamModel); this.push(event); return callback(); } catch (err) { callback(err); } }; /** * @api private */ module.exports = { EventUnmarshallerStream: EventUnmarshallerStream }; /***/ }), /***/ 48583: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; var toBuffer = util.buffer.toBuffer; /** * A lossless representation of a signed, 64-bit integer. Instances of this * class may be used in arithmetic expressions as if they were numeric * primitives, but the binary representation will be preserved unchanged as the * `bytes` property of the object. The bytes should be encoded as big-endian, * two's complement integers. * @param {Buffer} bytes * * @api private */ function Int64(bytes) { if (bytes.length !== 8) { throw new Error('Int64 buffers must be exactly 8 bytes'); } if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes); this.bytes = bytes; } /** * @param {number} number * @returns {Int64} * * @api private */ Int64.fromNumber = function(number) { if (number > 9223372036854775807 || number < -9223372036854775808) { throw new Error( number + ' is too large (or, if negative, too small) to represent as an Int64' ); } var bytes = new Uint8Array(8); for ( var i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256 ) { bytes[i] = remaining; } if (number < 0) { negate(bytes); } return new Int64(bytes); }; /** * @returns {number} * * @api private */ Int64.prototype.valueOf = function() { var bytes = this.bytes.slice(0); var negative = bytes[0] & 128; if (negative) { negate(bytes); } return parseInt(bytes.toString('hex'), 16) * (negative ? -1 : 1); }; Int64.prototype.toString = function() { return String(this.valueOf()); }; /** * @param {Buffer} bytes * * @api private */ function negate(bytes) { for (var i = 0; i < 8; i++) { bytes[i] ^= 0xFF; } for (var i = 7; i > -1; i--) { bytes[i]++; if (bytes[i] !== 0) { break; } } } /** * @api private */ module.exports = { Int64: Int64 }; /***/ }), /***/ 52123: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var parseMessage = __webpack_require__(30866).parseMessage; /** * * @param {*} parser * @param {Buffer} message * @param {*} shape * @api private */ function parseEvent(parser, message, shape) { var parsedMessage = parseMessage(message); // check if message is an event or error var messageType = parsedMessage.headers[':message-type']; if (messageType) { if (messageType.value === 'error') { throw parseError(parsedMessage); } else if (messageType.value !== 'event') { // not sure how to parse non-events/non-errors, ignore for now return; } } // determine event type var eventType = parsedMessage.headers[':event-type']; // check that the event type is modeled var eventModel = shape.members[eventType.value]; if (!eventModel) { return; } var result = {}; // check if an event payload exists var eventPayloadMemberName = eventModel.eventPayloadMemberName; if (eventPayloadMemberName) { var payloadShape = eventModel.members[eventPayloadMemberName]; // if the shape is binary, return the byte array if (payloadShape.type === 'binary') { result[eventPayloadMemberName] = parsedMessage.body; } else { result[eventPayloadMemberName] = parser.parse(parsedMessage.body.toString(), payloadShape); } } // read event headers var eventHeaderNames = eventModel.eventHeaderMemberNames; for (var i = 0; i < eventHeaderNames.length; i++) { var name = eventHeaderNames[i]; if (parsedMessage.headers[name]) { // parse the header! result[name] = eventModel.members[name].toType(parsedMessage.headers[name].value); } } var output = {}; output[eventType.value] = result; return output; } function parseError(message) { var errorCode = message.headers[':error-code']; var errorMessage = message.headers[':error-message']; var error = new Error(errorMessage.value || errorMessage); error.code = error.name = errorCode.value || errorCode; return error; } /** * @api private */ module.exports = { parseEvent: parseEvent }; /***/ }), /***/ 30866: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Int64 = __webpack_require__(48583).Int64; var splitMessage = __webpack_require__(71765).splitMessage; var BOOLEAN_TAG = 'boolean'; var BYTE_TAG = 'byte'; var SHORT_TAG = 'short'; var INT_TAG = 'integer'; var LONG_TAG = 'long'; var BINARY_TAG = 'binary'; var STRING_TAG = 'string'; var TIMESTAMP_TAG = 'timestamp'; var UUID_TAG = 'uuid'; /** * @api private * * @param {Buffer} headers */ function parseHeaders(headers) { var out = {}; var position = 0; while (position < headers.length) { var nameLength = headers.readUInt8(position++); var name = headers.slice(position, position + nameLength).toString(); position += nameLength; switch (headers.readUInt8(position++)) { case 0 /* boolTrue */: out[name] = { type: BOOLEAN_TAG, value: true }; break; case 1 /* boolFalse */: out[name] = { type: BOOLEAN_TAG, value: false }; break; case 2 /* byte */: out[name] = { type: BYTE_TAG, value: headers.readInt8(position++) }; break; case 3 /* short */: out[name] = { type: SHORT_TAG, value: headers.readInt16BE(position) }; position += 2; break; case 4 /* integer */: out[name] = { type: INT_TAG, value: headers.readInt32BE(position) }; position += 4; break; case 5 /* long */: out[name] = { type: LONG_TAG, value: new Int64(headers.slice(position, position + 8)) }; position += 8; break; case 6 /* byteArray */: var binaryLength = headers.readUInt16BE(position); position += 2; out[name] = { type: BINARY_TAG, value: headers.slice(position, position + binaryLength) }; position += binaryLength; break; case 7 /* string */: var stringLength = headers.readUInt16BE(position); position += 2; out[name] = { type: STRING_TAG, value: headers.slice( position, position + stringLength ).toString() }; position += stringLength; break; case 8 /* timestamp */: out[name] = { type: TIMESTAMP_TAG, value: new Date( new Int64(headers.slice(position, position + 8)) .valueOf() ) }; position += 8; break; case 9 /* uuid */: var uuidChars = headers.slice(position, position + 16) .toString('hex'); position += 16; out[name] = { type: UUID_TAG, value: uuidChars.substr(0, 8) + '-' + uuidChars.substr(8, 4) + '-' + uuidChars.substr(12, 4) + '-' + uuidChars.substr(16, 4) + '-' + uuidChars.substr(20) }; break; default: throw new Error('Unrecognized header type tag'); } } return out; } function parseMessage(message) { var parsed = splitMessage(message); return { headers: parseHeaders(parsed.headers), body: parsed.body }; } /** * @api private */ module.exports = { parseMessage: parseMessage }; /***/ }), /***/ 71765: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; var toBuffer = util.buffer.toBuffer; // All prelude components are unsigned, 32-bit integers var PRELUDE_MEMBER_LENGTH = 4; // The prelude consists of two components var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; // Checksums are always CRC32 hashes. var CHECKSUM_LENGTH = 4; // Messages must include a full prelude, a prelude checksum, and a message checksum var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; /** * @api private * * @param {Buffer} message */ function splitMessage(message) { if (!util.Buffer.isBuffer(message)) message = toBuffer(message); if (message.length < MINIMUM_MESSAGE_LENGTH) { throw new Error('Provided message too short to accommodate event stream message overhead'); } if (message.length !== message.readUInt32BE(0)) { throw new Error('Reported message length does not match received message length'); } var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH); if ( expectedPreludeChecksum !== util.crypto.crc32( message.slice(0, PRELUDE_LENGTH) ) ) { throw new Error( 'The prelude checksum specified in the message (' + expectedPreludeChecksum + ') does not match the calculated CRC32 checksum.' ); } var expectedMessageChecksum = message.readUInt32BE(message.length - CHECKSUM_LENGTH); if ( expectedMessageChecksum !== util.crypto.crc32( message.slice(0, message.length - CHECKSUM_LENGTH) ) ) { throw new Error( 'The message checksum did not match the expected value of ' + expectedMessageChecksum ); } var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH; var headersEnd = headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH); return { headers: message.slice(headersStart, headersEnd), body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH), }; } /** * @api private */ module.exports = { splitMessage: splitMessage }; /***/ }), /***/ 69643: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * What is necessary to create an event stream in node? * - http response stream * - parser * - event stream model */ var EventMessageChunkerStream = __webpack_require__(18518).EventMessageChunkerStream; var EventUnmarshallerStream = __webpack_require__(93773).EventUnmarshallerStream; function createEventStream(stream, parser, model) { var eventStream = new EventUnmarshallerStream({ parser: parser, eventStreamModel: model }); var eventMessageChunker = new EventMessageChunkerStream(); stream.pipe( eventMessageChunker ).pipe(eventStream); stream.on('error', function(err) { eventMessageChunker.emit('error', err); }); eventMessageChunker.on('error', function(err) { eventStream.emit('error', err); }); return eventStream; } /** * @api private */ module.exports = { createEventStream: createEventStream }; /***/ }), /***/ 54995: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var SequentialExecutor = __webpack_require__(55948); var DISCOVER_ENDPOINT = __webpack_require__(45313).discoverEndpoint; /** * The namespace used to register global event listeners for request building * and sending. */ AWS.EventListeners = { /** * @!attribute VALIDATE_CREDENTIALS * A request listener that validates whether the request is being * sent with credentials. * Handles the {AWS.Request~validate 'validate' Request event} * @example Sending a request without validating credentials * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS; * request.removeListener('validate', listener); * @readonly * @return [Function] * @!attribute VALIDATE_REGION * A request listener that validates whether the region is set * for a request. * Handles the {AWS.Request~validate 'validate' Request event} * @example Sending a request without validating region configuration * var listener = AWS.EventListeners.Core.VALIDATE_REGION; * request.removeListener('validate', listener); * @readonly * @return [Function] * @!attribute VALIDATE_PARAMETERS * A request listener that validates input parameters in a request. * Handles the {AWS.Request~validate 'validate' Request event} * @example Sending a request without validating parameters * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS; * request.removeListener('validate', listener); * @example Disable parameter validation globally * AWS.EventListeners.Core.removeListener('validate', * AWS.EventListeners.Core.VALIDATE_REGION); * @readonly * @return [Function] * @!attribute SEND * A request listener that initiates the HTTP connection for a * request being sent. Handles the {AWS.Request~send 'send' Request event} * @example Replacing the HTTP handler * var listener = AWS.EventListeners.Core.SEND; * request.removeListener('send', listener); * request.on('send', function(response) { * customHandler.send(response); * }); * @return [Function] * @readonly * @!attribute HTTP_DATA * A request listener that reads data from the HTTP connection in order * to build the response data. * Handles the {AWS.Request~httpData 'httpData' Request event}. * Remove this handler if you are overriding the 'httpData' event and * do not want extra data processing and buffering overhead. * @example Disabling default data processing * var listener = AWS.EventListeners.Core.HTTP_DATA; * request.removeListener('httpData', listener); * @return [Function] * @readonly */ Core: {} /* doc hack */ }; /** * @api private */ function getOperationAuthtype(req) { if (!req.service.api.operations) { return ''; } var operation = req.service.api.operations[req.operation]; return operation ? operation.authtype : ''; } AWS.EventListeners = { Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) { addAsync('VALIDATE_CREDENTIALS', 'validate', function VALIDATE_CREDENTIALS(req, done) { if (!req.service.api.signatureVersion && !req.service.config.signatureVersion) return done(); // none req.service.config.getCredentials(function(err) { if (err) { req.response.error = AWS.util.error(err, {code: 'CredentialsError', message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1'}); } done(); }); }); add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) { if (!req.service.isGlobalEndpoint) { var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); if (!req.service.config.region) { req.response.error = AWS.util.error(new Error(), {code: 'ConfigError', message: 'Missing region in config'}); } else if (!dnsHostRegex.test(req.service.config.region)) { req.response.error = AWS.util.error(new Error(), {code: 'ConfigError', message: 'Invalid region in config'}); } } }); add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) { if (!req.service.api.operations) { return; } var operation = req.service.api.operations[req.operation]; if (!operation) { return; } var idempotentMembers = operation.idempotentMembers; if (!idempotentMembers.length) { return; } // creates a copy of params so user's param object isn't mutated var params = AWS.util.copy(req.params); for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) { if (!params[idempotentMembers[i]]) { // add the member params[idempotentMembers[i]] = AWS.util.uuid.v4(); } } req.params = params; }); add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) { if (!req.service.api.operations) { return; } var rules = req.service.api.operations[req.operation].input; var validation = req.service.config.paramValidation; new AWS.ParamValidator(validation).validate(rules, req.params); }); addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) { req.haltHandlersOnError(); if (!req.service.api.operations) { return; } var operation = req.service.api.operations[req.operation]; var authtype = operation ? operation.authtype : ''; if (!req.service.api.signatureVersion && !authtype && !req.service.config.signatureVersion) return done(); // none if (req.service.getSignerClass(req) === AWS.Signers.V4) { var body = req.httpRequest.body || ''; if (authtype.indexOf('unsigned-body') >= 0) { req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'; return done(); } AWS.util.computeSha256(body, function(err, sha) { if (err) { done(err); } else { req.httpRequest.headers['X-Amz-Content-Sha256'] = sha; done(); } }); } else { done(); } }); add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) { var authtype = getOperationAuthtype(req); var payloadMember = AWS.util.getRequestPayloadShape(req); if (req.httpRequest.headers['Content-Length'] === undefined) { try { var length = AWS.util.string.byteLength(req.httpRequest.body); req.httpRequest.headers['Content-Length'] = length; } catch (err) { if (payloadMember && payloadMember.isStreaming) { if (payloadMember.requiresLength) { //streaming payload requires length(s3, glacier) throw err; } else if (authtype.indexOf('unsigned-body') >= 0) { //unbounded streaming payload(lex, mediastore) req.httpRequest.headers['Transfer-Encoding'] = 'chunked'; return; } else { throw err; } } throw err; } } }); add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) { req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host; }); add('RESTART', 'restart', function RESTART() { var err = this.response.error; if (!err || !err.retryable) return; this.httpRequest = new AWS.HttpRequest( this.service.endpoint, this.service.region ); if (this.response.retryCount < this.service.config.maxRetries) { this.response.retryCount++; } else { this.response.error = null; } }); var addToHead = true; addAsync('DISCOVER_ENDPOINT', 'sign', DISCOVER_ENDPOINT, addToHead); addAsync('SIGN', 'sign', function SIGN(req, done) { var service = req.service; var operations = req.service.api.operations || {}; var operation = operations[req.operation]; var authtype = operation ? operation.authtype : ''; if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none service.config.getCredentials(function (err, credentials) { if (err) { req.response.error = err; return done(); } try { var date = service.getSkewCorrectedDate(); var SignerClass = service.getSignerClass(req); var signer = new SignerClass(req.httpRequest, service.getSigningName(req), { signatureCache: service.config.signatureCache, operation: operation, signatureVersion: service.api.signatureVersion }); signer.setServiceClientId(service._clientId); // clear old authorization headers delete req.httpRequest.headers['Authorization']; delete req.httpRequest.headers['Date']; delete req.httpRequest.headers['X-Amz-Date']; // add new authorization signer.addAuthorization(credentials, date); req.signedAt = date; } catch (e) { req.response.error = e; } done(); }); }); add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) { if (this.service.successfulResponse(resp, this)) { resp.data = {}; resp.error = null; } else { resp.data = null; resp.error = AWS.util.error(new Error(), {code: 'UnknownError', message: 'An unknown error occurred.'}); } }); addAsync('SEND', 'send', function SEND(resp, done) { resp.httpResponse._abortCallback = done; resp.error = null; resp.data = null; function callback(httpResp) { resp.httpResponse.stream = httpResp; var stream = resp.request.httpRequest.stream; var service = resp.request.service; var api = service.api; var operationName = resp.request.operation; var operation = api.operations[operationName] || {}; httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) { resp.request.emit( 'httpHeaders', [statusCode, headers, resp, statusMessage] ); if (!resp.httpResponse.streaming) { if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check // if we detect event streams, we're going to have to // return the stream immediately if (operation.hasEventOutput && service.successfulResponse(resp)) { // skip reading the IncomingStream resp.request.emit('httpDone'); done(); return; } httpResp.on('readable', function onReadable() { var data = httpResp.read(); if (data !== null) { resp.request.emit('httpData', [data, resp]); } }); } else { // legacy streams API httpResp.on('data', function onData(data) { resp.request.emit('httpData', [data, resp]); }); } } }); httpResp.on('end', function onEnd() { if (!stream || !stream.didCallback) { if (AWS.HttpClient.streamsApiVersion === 2 && (operation.hasEventOutput && service.successfulResponse(resp))) { // don't concatenate response chunks when streaming event stream data when response is successful return; } resp.request.emit('httpDone'); done(); } }); } function progress(httpResp) { httpResp.on('sendProgress', function onSendProgress(value) { resp.request.emit('httpUploadProgress', [value, resp]); }); httpResp.on('receiveProgress', function onReceiveProgress(value) { resp.request.emit('httpDownloadProgress', [value, resp]); }); } function error(err) { if (err.code !== 'RequestAbortedError') { var errCode = err.code === 'TimeoutError' ? err.code : 'NetworkingError'; err = AWS.util.error(err, { code: errCode, region: resp.request.httpRequest.region, hostname: resp.request.httpRequest.endpoint.hostname, retryable: true }); } resp.error = err; resp.request.emit('httpError', [resp.error, resp], function() { done(); }); } function executeSend() { var http = AWS.HttpClient.getInstance(); var httpOptions = resp.request.service.config.httpOptions || {}; try { var stream = http.handleRequest(resp.request.httpRequest, httpOptions, callback, error); progress(stream); } catch (err) { error(err); } } var timeDiff = (resp.request.service.getSkewCorrectedDate() - this.signedAt) / 1000; if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign this.emit('sign', [this], function(err) { if (err) done(err); else executeSend(); }); } else { executeSend(); } }); add('HTTP_HEADERS', 'httpHeaders', function HTTP_HEADERS(statusCode, headers, resp, statusMessage) { resp.httpResponse.statusCode = statusCode; resp.httpResponse.statusMessage = statusMessage; resp.httpResponse.headers = headers; resp.httpResponse.body = AWS.util.buffer.toBuffer(''); resp.httpResponse.buffers = []; resp.httpResponse.numBytes = 0; var dateHeader = headers.date || headers.Date; var service = resp.request.service; if (dateHeader) { var serverTime = Date.parse(dateHeader); if (service.config.correctClockSkew && service.isClockSkewed(serverTime)) { service.applyClockOffset(serverTime); } } }); add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) { if (chunk) { if (AWS.util.isNode()) { resp.httpResponse.numBytes += chunk.length; var total = resp.httpResponse.headers['content-length']; var progress = { loaded: resp.httpResponse.numBytes, total: total }; resp.request.emit('httpDownloadProgress', [progress, resp]); } resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk)); } }); add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) { // convert buffers array into single buffer if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) { var body = AWS.util.buffer.concat(resp.httpResponse.buffers); resp.httpResponse.body = body; } delete resp.httpResponse.numBytes; delete resp.httpResponse.buffers; }); add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) { if (resp.httpResponse.statusCode) { resp.error.statusCode = resp.httpResponse.statusCode; if (resp.error.retryable === undefined) { resp.error.retryable = this.service.retryableError(resp.error, this); } } }); add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) { if (!resp.error) return; switch (resp.error.code) { case 'RequestExpired': // EC2 only case 'ExpiredTokenException': case 'ExpiredToken': resp.error.retryable = true; resp.request.service.config.credentials.expired = true; } }); add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) { var err = resp.error; if (!err) return; if (typeof err.code === 'string' && typeof err.message === 'string') { if (err.code.match(/Signature/) && err.message.match(/expired/)) { resp.error.retryable = true; } } }); add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) { if (!resp.error) return; if (this.service.clockSkewError(resp.error) && this.service.config.correctClockSkew) { resp.error.retryable = true; } }); add('REDIRECT', 'retry', function REDIRECT(resp) { if (resp.error && resp.error.statusCode >= 300 && resp.error.statusCode < 400 && resp.httpResponse.headers['location']) { this.httpRequest.endpoint = new AWS.Endpoint(resp.httpResponse.headers['location']); this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host; resp.error.redirect = true; resp.error.retryable = true; } }); add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) { if (resp.error) { if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { resp.error.retryDelay = 0; } else if (resp.retryCount < resp.maxRetries) { resp.error.retryDelay = this.service.retryDelays(resp.retryCount, resp.error) || 0; } } }); addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) { var delay, willRetry = false; if (resp.error) { delay = resp.error.retryDelay || 0; if (resp.error.retryable && resp.retryCount < resp.maxRetries) { resp.retryCount++; willRetry = true; } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { resp.redirectCount++; willRetry = true; } } // delay < 0 is a signal from customBackoff to skip retries if (willRetry && delay >= 0) { resp.error = null; setTimeout(done, delay); } else { done(); } }); }), CorePost: new SequentialExecutor().addNamedListeners(function(add) { add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId); add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId); add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) { function isDNSError(err) { return err.errno === 'ENOTFOUND' || typeof err.errno === 'number' && typeof AWS.util.getSystemErrorName === 'function' && ['EAI_NONAME', 'EAI_NODATA'].indexOf(AWS.util.getSystemErrorName(err.errno) >= 0); } if (err.code === 'NetworkingError' && isDNSError(err)) { var message = 'Inaccessible host: `' + err.hostname + '\'. This service may not be available in the `' + err.region + '\' region.'; this.response.error = AWS.util.error(new Error(message), { code: 'UnknownEndpoint', region: err.region, hostname: err.hostname, retryable: true, originalError: err }); } }); }), Logger: new SequentialExecutor().addNamedListeners(function(add) { add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) { var req = resp.request; var logger = req.service.config.logger; if (!logger) return; function filterSensitiveLog(inputShape, shape) { if (!shape) { return shape; } if (inputShape.isSensitive) { return '***SensitiveInformation***'; } switch (inputShape.type) { case 'structure': var struct = {}; AWS.util.each(shape, function(subShapeName, subShape) { if (Object.prototype.hasOwnProperty.call(inputShape.members, subShapeName)) { struct[subShapeName] = filterSensitiveLog(inputShape.members[subShapeName], subShape); } else { struct[subShapeName] = subShape; } }); return struct; case 'list': var list = []; AWS.util.arrayEach(shape, function(subShape, index) { list.push(filterSensitiveLog(inputShape.member, subShape)); }); return list; case 'map': var map = {}; AWS.util.each(shape, function(key, value) { map[key] = filterSensitiveLog(inputShape.value, value); }); return map; default: return shape; } } function buildMessage() { var time = resp.request.service.getSkewCorrectedDate().getTime(); var delta = (time - req.startTime.getTime()) / 1000; var ansi = logger.isTTY ? true : false; var status = resp.httpResponse.statusCode; var censoredParams = req.params; if ( req.service.api.operations && req.service.api.operations[req.operation] && req.service.api.operations[req.operation].input ) { var inputShape = req.service.api.operations[req.operation].input; censoredParams = filterSensitiveLog(inputShape, req.params); } var params = __webpack_require__(31669).inspect(censoredParams, true, null); var message = ''; if (ansi) message += '\x1B[33m'; message += '[AWS ' + req.service.serviceIdentifier + ' ' + status; message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]'; if (ansi) message += '\x1B[0;1m'; message += ' ' + AWS.util.string.lowerFirst(req.operation); message += '(' + params + ')'; if (ansi) message += '\x1B[0m'; return message; } var line = buildMessage(); if (typeof logger.log === 'function') { logger.log(line); } else if (typeof logger.write === 'function') { logger.write(line + '\n'); } }); }), Json: new SequentialExecutor().addNamedListeners(function(add) { var svc = __webpack_require__(30083); add('BUILD', 'build', svc.buildRequest); add('EXTRACT_DATA', 'extractData', svc.extractData); add('EXTRACT_ERROR', 'extractError', svc.extractError); }), Rest: new SequentialExecutor().addNamedListeners(function(add) { var svc = __webpack_require__(98200); add('BUILD', 'build', svc.buildRequest); add('EXTRACT_DATA', 'extractData', svc.extractData); add('EXTRACT_ERROR', 'extractError', svc.extractError); }), RestJson: new SequentialExecutor().addNamedListeners(function(add) { var svc = __webpack_require__(5883); add('BUILD', 'build', svc.buildRequest); add('EXTRACT_DATA', 'extractData', svc.extractData); add('EXTRACT_ERROR', 'extractError', svc.extractError); }), RestXml: new SequentialExecutor().addNamedListeners(function(add) { var svc = __webpack_require__(15143); add('BUILD', 'build', svc.buildRequest); add('EXTRACT_DATA', 'extractData', svc.extractData); add('EXTRACT_ERROR', 'extractError', svc.extractError); }), Query: new SequentialExecutor().addNamedListeners(function(add) { var svc = __webpack_require__(90761); add('BUILD', 'build', svc.buildRequest); add('EXTRACT_DATA', 'extractData', svc.extractData); add('EXTRACT_ERROR', 'extractError', svc.extractError); }) }; /***/ }), /***/ 1556: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; /** * The endpoint that a service will talk to, for example, * `'https://ec2.ap-southeast-1.amazonaws.com'`. If * you need to override an endpoint for a service, you can * set the endpoint on a service by passing the endpoint * object with the `endpoint` option key: * * ```javascript * var ep = new AWS.Endpoint('awsproxy.example.com'); * var s3 = new AWS.S3({endpoint: ep}); * s3.service.endpoint.hostname == 'awsproxy.example.com' * ``` * * Note that if you do not specify a protocol, the protocol will * be selected based on your current {AWS.config} configuration. * * @!attribute protocol * @return [String] the protocol (http or https) of the endpoint * URL * @!attribute hostname * @return [String] the host portion of the endpoint, e.g., * example.com * @!attribute host * @return [String] the host portion of the endpoint including * the port, e.g., example.com:80 * @!attribute port * @return [Integer] the port of the endpoint * @!attribute href * @return [String] the full URL of the endpoint */ AWS.Endpoint = inherit({ /** * @overload Endpoint(endpoint) * Constructs a new endpoint given an endpoint URL. If the * URL omits a protocol (http or https), the default protocol * set in the global {AWS.config} will be used. * @param endpoint [String] the URL to construct an endpoint from */ constructor: function Endpoint(endpoint, config) { AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']); if (typeof endpoint === 'undefined' || endpoint === null) { throw new Error('Invalid endpoint: ' + endpoint); } else if (typeof endpoint !== 'string') { return AWS.util.copy(endpoint); } if (!endpoint.match(/^http/)) { var useSSL = config && config.sslEnabled !== undefined ? config.sslEnabled : AWS.config.sslEnabled; endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint; } AWS.util.update(this, AWS.util.urlParse(endpoint)); // Ensure the port property is set as an integer if (this.port) { this.port = parseInt(this.port, 10); } else { this.port = this.protocol === 'https:' ? 443 : 80; } } }); /** * The low level HTTP request object, encapsulating all HTTP header * and body data sent by a service request. * * @!attribute method * @return [String] the HTTP method of the request * @!attribute path * @return [String] the path portion of the URI, e.g., * "/list/?start=5&num=10" * @!attribute headers * @return [map] * a map of header keys and their respective values * @!attribute body * @return [String] the request body payload * @!attribute endpoint * @return [AWS.Endpoint] the endpoint for the request * @!attribute region * @api private * @return [String] the region, for signing purposes only. */ AWS.HttpRequest = inherit({ /** * @api private */ constructor: function HttpRequest(endpoint, region) { endpoint = new AWS.Endpoint(endpoint); this.method = 'POST'; this.path = endpoint.path || '/'; this.headers = {}; this.body = ''; this.endpoint = endpoint; this.region = region; this._userAgent = ''; this.setUserAgent(); }, /** * @api private */ setUserAgent: function setUserAgent() { this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent(); }, getUserAgentHeaderName: function getUserAgentHeaderName() { var prefix = AWS.util.isBrowser() ? 'X-Amz-' : ''; return prefix + 'User-Agent'; }, /** * @api private */ appendToUserAgent: function appendToUserAgent(agentPartial) { if (typeof agentPartial === 'string' && agentPartial) { this._userAgent += ' ' + agentPartial; } this.headers[this.getUserAgentHeaderName()] = this._userAgent; }, /** * @api private */ getUserAgent: function getUserAgent() { return this._userAgent; }, /** * @return [String] the part of the {path} excluding the * query string */ pathname: function pathname() { return this.path.split('?', 1)[0]; }, /** * @return [String] the query string portion of the {path} */ search: function search() { var query = this.path.split('?', 2)[1]; if (query) { query = AWS.util.queryStringParse(query); return AWS.util.queryParamsToString(query); } return ''; }, /** * @api private * update httpRequest endpoint with endpoint string */ updateEndpoint: function updateEndpoint(endpointStr) { var newEndpoint = new AWS.Endpoint(endpointStr); this.endpoint = newEndpoint; this.path = newEndpoint.path || '/'; if (this.headers['Host']) { this.headers['Host'] = newEndpoint.host; } } }); /** * The low level HTTP response object, encapsulating all HTTP header * and body data returned from the request. * * @!attribute statusCode * @return [Integer] the HTTP status code of the response (e.g., 200, 404) * @!attribute headers * @return [map] * a map of response header keys and their respective values * @!attribute body * @return [String] the response body payload * @!attribute [r] streaming * @return [Boolean] whether this response is being streamed at a low-level. * Defaults to `false` (buffered reads). Do not modify this manually, use * {createUnbufferedStream} to convert the stream to unbuffered mode * instead. */ AWS.HttpResponse = inherit({ /** * @api private */ constructor: function HttpResponse() { this.statusCode = undefined; this.headers = {}; this.body = undefined; this.streaming = false; this.stream = null; }, /** * Disables buffering on the HTTP response and returns the stream for reading. * @return [Stream, XMLHttpRequest, null] the underlying stream object. * Use this object to directly read data off of the stream. * @note This object is only available after the {AWS.Request~httpHeaders} * event has fired. This method must be called prior to * {AWS.Request~httpData}. * @example Taking control of a stream * request.on('httpHeaders', function(statusCode, headers) { * if (statusCode < 300) { * if (headers.etag === 'xyz') { * // pipe the stream, disabling buffering * var stream = this.response.httpResponse.createUnbufferedStream(); * stream.pipe(process.stdout); * } else { // abort this request and set a better error message * this.abort(); * this.response.error = new Error('Invalid ETag'); * } * } * }).send(console.log); */ createUnbufferedStream: function createUnbufferedStream() { this.streaming = true; return this.stream; } }); AWS.HttpClient = inherit({}); /** * @api private */ AWS.HttpClient.getInstance = function getInstance() { if (this.singleton === undefined) { this.singleton = new this(); } return this.singleton; }; /***/ }), /***/ 2310: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var Stream = AWS.util.stream.Stream; var TransformStream = AWS.util.stream.Transform; var ReadableStream = AWS.util.stream.Readable; __webpack_require__(1556); var CONNECTION_REUSE_ENV_NAME = 'AWS_NODEJS_CONNECTION_REUSE_ENABLED'; /** * @api private */ AWS.NodeHttpClient = AWS.util.inherit({ handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { var self = this; var endpoint = httpRequest.endpoint; var pathPrefix = ''; if (!httpOptions) httpOptions = {}; if (httpOptions.proxy) { pathPrefix = endpoint.protocol + '//' + endpoint.hostname; if (endpoint.port !== 80 && endpoint.port !== 443) { pathPrefix += ':' + endpoint.port; } endpoint = new AWS.Endpoint(httpOptions.proxy); } var useSSL = endpoint.protocol === 'https:'; var http = useSSL ? __webpack_require__(57211) : __webpack_require__(98605); var options = { host: endpoint.hostname, port: endpoint.port, method: httpRequest.method, headers: httpRequest.headers, path: pathPrefix + httpRequest.path }; if (!httpOptions.agent) { options.agent = this.getAgent(useSSL, { keepAlive: process.env[CONNECTION_REUSE_ENV_NAME] === '1' ? true : false }); } AWS.util.update(options, httpOptions); delete options.proxy; // proxy isn't an HTTP option delete options.timeout; // timeout isn't an HTTP option var stream = http.request(options, function (httpResp) { if (stream.didCallback) return; callback(httpResp); httpResp.emit( 'headers', httpResp.statusCode, httpResp.headers, httpResp.statusMessage ); }); httpRequest.stream = stream; // attach stream to httpRequest stream.didCallback = false; // connection timeout support if (httpOptions.connectTimeout) { var connectTimeoutId; stream.on('socket', function(socket) { if (socket.connecting) { connectTimeoutId = setTimeout(function connectTimeout() { if (stream.didCallback) return; stream.didCallback = true; stream.abort(); errCallback(AWS.util.error( new Error('Socket timed out without establishing a connection'), {code: 'TimeoutError'} )); }, httpOptions.connectTimeout); socket.on('connect', function() { clearTimeout(connectTimeoutId); connectTimeoutId = null; }); } }); } // timeout support stream.setTimeout(httpOptions.timeout || 0, function() { if (stream.didCallback) return; stream.didCallback = true; var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms'; errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'})); stream.abort(); }); stream.on('error', function() { if (connectTimeoutId) { clearTimeout(connectTimeoutId); connectTimeoutId = null; } if (stream.didCallback) return; stream.didCallback = true; errCallback.apply(stream, arguments); }); var expect = httpRequest.headers.Expect || httpRequest.headers.expect; if (expect === '100-continue') { stream.once('continue', function() { self.writeBody(stream, httpRequest); }); } else { this.writeBody(stream, httpRequest); } return stream; }, writeBody: function writeBody(stream, httpRequest) { var body = httpRequest.body; var totalBytes = parseInt(httpRequest.headers['Content-Length'], 10); if (body instanceof Stream) { // For progress support of streaming content - // pipe the data through a transform stream to emit 'sendProgress' events var progressStream = this.progressStream(stream, totalBytes); if (progressStream) { body.pipe(progressStream).pipe(stream); } else { body.pipe(stream); } } else if (body) { // The provided body is a buffer/string and is already fully available in memory - // For performance it's best to send it as a whole by calling stream.end(body), // Callers expect a 'sendProgress' event which is best emitted once // the http request stream has been fully written and all data flushed. // The use of totalBytes is important over body.length for strings where // length is char length and not byte length. stream.once('finish', function() { stream.emit('sendProgress', { loaded: totalBytes, total: totalBytes }); }); stream.end(body); } else { // no request body stream.end(); } }, /** * Create the https.Agent or http.Agent according to the request schema. */ getAgent: function getAgent(useSSL, agentOptions) { var http = useSSL ? __webpack_require__(57211) : __webpack_require__(98605); if (useSSL) { if (!AWS.NodeHttpClient.sslAgent) { AWS.NodeHttpClient.sslAgent = new http.Agent(AWS.util.merge({ rejectUnauthorized: process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0' ? false : true }, agentOptions || {})); AWS.NodeHttpClient.sslAgent.setMaxListeners(0); // delegate maxSockets to globalAgent, set a default limit of 50 if current value is Infinity. // Users can bypass this default by supplying their own Agent as part of SDK configuration. Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', { enumerable: true, get: function() { var defaultMaxSockets = 50; var globalAgent = http.globalAgent; if (globalAgent && globalAgent.maxSockets !== Infinity && typeof globalAgent.maxSockets === 'number') { return globalAgent.maxSockets; } return defaultMaxSockets; } }); } return AWS.NodeHttpClient.sslAgent; } else { if (!AWS.NodeHttpClient.agent) { AWS.NodeHttpClient.agent = new http.Agent(agentOptions); } return AWS.NodeHttpClient.agent; } }, progressStream: function progressStream(stream, totalBytes) { if (typeof TransformStream === 'undefined') { // for node 0.8 there is no streaming progress return; } var loadedBytes = 0; var reporter = new TransformStream(); reporter._transform = function(chunk, encoding, callback) { if (chunk) { loadedBytes += chunk.length; stream.emit('sendProgress', { loaded: loadedBytes, total: totalBytes }); } callback(null, chunk); }; return reporter; }, emitter: null }); /** * @!ignore */ /** * @api private */ AWS.HttpClient.prototype = AWS.NodeHttpClient.prototype; /** * @api private */ AWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1; /***/ }), /***/ 47495: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); function JsonBuilder() { } JsonBuilder.prototype.build = function(value, shape) { return JSON.stringify(translate(value, shape)); }; function translate(value, shape) { if (!shape || value === undefined || value === null) return undefined; switch (shape.type) { case 'structure': return translateStructure(value, shape); case 'map': return translateMap(value, shape); case 'list': return translateList(value, shape); default: return translateScalar(value, shape); } } function translateStructure(structure, shape) { var struct = {}; util.each(structure, function(name, value) { var memberShape = shape.members[name]; if (memberShape) { if (memberShape.location !== 'body') return; var locationName = memberShape.isLocationName ? memberShape.name : name; var result = translate(value, memberShape); if (result !== undefined) struct[locationName] = result; } }); return struct; } function translateList(list, shape) { var out = []; util.arrayEach(list, function(value) { var result = translate(value, shape.member); if (result !== undefined) out.push(result); }); return out; } function translateMap(map, shape) { var out = {}; util.each(map, function(key, value) { var result = translate(value, shape.value); if (result !== undefined) out[key] = result; }); return out; } function translateScalar(value, shape) { return shape.toWireFormat(value); } /** * @api private */ module.exports = JsonBuilder; /***/ }), /***/ 5474: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); function JsonParser() { } JsonParser.prototype.parse = function(value, shape) { return translate(JSON.parse(value), shape); }; function translate(value, shape) { if (!shape || value === undefined) return undefined; switch (shape.type) { case 'structure': return translateStructure(value, shape); case 'map': return translateMap(value, shape); case 'list': return translateList(value, shape); default: return translateScalar(value, shape); } } function translateStructure(structure, shape) { if (structure == null) return undefined; var struct = {}; var shapeMembers = shape.members; util.each(shapeMembers, function(name, memberShape) { var locationName = memberShape.isLocationName ? memberShape.name : name; if (Object.prototype.hasOwnProperty.call(structure, locationName)) { var value = structure[locationName]; var result = translate(value, memberShape); if (result !== undefined) struct[name] = result; } }); return struct; } function translateList(list, shape) { if (list == null) return undefined; var out = []; util.arrayEach(list, function(value) { var result = translate(value, shape.member); if (result === undefined) out.push(null); else out.push(result); }); return out; } function translateMap(map, shape) { if (map == null) return undefined; var out = {}; util.each(map, function(key, value) { var result = translate(value, shape.value); if (result === undefined) out[key] = null; else out[key] = result; }); return out; } function translateScalar(value, shape) { return shape.toType(value); } /** * @api private */ module.exports = JsonParser; /***/ }), /***/ 25768: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); __webpack_require__(1556); var inherit = AWS.util.inherit; /** * Represents a metadata service available on EC2 instances. Using the * {request} method, you can receieve metadata about any available resource * on the metadata service. * * You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED * environment variable to a truthy value. * * @!attribute [r] httpOptions * @return [map] a map of options to pass to the underlying HTTP request: * * * **timeout** (Number) — a timeout value in milliseconds to wait * before aborting the connection. Set to 0 for no timeout. * * @!macro nobrowser */ AWS.MetadataService = inherit({ /** * @return [String] the hostname of the instance metadata service */ host: '169.254.169.254', /** * @!ignore */ /** * Default HTTP options. By default, the metadata service is set to not * timeout on long requests. This means that on non-EC2 machines, this * request will never return. If you are calling this operation from an * environment that may not always run on EC2, set a `timeout` value so * the SDK will abort the request after a given number of milliseconds. */ httpOptions: { timeout: 0 }, /** * when enabled, metadata service will not fetch token */ disableFetchToken: false, /** * Creates a new MetadataService object with a given set of options. * * @option options host [String] the hostname of the instance metadata * service * @option options httpOptions [map] a map of options to pass to the * underlying HTTP request: * * * **timeout** (Number) — a timeout value in milliseconds to wait * before aborting the connection. Set to 0 for no timeout. * @option options maxRetries [Integer] the maximum number of retries to * perform for timeout errors * @option options retryDelayOptions [map] A set of options to configure the * retry delay on retryable errors. See AWS.Config for details. */ constructor: function MetadataService(options) { AWS.util.update(this, options); }, /** * Sends a request to the instance metadata service for a given resource. * * @param path [String] the path of the resource to get * * @param options [map] an optional map used to make request * * * **method** (String) — HTTP request method * * * **headers** (map) — a map of response header keys and their respective values * * @callback callback function(err, data) * Called when a response is available from the service. * @param err [Error, null] if an error occurred, this value will be set * @param data [String, null] if the request was successful, the body of * the response */ request: function request(path, options, callback) { if (arguments.length === 2) { callback = options; options = {}; } if (process.env[AWS.util.imdsDisabledEnv]) { callback(new Error('EC2 Instance Metadata Service access disabled')); return; } path = path || '/'; var httpRequest = new AWS.HttpRequest('http://' + this.host + path); httpRequest.method = options.method || 'GET'; if (options.headers) { httpRequest.headers = options.headers; } AWS.util.handleRequestWithRetries(httpRequest, this, callback); }, /** * @api private */ loadCredentialsCallbacks: [], /** * Fetches metadata token used for getting credentials * * @api private * @callback callback function(err, token) * Called when token is loaded from the resource */ fetchMetadataToken: function fetchMetadataToken(callback) { var self = this; var tokenFetchPath = '/latest/api/token'; self.request( tokenFetchPath, { 'method': 'PUT', 'headers': { 'x-aws-ec2-metadata-token-ttl-seconds': '21600' } }, callback ); }, /** * Fetches credentials * * @api private * @callback cb function(err, creds) * Called when credentials are loaded from the resource */ fetchCredentials: function fetchCredentials(options, cb) { var self = this; var basePath = '/latest/meta-data/iam/security-credentials/'; self.request(basePath, options, function (err, roleName) { if (err) { self.disableFetchToken = !(err.statusCode === 401); cb(AWS.util.error( err, { message: 'EC2 Metadata roleName request returned error' } )); return; } roleName = roleName.split('\n')[0]; // grab first (and only) role self.request(basePath + roleName, options, function (credErr, credData) { if (credErr) { self.disableFetchToken = !(credErr.statusCode === 401); cb(AWS.util.error( credErr, { message: 'EC2 Metadata creds request returned error' } )); return; } try { var credentials = JSON.parse(credData); cb(null, credentials); } catch (parseError) { cb(parseError); } }); }); }, /** * Loads a set of credentials stored in the instance metadata service * * @api private * @callback callback function(err, credentials) * Called when credentials are loaded from the resource * @param err [Error] if an error occurred, this value will be set * @param credentials [Object] the raw JSON object containing all * metadata from the credentials resource */ loadCredentials: function loadCredentials(callback) { var self = this; self.loadCredentialsCallbacks.push(callback); if (self.loadCredentialsCallbacks.length > 1) { return; } function callbacks(err, creds) { var cb; while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) { cb(err, creds); } } if (self.disableFetchToken) { self.fetchCredentials({}, callbacks); } else { self.fetchMetadataToken(function(tokenError, token) { if (tokenError) { if (tokenError.code === 'TimeoutError') { self.disableFetchToken = true; } else if (tokenError.retryable === true) { callbacks(AWS.util.error( tokenError, { message: 'EC2 Metadata token request returned error' } )); return; } else if (tokenError.statusCode === 400) { callbacks(AWS.util.error( tokenError, { message: 'EC2 Metadata token request returned 400' } )); return; } } var options = {}; if (token) { options.headers = { 'x-aws-ec2-metadata-token': token }; } self.fetchCredentials(options, callbacks); }); } } }); /** * @api private */ module.exports = AWS.MetadataService; /***/ }), /***/ 17657: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Collection = __webpack_require__(71965); var Operation = __webpack_require__(28083); var Shape = __webpack_require__(71349); var Paginator = __webpack_require__(45938); var ResourceWaiter = __webpack_require__(41368); var metadata = __webpack_require__(49497); var util = __webpack_require__(77985); var property = util.property; var memoizedProperty = util.memoizedProperty; function Api(api, options) { var self = this; api = api || {}; options = options || {}; options.api = this; api.metadata = api.metadata || {}; var serviceIdentifier = options.serviceIdentifier; delete options.serviceIdentifier; property(this, 'isApi', true, false); property(this, 'apiVersion', api.metadata.apiVersion); property(this, 'endpointPrefix', api.metadata.endpointPrefix); property(this, 'signingName', api.metadata.signingName); property(this, 'globalEndpoint', api.metadata.globalEndpoint); property(this, 'signatureVersion', api.metadata.signatureVersion); property(this, 'jsonVersion', api.metadata.jsonVersion); property(this, 'targetPrefix', api.metadata.targetPrefix); property(this, 'protocol', api.metadata.protocol); property(this, 'timestampFormat', api.metadata.timestampFormat); property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace); property(this, 'abbreviation', api.metadata.serviceAbbreviation); property(this, 'fullName', api.metadata.serviceFullName); property(this, 'serviceId', api.metadata.serviceId); if (serviceIdentifier && metadata[serviceIdentifier]) { property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false); } memoizedProperty(this, 'className', function() { var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName; if (!name) return null; name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, ''); if (name === 'ElasticLoadBalancing') name = 'ELB'; return name; }); function addEndpointOperation(name, operation) { if (operation.endpointoperation === true) { property(self, 'endpointOperation', util.string.lowerFirst(name)); } if (operation.endpointdiscovery && !self.hasRequiredEndpointDiscovery) { property( self, 'hasRequiredEndpointDiscovery', operation.endpointdiscovery.required === true ); } } property(this, 'operations', new Collection(api.operations, options, function(name, operation) { return new Operation(name, operation, options); }, util.string.lowerFirst, addEndpointOperation)); property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) { return Shape.create(shape, options); })); property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) { return new Paginator(name, paginator, options); })); property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) { return new ResourceWaiter(name, waiter, options); }, util.string.lowerFirst)); if (options.documentation) { property(this, 'documentation', api.documentation); property(this, 'documentationUrl', api.documentationUrl); } } /** * @api private */ module.exports = Api; /***/ }), /***/ 71965: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var memoizedProperty = __webpack_require__(77985).memoizedProperty; function memoize(name, value, factory, nameTr) { memoizedProperty(this, nameTr(name), function() { return factory(name, value); }); } function Collection(iterable, options, factory, nameTr, callback) { nameTr = nameTr || String; var self = this; for (var id in iterable) { if (Object.prototype.hasOwnProperty.call(iterable, id)) { memoize.call(self, id, iterable[id], factory, nameTr); if (callback) callback(id, iterable[id]); } } } /** * @api private */ module.exports = Collection; /***/ }), /***/ 28083: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Shape = __webpack_require__(71349); var util = __webpack_require__(77985); var property = util.property; var memoizedProperty = util.memoizedProperty; function Operation(name, operation, options) { var self = this; options = options || {}; property(this, 'name', operation.name || name); property(this, 'api', options.api, false); operation.http = operation.http || {}; property(this, 'endpoint', operation.endpoint); property(this, 'httpMethod', operation.http.method || 'POST'); property(this, 'httpPath', operation.http.requestUri || '/'); property(this, 'authtype', operation.authtype || ''); property( this, 'endpointDiscoveryRequired', operation.endpointdiscovery ? (operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') : 'NULL' ); memoizedProperty(this, 'input', function() { if (!operation.input) { return new Shape.create({type: 'structure'}, options); } return Shape.create(operation.input, options); }); memoizedProperty(this, 'output', function() { if (!operation.output) { return new Shape.create({type: 'structure'}, options); } return Shape.create(operation.output, options); }); memoizedProperty(this, 'errors', function() { var list = []; if (!operation.errors) return null; for (var i = 0; i < operation.errors.length; i++) { list.push(Shape.create(operation.errors[i], options)); } return list; }); memoizedProperty(this, 'paginator', function() { return options.api.paginators[name]; }); if (options.documentation) { property(this, 'documentation', operation.documentation); property(this, 'documentationUrl', operation.documentationUrl); } // idempotentMembers only tracks top-level input shapes memoizedProperty(this, 'idempotentMembers', function() { var idempotentMembers = []; var input = self.input; var members = input.members; if (!input.members) { return idempotentMembers; } for (var name in members) { if (!members.hasOwnProperty(name)) { continue; } if (members[name].isIdempotent === true) { idempotentMembers.push(name); } } return idempotentMembers; }); memoizedProperty(this, 'hasEventOutput', function() { var output = self.output; return hasEventStream(output); }); } function hasEventStream(topLevelShape) { var members = topLevelShape.members; var payload = topLevelShape.payload; if (!topLevelShape.members) { return false; } if (payload) { var payloadMember = members[payload]; return payloadMember.isEventStream; } // check if any member is an event stream for (var name in members) { if (!members.hasOwnProperty(name)) { if (members[name].isEventStream === true) { return true; } } } return false; } /** * @api private */ module.exports = Operation; /***/ }), /***/ 45938: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var property = __webpack_require__(77985).property; function Paginator(name, paginator) { property(this, 'inputToken', paginator.input_token); property(this, 'limitKey', paginator.limit_key); property(this, 'moreResults', paginator.more_results); property(this, 'outputToken', paginator.output_token); property(this, 'resultKey', paginator.result_key); } /** * @api private */ module.exports = Paginator; /***/ }), /***/ 41368: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); var property = util.property; function ResourceWaiter(name, waiter, options) { options = options || {}; property(this, 'name', name); property(this, 'api', options.api, false); if (waiter.operation) { property(this, 'operation', util.string.lowerFirst(waiter.operation)); } var self = this; var keys = [ 'type', 'description', 'delay', 'maxAttempts', 'acceptors' ]; keys.forEach(function(key) { var value = waiter[key]; if (value) { property(self, key, value); } }); } /** * @api private */ module.exports = ResourceWaiter; /***/ }), /***/ 71349: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Collection = __webpack_require__(71965); var util = __webpack_require__(77985); function property(obj, name, value) { if (value !== null && value !== undefined) { util.property.apply(this, arguments); } } function memoizedProperty(obj, name) { if (!obj.constructor.prototype[name]) { util.memoizedProperty.apply(this, arguments); } } function Shape(shape, options, memberName) { options = options || {}; property(this, 'shape', shape.shape); property(this, 'api', options.api, false); property(this, 'type', shape.type); property(this, 'enum', shape.enum); property(this, 'min', shape.min); property(this, 'max', shape.max); property(this, 'pattern', shape.pattern); property(this, 'location', shape.location || this.location || 'body'); property(this, 'name', this.name || shape.xmlName || shape.queryName || shape.locationName || memberName); property(this, 'isStreaming', shape.streaming || this.isStreaming || false); property(this, 'requiresLength', shape.requiresLength, false); property(this, 'isComposite', shape.isComposite || false); property(this, 'isShape', true, false); property(this, 'isQueryName', Boolean(shape.queryName), false); property(this, 'isLocationName', Boolean(shape.locationName), false); property(this, 'isIdempotent', shape.idempotencyToken === true); property(this, 'isJsonValue', shape.jsonvalue === true); property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true); property(this, 'isEventStream', Boolean(shape.eventstream), false); property(this, 'isEvent', Boolean(shape.event), false); property(this, 'isEventPayload', Boolean(shape.eventpayload), false); property(this, 'isEventHeader', Boolean(shape.eventheader), false); property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false); property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false); property(this, 'hostLabel', Boolean(shape.hostLabel), false); if (options.documentation) { property(this, 'documentation', shape.documentation); property(this, 'documentationUrl', shape.documentationUrl); } if (shape.xmlAttribute) { property(this, 'isXmlAttribute', shape.xmlAttribute || false); } // type conversion and parsing property(this, 'defaultValue', null); this.toWireFormat = function(value) { if (value === null || value === undefined) return ''; return value; }; this.toType = function(value) { return value; }; } /** * @api private */ Shape.normalizedTypes = { character: 'string', double: 'float', long: 'integer', short: 'integer', biginteger: 'integer', bigdecimal: 'float', blob: 'binary' }; /** * @api private */ Shape.types = { 'structure': StructureShape, 'list': ListShape, 'map': MapShape, 'boolean': BooleanShape, 'timestamp': TimestampShape, 'float': FloatShape, 'integer': IntegerShape, 'string': StringShape, 'base64': Base64Shape, 'binary': BinaryShape }; Shape.resolve = function resolve(shape, options) { if (shape.shape) { var refShape = options.api.shapes[shape.shape]; if (!refShape) { throw new Error('Cannot find shape reference: ' + shape.shape); } return refShape; } else { return null; } }; Shape.create = function create(shape, options, memberName) { if (shape.isShape) return shape; var refShape = Shape.resolve(shape, options); if (refShape) { var filteredKeys = Object.keys(shape); if (!options.documentation) { filteredKeys = filteredKeys.filter(function(name) { return !name.match(/documentation/); }); } // create an inline shape with extra members var InlineShape = function() { refShape.constructor.call(this, shape, options, memberName); }; InlineShape.prototype = refShape; return new InlineShape(); } else { // set type if not set if (!shape.type) { if (shape.members) shape.type = 'structure'; else if (shape.member) shape.type = 'list'; else if (shape.key) shape.type = 'map'; else shape.type = 'string'; } // normalize types var origType = shape.type; if (Shape.normalizedTypes[shape.type]) { shape.type = Shape.normalizedTypes[shape.type]; } if (Shape.types[shape.type]) { return new Shape.types[shape.type](shape, options, memberName); } else { throw new Error('Unrecognized shape type: ' + origType); } } }; function CompositeShape(shape) { Shape.apply(this, arguments); property(this, 'isComposite', true); if (shape.flattened) { property(this, 'flattened', shape.flattened || false); } } function StructureShape(shape, options) { var self = this; var requiredMap = null, firstInit = !this.isShape; CompositeShape.apply(this, arguments); if (firstInit) { property(this, 'defaultValue', function() { return {}; }); property(this, 'members', {}); property(this, 'memberNames', []); property(this, 'required', []); property(this, 'isRequired', function() { return false; }); } if (shape.members) { property(this, 'members', new Collection(shape.members, options, function(name, member) { return Shape.create(member, options, name); })); memoizedProperty(this, 'memberNames', function() { return shape.xmlOrder || Object.keys(shape.members); }); if (shape.event) { memoizedProperty(this, 'eventPayloadMemberName', function() { var members = self.members; var memberNames = self.memberNames; // iterate over members to find ones that are event payloads for (var i = 0, iLen = memberNames.length; i < iLen; i++) { if (members[memberNames[i]].isEventPayload) { return memberNames[i]; } } }); memoizedProperty(this, 'eventHeaderMemberNames', function() { var members = self.members; var memberNames = self.memberNames; var eventHeaderMemberNames = []; // iterate over members to find ones that are event headers for (var i = 0, iLen = memberNames.length; i < iLen; i++) { if (members[memberNames[i]].isEventHeader) { eventHeaderMemberNames.push(memberNames[i]); } } return eventHeaderMemberNames; }); } } if (shape.required) { property(this, 'required', shape.required); property(this, 'isRequired', function(name) { if (!requiredMap) { requiredMap = {}; for (var i = 0; i < shape.required.length; i++) { requiredMap[shape.required[i]] = true; } } return requiredMap[name]; }, false, true); } property(this, 'resultWrapper', shape.resultWrapper || null); if (shape.payload) { property(this, 'payload', shape.payload); } if (typeof shape.xmlNamespace === 'string') { property(this, 'xmlNamespaceUri', shape.xmlNamespace); } else if (typeof shape.xmlNamespace === 'object') { property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix); property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri); } } function ListShape(shape, options) { var self = this, firstInit = !this.isShape; CompositeShape.apply(this, arguments); if (firstInit) { property(this, 'defaultValue', function() { return []; }); } if (shape.member) { memoizedProperty(this, 'member', function() { return Shape.create(shape.member, options); }); } if (this.flattened) { var oldName = this.name; memoizedProperty(this, 'name', function() { return self.member.name || oldName; }); } } function MapShape(shape, options) { var firstInit = !this.isShape; CompositeShape.apply(this, arguments); if (firstInit) { property(this, 'defaultValue', function() { return {}; }); property(this, 'key', Shape.create({type: 'string'}, options)); property(this, 'value', Shape.create({type: 'string'}, options)); } if (shape.key) { memoizedProperty(this, 'key', function() { return Shape.create(shape.key, options); }); } if (shape.value) { memoizedProperty(this, 'value', function() { return Shape.create(shape.value, options); }); } } function TimestampShape(shape) { var self = this; Shape.apply(this, arguments); if (shape.timestampFormat) { property(this, 'timestampFormat', shape.timestampFormat); } else if (self.isTimestampFormatSet && this.timestampFormat) { property(this, 'timestampFormat', this.timestampFormat); } else if (this.location === 'header') { property(this, 'timestampFormat', 'rfc822'); } else if (this.location === 'querystring') { property(this, 'timestampFormat', 'iso8601'); } else if (this.api) { switch (this.api.protocol) { case 'json': case 'rest-json': property(this, 'timestampFormat', 'unixTimestamp'); break; case 'rest-xml': case 'query': case 'ec2': property(this, 'timestampFormat', 'iso8601'); break; } } this.toType = function(value) { if (value === null || value === undefined) return null; if (typeof value.toUTCString === 'function') return value; return typeof value === 'string' || typeof value === 'number' ? util.date.parseTimestamp(value) : null; }; this.toWireFormat = function(value) { return util.date.format(value, self.timestampFormat); }; } function StringShape() { Shape.apply(this, arguments); var nullLessProtocols = ['rest-xml', 'query', 'ec2']; this.toType = function(value) { value = this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 ? value || '' : value; if (this.isJsonValue) { return JSON.parse(value); } return value && typeof value.toString === 'function' ? value.toString() : value; }; this.toWireFormat = function(value) { return this.isJsonValue ? JSON.stringify(value) : value; }; } function FloatShape() { Shape.apply(this, arguments); this.toType = function(value) { if (value === null || value === undefined) return null; return parseFloat(value); }; this.toWireFormat = this.toType; } function IntegerShape() { Shape.apply(this, arguments); this.toType = function(value) { if (value === null || value === undefined) return null; return parseInt(value, 10); }; this.toWireFormat = this.toType; } function BinaryShape() { Shape.apply(this, arguments); this.toType = function(value) { var buf = util.base64.decode(value); if (this.isSensitive && util.isNode() && typeof util.Buffer.alloc === 'function') { /* Node.js can create a Buffer that is not isolated. * i.e. buf.byteLength !== buf.buffer.byteLength * This means that the sensitive data is accessible to anyone with access to buf.buffer. * If this is the node shared Buffer, then other code within this process _could_ find this secret. * Copy sensitive data to an isolated Buffer and zero the sensitive data. * While this is safe to do here, copying this code somewhere else may produce unexpected results. */ var secureBuf = util.Buffer.alloc(buf.length, buf); buf.fill(0); buf = secureBuf; } return buf; }; this.toWireFormat = util.base64.encode; } function Base64Shape() { BinaryShape.apply(this, arguments); } function BooleanShape() { Shape.apply(this, arguments); this.toType = function(value) { if (typeof value === 'boolean') return value; if (value === null || value === undefined) return null; return value === 'true'; }; } /** * @api private */ Shape.shapes = { StructureShape: StructureShape, ListShape: ListShape, MapShape: MapShape, StringShape: StringShape, BooleanShape: BooleanShape, Base64Shape: Base64Shape }; /** * @api private */ module.exports = Shape; /***/ }), /***/ 73639: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); util.isBrowser = function() { return false; }; util.isNode = function() { return true; }; // node.js specific modules util.crypto.lib = __webpack_require__(76417); util.Buffer = __webpack_require__(64293).Buffer; util.domain = __webpack_require__(85229); util.stream = __webpack_require__(92413); util.url = __webpack_require__(78835); util.querystring = __webpack_require__(71191); util.environment = 'nodejs'; util.createEventStream = util.stream.Readable ? __webpack_require__(69643).createEventStream : __webpack_require__(63727).createEventStream; util.realClock = __webpack_require__(81370); util.clientSideMonitoring = { Publisher: __webpack_require__(66807).Publisher, configProvider: __webpack_require__(91822), }; util.iniLoader = __webpack_require__(29697)/* .iniLoader */ .b; util.getSystemErrorName = __webpack_require__(31669).getSystemErrorName; var AWS; /** * @api private */ module.exports = AWS = __webpack_require__(28437); __webpack_require__(53819); __webpack_require__(36965); __webpack_require__(77360); __webpack_require__(57083); __webpack_require__(74998); __webpack_require__(3498); __webpack_require__(15037); __webpack_require__(80371); // Load the xml2js XML parser AWS.XML.Parser = __webpack_require__(96752); // Load Node HTTP client __webpack_require__(2310); __webpack_require__(95417); // Load custom credential providers __webpack_require__(11017); __webpack_require__(73379); __webpack_require__(88764); __webpack_require__(10645); __webpack_require__(57714); __webpack_require__(27454); __webpack_require__(13754); __webpack_require__(80371); // Setup default chain providers // If this changes, please update documentation for // AWS.CredentialProviderChain.defaultProviders in // credentials/credential_provider_chain.js AWS.CredentialProviderChain.defaultProviders = [ function () { return new AWS.EnvironmentCredentials('AWS'); }, function () { return new AWS.EnvironmentCredentials('AMAZON'); }, function () { return new AWS.SharedIniFileCredentials(); }, function () { return new AWS.ECSCredentials(); }, function () { return new AWS.ProcessCredentials(); }, function () { return new AWS.TokenFileWebIdentityCredentials(); }, function () { return new AWS.EC2MetadataCredentials(); } ]; // Update configuration keys AWS.util.update(AWS.Config.prototype.keys, { credentials: function () { var credentials = null; new AWS.CredentialProviderChain([ function () { return new AWS.EnvironmentCredentials('AWS'); }, function () { return new AWS.EnvironmentCredentials('AMAZON'); }, function () { return new AWS.SharedIniFileCredentials({ disableAssumeRole: true }); } ]).resolve(function(err, creds) { if (!err) credentials = creds; }); return credentials; }, credentialProvider: function() { return new AWS.CredentialProviderChain(); }, logger: function () { return process.env.AWSJS_DEBUG ? console : null; }, region: function() { var env = process.env; var region = env.AWS_REGION || env.AMAZON_REGION; if (env[AWS.util.configOptInEnv]) { var toCheck = [ {filename: env[AWS.util.sharedCredentialsFileEnv]}, {isConfig: true, filename: env[AWS.util.sharedConfigFileEnv]} ]; var iniLoader = AWS.util.iniLoader; while (!region && toCheck.length) { var configFile = {}; var fileInfo = toCheck.shift(); try { configFile = iniLoader.loadFrom(fileInfo); } catch (err) { if (fileInfo.isConfig) throw err; } var profile = configFile[env.AWS_PROFILE || AWS.util.defaultProfile]; region = profile && profile.region; } } return region; } }); // Reset configuration AWS.config = new AWS.Config(); /***/ }), /***/ 99127: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * @api private */ AWS.ParamValidator = AWS.util.inherit({ /** * Create a new validator object. * * @param validation [Boolean|map] whether input parameters should be * validated against the operation description before sending the * request. Pass a map to enable any of the following specific * validation features: * * * **min** [Boolean] — Validates that a value meets the min * constraint. This is enabled by default when paramValidation is set * to `true`. * * **max** [Boolean] — Validates that a value meets the max * constraint. * * **pattern** [Boolean] — Validates that a string value matches a * regular expression. * * **enum** [Boolean] — Validates that a string value matches one * of the allowable enum values. */ constructor: function ParamValidator(validation) { if (validation === true || validation === undefined) { validation = {'min': true}; } this.validation = validation; }, validate: function validate(shape, params, context) { this.errors = []; this.validateMember(shape, params || {}, context || 'params'); if (this.errors.length > 1) { var msg = this.errors.join('\n* '); msg = 'There were ' + this.errors.length + ' validation errors:\n* ' + msg; throw AWS.util.error(new Error(msg), {code: 'MultipleValidationErrors', errors: this.errors}); } else if (this.errors.length === 1) { throw this.errors[0]; } else { return true; } }, fail: function fail(code, message) { this.errors.push(AWS.util.error(new Error(message), {code: code})); }, validateStructure: function validateStructure(shape, params, context) { this.validateType(params, context, ['object'], 'structure'); var paramName; for (var i = 0; shape.required && i < shape.required.length; i++) { paramName = shape.required[i]; var value = params[paramName]; if (value === undefined || value === null) { this.fail('MissingRequiredParameter', 'Missing required key \'' + paramName + '\' in ' + context); } } // validate hash members for (paramName in params) { if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue; var paramValue = params[paramName], memberShape = shape.members[paramName]; if (memberShape !== undefined) { var memberContext = [context, paramName].join('.'); this.validateMember(memberShape, paramValue, memberContext); } else if (paramValue !== undefined && paramValue !== null) { this.fail('UnexpectedParameter', 'Unexpected key \'' + paramName + '\' found in ' + context); } } return true; }, validateMember: function validateMember(shape, param, context) { switch (shape.type) { case 'structure': return this.validateStructure(shape, param, context); case 'list': return this.validateList(shape, param, context); case 'map': return this.validateMap(shape, param, context); default: return this.validateScalar(shape, param, context); } }, validateList: function validateList(shape, params, context) { if (this.validateType(params, context, [Array])) { this.validateRange(shape, params.length, context, 'list member count'); // validate array members for (var i = 0; i < params.length; i++) { this.validateMember(shape.member, params[i], context + '[' + i + ']'); } } }, validateMap: function validateMap(shape, params, context) { if (this.validateType(params, context, ['object'], 'map')) { // Build up a count of map members to validate range traits. var mapCount = 0; for (var param in params) { if (!Object.prototype.hasOwnProperty.call(params, param)) continue; // Validate any map key trait constraints this.validateMember(shape.key, param, context + '[key=\'' + param + '\']'); this.validateMember(shape.value, params[param], context + '[\'' + param + '\']'); mapCount++; } this.validateRange(shape, mapCount, context, 'map member count'); } }, validateScalar: function validateScalar(shape, value, context) { switch (shape.type) { case null: case undefined: case 'string': return this.validateString(shape, value, context); case 'base64': case 'binary': return this.validatePayload(value, context); case 'integer': case 'float': return this.validateNumber(shape, value, context); case 'boolean': return this.validateType(value, context, ['boolean']); case 'timestamp': return this.validateType(value, context, [Date, /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, 'number'], 'Date object, ISO-8601 string, or a UNIX timestamp'); default: return this.fail('UnkownType', 'Unhandled type ' + shape.type + ' for ' + context); } }, validateString: function validateString(shape, value, context) { var validTypes = ['string']; if (shape.isJsonValue) { validTypes = validTypes.concat(['number', 'object', 'boolean']); } if (value !== null && this.validateType(value, context, validTypes)) { this.validateEnum(shape, value, context); this.validateRange(shape, value.length, context, 'string length'); this.validatePattern(shape, value, context); this.validateUri(shape, value, context); } }, validateUri: function validateUri(shape, value, context) { if (shape['location'] === 'uri') { if (value.length === 0) { this.fail('UriParameterError', 'Expected uri parameter to have length >= 1,' + ' but found "' + value +'" for ' + context); } } }, validatePattern: function validatePattern(shape, value, context) { if (this.validation['pattern'] && shape['pattern'] !== undefined) { if (!(new RegExp(shape['pattern'])).test(value)) { this.fail('PatternMatchError', 'Provided value "' + value + '" ' + 'does not match regex pattern /' + shape['pattern'] + '/ for ' + context); } } }, validateRange: function validateRange(shape, value, context, descriptor) { if (this.validation['min']) { if (shape['min'] !== undefined && value < shape['min']) { this.fail('MinRangeError', 'Expected ' + descriptor + ' >= ' + shape['min'] + ', but found ' + value + ' for ' + context); } } if (this.validation['max']) { if (shape['max'] !== undefined && value > shape['max']) { this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= ' + shape['max'] + ', but found ' + value + ' for ' + context); } } }, validateEnum: function validateRange(shape, value, context) { if (this.validation['enum'] && shape['enum'] !== undefined) { // Fail if the string value is not present in the enum list if (shape['enum'].indexOf(value) === -1) { this.fail('EnumError', 'Found string value of ' + value + ', but ' + 'expected ' + shape['enum'].join('|') + ' for ' + context); } } }, validateType: function validateType(value, context, acceptedTypes, type) { // We will not log an error for null or undefined, but we will return // false so that callers know that the expected type was not strictly met. if (value === null || value === undefined) return false; var foundInvalidType = false; for (var i = 0; i < acceptedTypes.length; i++) { if (typeof acceptedTypes[i] === 'string') { if (typeof value === acceptedTypes[i]) return true; } else if (acceptedTypes[i] instanceof RegExp) { if ((value || '').toString().match(acceptedTypes[i])) return true; } else { if (value instanceof acceptedTypes[i]) return true; if (AWS.util.isType(value, acceptedTypes[i])) return true; if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice(); acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]); } foundInvalidType = true; } var acceptedType = type; if (!acceptedType) { acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1'); } var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : ''; this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' + vowel + ' ' + acceptedType); return false; }, validateNumber: function validateNumber(shape, value, context) { if (value === null || value === undefined) return; if (typeof value === 'string') { var castedValue = parseFloat(value); if (castedValue.toString() === value) value = castedValue; } if (this.validateType(value, context, ['number'])) { this.validateRange(shape, value, context, 'numeric value'); } }, validatePayload: function validatePayload(value, context) { if (value === null || value === undefined) return; if (typeof value === 'string') return; if (value && typeof value.byteLength === 'number') return; // typed arrays if (AWS.util.isNode()) { // special check for buffer/stream in Node.js var Stream = AWS.util.stream.Stream; if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return; } else { if (typeof Blob !== void 0 && value instanceof Blob) return; } var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView']; if (value) { for (var i = 0; i < types.length; i++) { if (AWS.util.isType(value, types[i])) return; if (AWS.util.typeName(value.constructor) === types[i]) return; } } this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' + 'string, Buffer, Stream, Blob, or typed array object'); } }); /***/ }), /***/ 44086: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var rest = AWS.Protocol.Rest; /** * A presigner object can be used to generate presigned urls for the Polly service. */ AWS.Polly.Presigner = AWS.util.inherit({ /** * Creates a presigner object with a set of configuration options. * * @option options params [map] An optional map of parameters to bind to every * request sent by this service object. * @option options service [AWS.Polly] An optional pre-configured instance * of the AWS.Polly service object to use for requests. The object may * bound parameters used by the presigner. * @see AWS.Polly.constructor */ constructor: function Signer(options) { options = options || {}; this.options = options; this.service = options.service; this.bindServiceObject(options); this._operations = {}; }, /** * @api private */ bindServiceObject: function bindServiceObject(options) { options = options || {}; if (!this.service) { this.service = new AWS.Polly(options); } else { var config = AWS.util.copy(this.service.config); this.service = new this.service.constructor.__super__(config); this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params); } }, /** * @api private */ modifyInputMembers: function modifyInputMembers(input) { // make copies of the input so we don't overwrite the api // need to be careful to copy anything we access/modify var modifiedInput = AWS.util.copy(input); modifiedInput.members = AWS.util.copy(input.members); AWS.util.each(input.members, function(name, member) { modifiedInput.members[name] = AWS.util.copy(member); // update location and locationName if (!member.location || member.location === 'body') { modifiedInput.members[name].location = 'querystring'; modifiedInput.members[name].locationName = name; } }); return modifiedInput; }, /** * @api private */ convertPostToGet: function convertPostToGet(req) { // convert method req.httpRequest.method = 'GET'; var operation = req.service.api.operations[req.operation]; // get cached operation input first var input = this._operations[req.operation]; if (!input) { // modify the original input this._operations[req.operation] = input = this.modifyInputMembers(operation.input); } var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params); req.httpRequest.path = uri; req.httpRequest.body = ''; // don't need these headers on a GET request delete req.httpRequest.headers['Content-Length']; delete req.httpRequest.headers['Content-Type']; }, /** * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback]) * Generate a presigned url for {AWS.Polly.synthesizeSpeech}. * @note You must ensure that you have static or previously resolved * credentials if you call this method synchronously (with no callback), * otherwise it may not properly sign the request. If you cannot guarantee * this (you are using an asynchronous credential provider, i.e., EC2 * IAM roles), you should always call this method with an asynchronous * callback. * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech} * operation for the expected operation parameters. * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in. * Defaults to 1 hour. * @return [string] if called synchronously (with no callback), returns the signed URL. * @return [null] nothing is returned if a callback is provided. * @callback callback function (err, url) * If a callback is supplied, it is called when a signed URL has been generated. * @param err [Error] the error object returned from the presigner. * @param url [String] the signed URL. * @see AWS.Polly.synthesizeSpeech */ getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) { var self = this; var request = this.service.makeRequest('synthesizeSpeech', params); // remove existing build listeners request.removeAllListeners('build'); request.on('build', function(req) { self.convertPostToGet(req); }); return request.presign(expires, callback); } }); /***/ }), /***/ 97969: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); var AWS = __webpack_require__(28437); /** * Prepend prefix defined by API model to endpoint that's already * constructed. This feature does not apply to operations using * endpoint discovery and can be disabled. * @api private */ function populateHostPrefix(request) { var enabled = request.service.config.hostPrefixEnabled; if (!enabled) return request; var operationModel = request.service.api.operations[request.operation]; //don't marshal host prefix when operation has endpoint discovery traits if (hasEndpointDiscover(request)) return request; if (operationModel.endpoint && operationModel.endpoint.hostPrefix) { var hostPrefixNotation = operationModel.endpoint.hostPrefix; var hostPrefix = expandHostPrefix(hostPrefixNotation, request.params, operationModel.input); prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix); validateHostname(request.httpRequest.endpoint.hostname); } return request; } /** * @api private */ function hasEndpointDiscover(request) { var api = request.service.api; var operationModel = api.operations[request.operation]; var isEndpointOperation = api.endpointOperation && (api.endpointOperation === util.string.lowerFirst(operationModel.name)); return (operationModel.endpointDiscoveryRequired !== 'NULL' || isEndpointOperation === true); } /** * @api private */ function expandHostPrefix(hostPrefixNotation, params, shape) { util.each(shape.members, function(name, member) { if (member.hostLabel === true) { if (typeof params[name] !== 'string' || params[name] === '') { throw util.error(new Error(), { message: 'Parameter ' + name + ' should be a non-empty string.', code: 'InvalidParameter' }); } var regex = new RegExp('\\{' + name + '\\}', 'g'); hostPrefixNotation = hostPrefixNotation.replace(regex, params[name]); } }); return hostPrefixNotation; } /** * @api private */ function prependEndpointPrefix(endpoint, prefix) { if (endpoint.host) { endpoint.host = prefix + endpoint.host; } if (endpoint.hostname) { endpoint.hostname = prefix + endpoint.hostname; } } /** * @api private */ function validateHostname(hostname) { var labels = hostname.split('.'); //Reference: https://tools.ietf.org/html/rfc1123#section-2 var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; util.arrayEach(labels, function(label) { if (!label.length || label.length < 1 || label.length > 63) { throw util.error(new Error(), { code: 'ValidationError', message: 'Hostname label length should be between 1 to 63 characters, inclusive.' }); } if (!hostPattern.test(label)) { throw AWS.util.error(new Error(), {code: 'ValidationError', message: label + ' is not hostname compatible.'}); } }); } module.exports = { populateHostPrefix: populateHostPrefix }; /***/ }), /***/ 30083: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); var JsonBuilder = __webpack_require__(47495); var JsonParser = __webpack_require__(5474); var populateHostPrefix = __webpack_require__(97969).populateHostPrefix; function buildRequest(req) { var httpRequest = req.httpRequest; var api = req.service.api; var target = api.targetPrefix + '.' + api.operations[req.operation].name; var version = api.jsonVersion || '1.0'; var input = api.operations[req.operation].input; var builder = new JsonBuilder(); if (version === 1) version = '1.0'; httpRequest.body = builder.build(req.params || {}, input); httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version; httpRequest.headers['X-Amz-Target'] = target; populateHostPrefix(req); } function extractError(resp) { var error = {}; var httpResponse = resp.httpResponse; error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError'; if (typeof error.code === 'string') { error.code = error.code.split(':')[0]; } if (httpResponse.body.length > 0) { try { var e = JSON.parse(httpResponse.body.toString()); var code = e.__type || e.code || e.Code; if (code) { error.code = code.split('#').pop(); } if (error.code === 'RequestEntityTooLarge') { error.message = 'Request body must be less than 1 MB'; } else { error.message = (e.message || e.Message || null); } } catch (e) { error.statusCode = httpResponse.statusCode; error.message = httpResponse.statusMessage; } } else { error.statusCode = httpResponse.statusCode; error.message = httpResponse.statusCode.toString(); } resp.error = util.error(new Error(), error); } function extractData(resp) { var body = resp.httpResponse.body.toString() || '{}'; if (resp.request.service.config.convertResponseTypes === false) { resp.data = JSON.parse(body); } else { var operation = resp.request.service.api.operations[resp.request.operation]; var shape = operation.output || {}; var parser = new JsonParser(); resp.data = parser.parse(body, shape); } } /** * @api private */ module.exports = { buildRequest: buildRequest, extractError: extractError, extractData: extractData }; /***/ }), /***/ 90761: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var util = __webpack_require__(77985); var QueryParamSerializer = __webpack_require__(45175); var Shape = __webpack_require__(71349); var populateHostPrefix = __webpack_require__(97969).populateHostPrefix; function buildRequest(req) { var operation = req.service.api.operations[req.operation]; var httpRequest = req.httpRequest; httpRequest.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'; httpRequest.params = { Version: req.service.api.apiVersion, Action: operation.name }; // convert the request parameters into a list of query params, // e.g. Deeply.NestedParam.0.Name=value var builder = new QueryParamSerializer(); builder.serialize(req.params, operation.input, function(name, value) { httpRequest.params[name] = value; }); httpRequest.body = util.queryParamsToString(httpRequest.params); populateHostPrefix(req); } function extractError(resp) { var data, body = resp.httpResponse.body.toString(); if (body.match(' { var util = __webpack_require__(77985); var populateHostPrefix = __webpack_require__(97969).populateHostPrefix; function populateMethod(req) { req.httpRequest.method = req.service.api.operations[req.operation].httpMethod; } function generateURI(endpointPath, operationPath, input, params) { var uri = [endpointPath, operationPath].join('/'); uri = uri.replace(/\/+/g, '/'); var queryString = {}, queryStringSet = false; util.each(input.members, function (name, member) { var paramValue = params[name]; if (paramValue === null || paramValue === undefined) return; if (member.location === 'uri') { var regex = new RegExp('\\{' + member.name + '(\\+)?\\}'); uri = uri.replace(regex, function(_, plus) { var fn = plus ? util.uriEscapePath : util.uriEscape; return fn(String(paramValue)); }); } else if (member.location === 'querystring') { queryStringSet = true; if (member.type === 'list') { queryString[member.name] = paramValue.map(function(val) { return util.uriEscape(member.member.toWireFormat(val).toString()); }); } else if (member.type === 'map') { util.each(paramValue, function(key, value) { if (Array.isArray(value)) { queryString[key] = value.map(function(val) { return util.uriEscape(String(val)); }); } else { queryString[key] = util.uriEscape(String(value)); } }); } else { queryString[member.name] = util.uriEscape(member.toWireFormat(paramValue).toString()); } } }); if (queryStringSet) { uri += (uri.indexOf('?') >= 0 ? '&' : '?'); var parts = []; util.arrayEach(Object.keys(queryString).sort(), function(key) { if (!Array.isArray(queryString[key])) { queryString[key] = [queryString[key]]; } for (var i = 0; i < queryString[key].length; i++) { parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]); } }); uri += parts.join('&'); } return uri; } function populateURI(req) { var operation = req.service.api.operations[req.operation]; var input = operation.input; var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params); req.httpRequest.path = uri; } function populateHeaders(req) { var operation = req.service.api.operations[req.operation]; util.each(operation.input.members, function (name, member) { var value = req.params[name]; if (value === null || value === undefined) return; if (member.location === 'headers' && member.type === 'map') { util.each(value, function(key, memberValue) { req.httpRequest.headers[member.name + key] = memberValue; }); } else if (member.location === 'header') { value = member.toWireFormat(value).toString(); if (member.isJsonValue) { value = util.base64.encode(value); } req.httpRequest.headers[member.name] = value; } }); } function buildRequest(req) { populateMethod(req); populateURI(req); populateHeaders(req); populateHostPrefix(req); } function extractError() { } function extractData(resp) { var req = resp.request; var data = {}; var r = resp.httpResponse; var operation = req.service.api.operations[req.operation]; var output = operation.output; // normalize headers names to lower-cased keys for matching var headers = {}; util.each(r.headers, function (k, v) { headers[k.toLowerCase()] = v; }); util.each(output.members, function(name, member) { var header = (member.name || name).toLowerCase(); if (member.location === 'headers' && member.type === 'map') { data[name] = {}; var location = member.isLocationName ? member.name : ''; var pattern = new RegExp('^' + location + '(.+)', 'i'); util.each(r.headers, function (k, v) { var result = k.match(pattern); if (result !== null) { data[name][result[1]] = v; } }); } else if (member.location === 'header') { if (headers[header] !== undefined) { var value = member.isJsonValue ? util.base64.decode(headers[header]) : headers[header]; data[name] = member.toType(value); } } else if (member.location === 'statusCode') { data[name] = parseInt(r.statusCode, 10); } }); resp.data = data; } /** * @api private */ module.exports = { buildRequest: buildRequest, extractError: extractError, extractData: extractData, generateURI: generateURI }; /***/ }), /***/ 5883: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); var Rest = __webpack_require__(98200); var Json = __webpack_require__(30083); var JsonBuilder = __webpack_require__(47495); var JsonParser = __webpack_require__(5474); function populateBody(req) { var builder = new JsonBuilder(); var input = req.service.api.operations[req.operation].input; if (input.payload) { var params = {}; var payloadShape = input.members[input.payload]; params = req.params[input.payload]; if (params === undefined) return; if (payloadShape.type === 'structure') { req.httpRequest.body = builder.build(params, payloadShape); applyContentTypeHeader(req); } else { // non-JSON payload req.httpRequest.body = params; if (payloadShape.type === 'binary' || payloadShape.isStreaming) { applyContentTypeHeader(req, true); } } } else { var body = builder.build(req.params, input); if (body !== '{}' || req.httpRequest.method !== 'GET') { //don't send empty body for GET method req.httpRequest.body = body; } applyContentTypeHeader(req); } } function applyContentTypeHeader(req, isBinary) { var operation = req.service.api.operations[req.operation]; var input = operation.input; if (!req.httpRequest.headers['Content-Type']) { var type = isBinary ? 'binary/octet-stream' : 'application/json'; req.httpRequest.headers['Content-Type'] = type; } } function buildRequest(req) { Rest.buildRequest(req); // never send body payload on HEAD/DELETE if (['HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) { populateBody(req); } } function extractError(resp) { Json.extractError(resp); } function extractData(resp) { Rest.extractData(resp); var req = resp.request; var operation = req.service.api.operations[req.operation]; var rules = req.service.api.operations[req.operation].output || {}; var parser; var hasEventOutput = operation.hasEventOutput; if (rules.payload) { var payloadMember = rules.members[rules.payload]; var body = resp.httpResponse.body; if (payloadMember.isEventStream) { parser = new JsonParser(); resp.data[payload] = util.createEventStream( AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body, parser, payloadMember ); } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') { var parser = new JsonParser(); resp.data[rules.payload] = parser.parse(body, payloadMember); } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) { resp.data[rules.payload] = body; } else { resp.data[rules.payload] = payloadMember.toType(body); } } else { var data = resp.data; Json.extractData(resp); resp.data = util.merge(data, resp.data); } } /** * @api private */ module.exports = { buildRequest: buildRequest, extractError: extractError, extractData: extractData }; /***/ }), /***/ 15143: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var util = __webpack_require__(77985); var Rest = __webpack_require__(98200); function populateBody(req) { var input = req.service.api.operations[req.operation].input; var builder = new AWS.XML.Builder(); var params = req.params; var payload = input.payload; if (payload) { var payloadMember = input.members[payload]; params = params[payload]; if (params === undefined) return; if (payloadMember.type === 'structure') { var rootElement = payloadMember.name; req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true); } else { // non-xml payload req.httpRequest.body = params; } } else { req.httpRequest.body = builder.toXML(params, input, input.name || input.shape || util.string.upperFirst(req.operation) + 'Request'); } } function buildRequest(req) { Rest.buildRequest(req); // never send body payload on GET/HEAD if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) { populateBody(req); } } function extractError(resp) { Rest.extractError(resp); var data; try { data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString()); } catch (e) { data = { Code: resp.httpResponse.statusCode, Message: resp.httpResponse.statusMessage }; } if (data.Errors) data = data.Errors; if (data.Error) data = data.Error; if (data.Code) { resp.error = util.error(new Error(), { code: data.Code, message: data.Message }); } else { resp.error = util.error(new Error(), { code: resp.httpResponse.statusCode, message: null }); } } function extractData(resp) { Rest.extractData(resp); var parser; var req = resp.request; var body = resp.httpResponse.body; var operation = req.service.api.operations[req.operation]; var output = operation.output; var hasEventOutput = operation.hasEventOutput; var payload = output.payload; if (payload) { var payloadMember = output.members[payload]; if (payloadMember.isEventStream) { parser = new AWS.XML.Parser(); resp.data[payload] = util.createEventStream( AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : resp.httpResponse.body, parser, payloadMember ); } else if (payloadMember.type === 'structure') { parser = new AWS.XML.Parser(); resp.data[payload] = parser.parse(body.toString(), payloadMember); } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) { resp.data[payload] = body; } else { resp.data[payload] = payloadMember.toType(body); } } else if (body.length > 0) { parser = new AWS.XML.Parser(); var data = parser.parse(body.toString(), output); util.update(resp.data, data); } } /** * @api private */ module.exports = { buildRequest: buildRequest, extractError: extractError, extractData: extractData }; /***/ }), /***/ 91822: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Resolve client-side monitoring configuration from either environmental variables * or shared config file. Configurations from environmental variables have higher priority * than those from shared config file. The resolver will try to read the shared config file * no matter whether the AWS_SDK_LOAD_CONFIG variable is set. * @api private */ function resolveMonitoringConfig() { var config = { port: undefined, clientId: undefined, enabled: undefined, host: undefined }; if (fromEnvironment(config) || fromConfigFile(config)) return toJSType(config); return toJSType(config); } /** * Resolve configurations from environmental variables. * @param {object} client side monitoring config object needs to be resolved * @returns {boolean} whether resolving configurations is done * @api private */ function fromEnvironment(config) { config.port = config.port || process.env.AWS_CSM_PORT; config.enabled = config.enabled || process.env.AWS_CSM_ENABLED; config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID; config.host = config.host || process.env.AWS_CSM_HOST; return config.port && config.enabled && config.clientId && config.host || ['false', '0'].indexOf(config.enabled) >= 0; //no need to read shared config file if explicitely disabled } /** * Resolve cofigurations from shared config file with specified role name * @param {object} client side monitoring config object needs to be resolved * @returns {boolean} whether resolving configurations is done * @api private */ function fromConfigFile(config) { var sharedFileConfig; try { var configFile = AWS.util.iniLoader.loadFrom({ isConfig: true, filename: process.env[AWS.util.sharedConfigFileEnv] }); var sharedFileConfig = configFile[ process.env.AWS_PROFILE || AWS.util.defaultProfile ]; } catch (err) { return false; } if (!sharedFileConfig) return config; config.port = config.port || sharedFileConfig.csm_port; config.enabled = config.enabled || sharedFileConfig.csm_enabled; config.clientId = config.clientId || sharedFileConfig.csm_client_id; config.host = config.host || sharedFileConfig.csm_host; return config.port && config.enabled && config.clientId && config.host; } /** * Transfer the resolved configuration value to proper types: port as number, enabled * as boolean and clientId as string. The 'enabled' flag is valued to false when set * to 'false' or '0'. * @param {object} resolved client side monitoring config * @api private */ function toJSType(config) { //config.XXX is either undefined or string var falsyNotations = ['false', '0', undefined]; if (!config.enabled || falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0) { config.enabled = false; } else { config.enabled = true; } config.port = config.port ? parseInt(config.port, 10) : undefined; return config; } module.exports = resolveMonitoringConfig; /***/ }), /***/ 66807: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(28437).util; var dgram = __webpack_require__(76200); var stringToBuffer = util.buffer.toBuffer; var MAX_MESSAGE_SIZE = 1024 * 8; // 8 KB /** * Publishes metrics via udp. * @param {object} options Paramters for Publisher constructor * @param {number} [options.port = 31000] Port number * @param {string} [options.clientId = ''] Client Identifier * @param {boolean} [options.enabled = false] enable sending metrics datagram * @api private */ function Publisher(options) { // handle configuration options = options || {}; this.enabled = options.enabled || false; this.port = options.port || 31000; this.clientId = options.clientId || ''; this.address = options.host || '127.0.0.1'; if (this.clientId.length > 255) { // ClientId has a max length of 255 this.clientId = this.clientId.substr(0, 255); } this.messagesInFlight = 0; } Publisher.prototype.fieldsToTrim = { UserAgent: 256, SdkException: 128, SdkExceptionMessage: 512, AwsException: 128, AwsExceptionMessage: 512, FinalSdkException: 128, FinalSdkExceptionMessage: 512, FinalAwsException: 128, FinalAwsExceptionMessage: 512 }; /** * Trims fields that have a specified max length. * @param {object} event ApiCall or ApiCallAttempt event. * @returns {object} * @api private */ Publisher.prototype.trimFields = function(event) { var trimmableFields = Object.keys(this.fieldsToTrim); for (var i = 0, iLen = trimmableFields.length; i < iLen; i++) { var field = trimmableFields[i]; if (event.hasOwnProperty(field)) { var maxLength = this.fieldsToTrim[field]; var value = event[field]; if (value && value.length > maxLength) { event[field] = value.substr(0, maxLength); } } } return event; }; /** * Handles ApiCall and ApiCallAttempt events. * @param {Object} event apiCall or apiCallAttempt event. * @api private */ Publisher.prototype.eventHandler = function(event) { // set the clientId event.ClientId = this.clientId; this.trimFields(event); var message = stringToBuffer(JSON.stringify(event)); if (!this.enabled || message.length > MAX_MESSAGE_SIZE) { // drop the message if publisher not enabled or it is too large return; } this.publishDatagram(message); }; /** * Publishes message to an agent. * @param {Buffer} message JSON message to send to agent. * @api private */ Publisher.prototype.publishDatagram = function(message) { var self = this; var client = this.getClient(); this.messagesInFlight++; this.client.send(message, 0, message.length, this.port, this.address, function(err, bytes) { if (--self.messagesInFlight <= 0) { // destroy existing client so the event loop isn't kept open self.destroyClient(); } }); }; /** * Returns an existing udp socket, or creates one if it doesn't already exist. * @api private */ Publisher.prototype.getClient = function() { if (!this.client) { this.client = dgram.createSocket('udp4'); } return this.client; }; /** * Destroys the udp socket. * @api private */ Publisher.prototype.destroyClient = function() { if (this.client) { this.client.close(); this.client = void 0; } }; module.exports = { Publisher: Publisher }; /***/ }), /***/ 45175: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); function QueryParamSerializer() { } QueryParamSerializer.prototype.serialize = function(params, shape, fn) { serializeStructure('', params, shape, fn); }; function ucfirst(shape) { if (shape.isQueryName || shape.api.protocol !== 'ec2') { return shape.name; } else { return shape.name[0].toUpperCase() + shape.name.substr(1); } } function serializeStructure(prefix, struct, rules, fn) { util.each(rules.members, function(name, member) { var value = struct[name]; if (value === null || value === undefined) return; var memberName = ucfirst(member); memberName = prefix ? prefix + '.' + memberName : memberName; serializeMember(memberName, value, member, fn); }); } function serializeMap(name, map, rules, fn) { var i = 1; util.each(map, function (key, value) { var prefix = rules.flattened ? '.' : '.entry.'; var position = prefix + (i++) + '.'; var keyName = position + (rules.key.name || 'key'); var valueName = position + (rules.value.name || 'value'); serializeMember(name + keyName, key, rules.key, fn); serializeMember(name + valueName, value, rules.value, fn); }); } function serializeList(name, list, rules, fn) { var memberRules = rules.member || {}; if (list.length === 0) { fn.call(this, name, null); return; } util.arrayEach(list, function (v, n) { var suffix = '.' + (n + 1); if (rules.api.protocol === 'ec2') { // Do nothing for EC2 suffix = suffix + ''; // make linter happy } else if (rules.flattened) { if (memberRules.name) { var parts = name.split('.'); parts.pop(); parts.push(ucfirst(memberRules)); name = parts.join('.'); } } else { suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix; } serializeMember(name + suffix, v, memberRules, fn); }); } function serializeMember(name, value, rules, fn) { if (value === null || value === undefined) return; if (rules.type === 'structure') { serializeStructure(name, value, rules, fn); } else if (rules.type === 'list') { serializeList(name, value, rules, fn); } else if (rules.type === 'map') { serializeMap(name, value, rules, fn); } else { fn(name, rules.toWireFormat(value).toString()); } } /** * @api private */ module.exports = QueryParamSerializer; /***/ }), /***/ 16612: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * @api private */ var service = null; /** * @api private */ var api = { signatureVersion: 'v4', signingName: 'rds-db', operations: {} }; /** * @api private */ var requiredAuthTokenOptions = { region: 'string', hostname: 'string', port: 'number', username: 'string' }; /** * A signer object can be used to generate an auth token to a database. */ AWS.RDS.Signer = AWS.util.inherit({ /** * Creates a signer object can be used to generate an auth token. * * @option options credentials [AWS.Credentials] the AWS credentials * to sign requests with. Uses the default credential provider chain * if not specified. * @option options hostname [String] the hostname of the database to connect to. * @option options port [Number] the port number the database is listening on. * @option options region [String] the region the database is located in. * @option options username [String] the username to login as. * @example Passing in options to constructor * var signer = new AWS.RDS.Signer({ * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}), * region: 'us-east-1', * hostname: 'db.us-east-1.rds.amazonaws.com', * port: 8000, * username: 'name' * }); */ constructor: function Signer(options) { this.options = options || {}; }, /** * @api private * Strips the protocol from a url. */ convertUrlToAuthToken: function convertUrlToAuthToken(url) { // we are always using https as the protocol var protocol = 'https://'; if (url.indexOf(protocol) === 0) { return url.substring(protocol.length); } }, /** * @overload getAuthToken(options = {}, [callback]) * Generate an auth token to a database. * @note You must ensure that you have static or previously resolved * credentials if you call this method synchronously (with no callback), * otherwise it may not properly sign the request. If you cannot guarantee * this (you are using an asynchronous credential provider, i.e., EC2 * IAM roles), you should always call this method with an asynchronous * callback. * * @param options [map] The fields to use when generating an auth token. * Any options specified here will be merged on top of any options passed * to AWS.RDS.Signer: * * * **credentials** (AWS.Credentials) — the AWS credentials * to sign requests with. Uses the default credential provider chain * if not specified. * * **hostname** (String) — the hostname of the database to connect to. * * **port** (Number) — the port number the database is listening on. * * **region** (String) — the region the database is located in. * * **username** (String) — the username to login as. * @return [String] if called synchronously (with no callback), returns the * auth token. * @return [null] nothing is returned if a callback is provided. * @callback callback function (err, token) * If a callback is supplied, it is called when an auth token has been generated. * @param err [Error] the error object returned from the signer. * @param token [String] the auth token. * * @example Generating an auth token synchronously * var signer = new AWS.RDS.Signer({ * // configure options * region: 'us-east-1', * username: 'default', * hostname: 'db.us-east-1.amazonaws.com', * port: 8000 * }); * var token = signer.getAuthToken({ * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option * // credentials are not specified here or when creating the signer, so default credential provider will be used * username: 'test' // overriding username * }); * @example Generating an auth token asynchronously * var signer = new AWS.RDS.Signer({ * // configure options * region: 'us-east-1', * username: 'default', * hostname: 'db.us-east-1.amazonaws.com', * port: 8000 * }); * signer.getAuthToken({ * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option * // credentials are not specified here or when creating the signer, so default credential provider will be used * username: 'test' // overriding username * }, function(err, token) { * if (err) { * // handle error * } else { * // use token * } * }); * */ getAuthToken: function getAuthToken(options, callback) { if (typeof options === 'function' && callback === undefined) { callback = options; options = {}; } var self = this; var hasCallback = typeof callback === 'function'; // merge options with existing options options = AWS.util.merge(this.options, options); // validate options var optionsValidation = this.validateAuthTokenOptions(options); if (optionsValidation !== true) { if (hasCallback) { return callback(optionsValidation, null); } throw optionsValidation; } // 15 minutes var expires = 900; // create service to generate a request from var serviceOptions = { region: options.region, endpoint: new AWS.Endpoint(options.hostname + ':' + options.port), paramValidation: false, signatureVersion: 'v4' }; if (options.credentials) { serviceOptions.credentials = options.credentials; } service = new AWS.Service(serviceOptions); // ensure the SDK is using sigv4 signing (config is not enough) service.api = api; var request = service.makeRequest(); // add listeners to request to properly build auth token this.modifyRequestForAuthToken(request, options); if (hasCallback) { request.presign(expires, function(err, url) { if (url) { url = self.convertUrlToAuthToken(url); } callback(err, url); }); } else { var url = request.presign(expires); return this.convertUrlToAuthToken(url); } }, /** * @api private * Modifies a request to allow the presigner to generate an auth token. */ modifyRequestForAuthToken: function modifyRequestForAuthToken(request, options) { request.on('build', request.buildAsGet); var httpRequest = request.httpRequest; httpRequest.body = AWS.util.queryParamsToString({ Action: 'connect', DBUser: options.username }); }, /** * @api private * Validates that the options passed in contain all the keys with values of the correct type that * are needed to generate an auth token. */ validateAuthTokenOptions: function validateAuthTokenOptions(options) { // iterate over all keys in options var message = ''; options = options || {}; for (var key in requiredAuthTokenOptions) { if (!Object.prototype.hasOwnProperty.call(requiredAuthTokenOptions, key)) { continue; } if (typeof options[key] !== requiredAuthTokenOptions[key]) { message += 'option \'' + key + '\' should have been type \'' + requiredAuthTokenOptions[key] + '\', was \'' + typeof options[key] + '\'.\n'; } } if (message.length) { return AWS.util.error(new Error(), { code: 'InvalidParameter', message: message }); } return true; } }); /***/ }), /***/ 81370: /***/ ((module) => { module.exports = { //provide realtime clock for performance measurement now: function now() { var second = process.hrtime(); return second[0] * 1000 + (second[1] / 1000000); } }; /***/ }), /***/ 18262: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); var regionConfig = __webpack_require__(51765); function generateRegionPrefix(region) { if (!region) return null; var parts = region.split('-'); if (parts.length < 3) return null; return parts.slice(0, parts.length - 2).join('-') + '-*'; } function derivedKeys(service) { var region = service.config.region; var regionPrefix = generateRegionPrefix(region); var endpointPrefix = service.api.endpointPrefix; return [ [region, endpointPrefix], [regionPrefix, endpointPrefix], [region, '*'], [regionPrefix, '*'], ['*', endpointPrefix], ['*', '*'] ].map(function(item) { return item[0] && item[1] ? item.join('/') : null; }); } function applyConfig(service, config) { util.each(config, function(key, value) { if (key === 'globalEndpoint') return; if (service.config[key] === undefined || service.config[key] === null) { service.config[key] = value; } }); } function configureEndpoint(service) { var keys = derivedKeys(service); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!key) continue; if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) { var config = regionConfig.rules[key]; if (typeof config === 'string') { config = regionConfig.patterns[config]; } // set dualstack endpoint if (service.config.useDualstack && util.isDualstackAvailable(service)) { config = util.copy(config); config.endpoint = config.endpoint.replace( /{service}\.({region}\.)?/, '{service}.dualstack.{region}.' ); } // set global endpoint service.isGlobalEndpoint = !!config.globalEndpoint; if (config.signingRegion) { service.signingRegion = config.signingRegion; } // signature version if (!config.signatureVersion) config.signatureVersion = 'v4'; // merge config applyConfig(service, config); return; } } } function getEndpointSuffix(region) { var regionRegexes = { '^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$': 'amazonaws.com', '^cn\\-\\w+\\-\\d+$': 'amazonaws.com.cn', '^us\\-gov\\-\\w+\\-\\d+$': 'amazonaws.com', '^us\\-iso\\-\\w+\\-\\d+$': 'c2s.ic.gov', '^us\\-isob\\-\\w+\\-\\d+$': 'sc2s.sgov.gov' }; var defaultSuffix = 'amazonaws.com'; var regexes = Object.keys(regionRegexes); for (var i = 0; i < regexes.length; i++) { var regionPattern = RegExp(regexes[i]); var dnsSuffix = regionRegexes[regexes[i]]; if (regionPattern.test(region)) return dnsSuffix; } return defaultSuffix; } /** * @api private */ module.exports = { configureEndpoint: configureEndpoint, getEndpointSuffix: getEndpointSuffix }; /***/ }), /***/ 78652: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var AcceptorStateMachine = __webpack_require__(68118); var inherit = AWS.util.inherit; var domain = AWS.util.domain; var jmespath = __webpack_require__(87783); /** * @api private */ var hardErrorStates = {success: 1, error: 1, complete: 1}; function isTerminalState(machine) { return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState); } var fsm = new AcceptorStateMachine(); fsm.setupStates = function() { var transition = function(_, done) { var self = this; self._haltHandlersOnError = false; self.emit(self._asm.currentState, function(err) { if (err) { if (isTerminalState(self)) { if (domain && self.domain instanceof domain.Domain) { err.domainEmitter = self; err.domain = self.domain; err.domainThrown = false; self.domain.emit('error', err); } else { throw err; } } else { self.response.error = err; done(err); } } else { done(self.response.error); } }); }; this.addState('validate', 'build', 'error', transition); this.addState('build', 'afterBuild', 'restart', transition); this.addState('afterBuild', 'sign', 'restart', transition); this.addState('sign', 'send', 'retry', transition); this.addState('retry', 'afterRetry', 'afterRetry', transition); this.addState('afterRetry', 'sign', 'error', transition); this.addState('send', 'validateResponse', 'retry', transition); this.addState('validateResponse', 'extractData', 'extractError', transition); this.addState('extractError', 'extractData', 'retry', transition); this.addState('extractData', 'success', 'retry', transition); this.addState('restart', 'build', 'error', transition); this.addState('success', 'complete', 'complete', transition); this.addState('error', 'complete', 'complete', transition); this.addState('complete', null, null, transition); }; fsm.setupStates(); /** * ## Asynchronous Requests * * All requests made through the SDK are asynchronous and use a * callback interface. Each service method that kicks off a request * returns an `AWS.Request` object that you can use to register * callbacks. * * For example, the following service method returns the request * object as "request", which can be used to register callbacks: * * ```javascript * // request is an AWS.Request object * var request = ec2.describeInstances(); * * // register callbacks on request to retrieve response data * request.on('success', function(response) { * console.log(response.data); * }); * ``` * * When a request is ready to be sent, the {send} method should * be called: * * ```javascript * request.send(); * ``` * * Since registered callbacks may or may not be idempotent, requests should only * be sent once. To perform the same operation multiple times, you will need to * create multiple request objects, each with its own registered callbacks. * * ## Removing Default Listeners for Events * * Request objects are built with default listeners for the various events, * depending on the service type. In some cases, you may want to remove * some built-in listeners to customize behaviour. Doing this requires * access to the built-in listener functions, which are exposed through * the {AWS.EventListeners.Core} namespace. For instance, you may * want to customize the HTTP handler used when sending a request. In this * case, you can remove the built-in listener associated with the 'send' * event, the {AWS.EventListeners.Core.SEND} listener and add your own. * * ## Multiple Callbacks and Chaining * * You can register multiple callbacks on any request object. The * callbacks can be registered for different events, or all for the * same event. In addition, you can chain callback registration, for * example: * * ```javascript * request. * on('success', function(response) { * console.log("Success!"); * }). * on('error', function(error, response) { * console.log("Error!"); * }). * on('complete', function(response) { * console.log("Always!"); * }). * send(); * ``` * * The above example will print either "Success! Always!", or "Error! Always!", * depending on whether the request succeeded or not. * * @!attribute httpRequest * @readonly * @!group HTTP Properties * @return [AWS.HttpRequest] the raw HTTP request object * containing request headers and body information * sent by the service. * * @!attribute startTime * @readonly * @!group Operation Properties * @return [Date] the time that the request started * * @!group Request Building Events * * @!event validate(request) * Triggered when a request is being validated. Listeners * should throw an error if the request should not be sent. * @param request [Request] the request object being sent * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS * @see AWS.EventListeners.Core.VALIDATE_REGION * @example Ensuring that a certain parameter is set before sending a request * var req = s3.putObject(params); * req.on('validate', function() { * if (!req.params.Body.match(/^Hello\s/)) { * throw new Error('Body must start with "Hello "'); * } * }); * req.send(function(err, data) { ... }); * * @!event build(request) * Triggered when the request payload is being built. Listeners * should fill the necessary information to send the request * over HTTP. * @param (see AWS.Request~validate) * @example Add a custom HTTP header to a request * var req = s3.putObject(params); * req.on('build', function() { * req.httpRequest.headers['Custom-Header'] = 'value'; * }); * req.send(function(err, data) { ... }); * * @!event sign(request) * Triggered when the request is being signed. Listeners should * add the correct authentication headers and/or adjust the body, * depending on the authentication mechanism being used. * @param (see AWS.Request~validate) * * @!group Request Sending Events * * @!event send(response) * Triggered when the request is ready to be sent. Listeners * should call the underlying transport layer to initiate * the sending of the request. * @param response [Response] the response object * @context [Request] the request object that was sent * @see AWS.EventListeners.Core.SEND * * @!event retry(response) * Triggered when a request failed and might need to be retried or redirected. * If the response is retryable, the listener should set the * `response.error.retryable` property to `true`, and optionally set * `response.error.retryDelay` to the millisecond delay for the next attempt. * In the case of a redirect, `response.error.redirect` should be set to * `true` with `retryDelay` set to an optional delay on the next request. * * If a listener decides that a request should not be retried, * it should set both `retryable` and `redirect` to false. * * Note that a retryable error will be retried at most * {AWS.Config.maxRetries} times (based on the service object's config). * Similarly, a request that is redirected will only redirect at most * {AWS.Config.maxRedirects} times. * * @param (see AWS.Request~send) * @context (see AWS.Request~send) * @example Adding a custom retry for a 404 response * request.on('retry', function(response) { * // this resource is not yet available, wait 10 seconds to get it again * if (response.httpResponse.statusCode === 404 && response.error) { * response.error.retryable = true; // retry this error * response.error.retryDelay = 10000; // wait 10 seconds * } * }); * * @!group Data Parsing Events * * @!event extractError(response) * Triggered on all non-2xx requests so that listeners can extract * error details from the response body. Listeners to this event * should set the `response.error` property. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @!event extractData(response) * Triggered in successful requests to allow listeners to * de-serialize the response body into `response.data`. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @!group Completion Events * * @!event success(response) * Triggered when the request completed successfully. * `response.data` will contain the response data and * `response.error` will be null. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @!event error(error, response) * Triggered when an error occurs at any point during the * request. `response.error` will contain details about the error * that occurred. `response.data` will be null. * @param error [Error] the error object containing details about * the error that occurred. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @!event complete(response) * Triggered whenever a request cycle completes. `response.error` * should be checked, since the request may have failed. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @!group HTTP Events * * @!event httpHeaders(statusCode, headers, response, statusMessage) * Triggered when headers are sent by the remote server * @param statusCode [Integer] the HTTP response code * @param headers [map] the response headers * @param (see AWS.Request~send) * @param statusMessage [String] A status message corresponding to the HTTP * response code * @context (see AWS.Request~send) * * @!event httpData(chunk, response) * Triggered when data is sent by the remote server * @param chunk [Buffer] the buffer data containing the next data chunk * from the server * @param (see AWS.Request~send) * @context (see AWS.Request~send) * @see AWS.EventListeners.Core.HTTP_DATA * * @!event httpUploadProgress(progress, response) * Triggered when the HTTP request has uploaded more data * @param progress [map] An object containing the `loaded` and `total` bytes * of the request. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * @note This event will not be emitted in Node.js 0.8.x. * * @!event httpDownloadProgress(progress, response) * Triggered when the HTTP request has downloaded more data * @param progress [map] An object containing the `loaded` and `total` bytes * of the request. * @param (see AWS.Request~send) * @context (see AWS.Request~send) * @note This event will not be emitted in Node.js 0.8.x. * * @!event httpError(error, response) * Triggered when the HTTP request failed * @param error [Error] the error object that was thrown * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @!event httpDone(response) * Triggered when the server is finished sending data * @param (see AWS.Request~send) * @context (see AWS.Request~send) * * @see AWS.Response */ AWS.Request = inherit({ /** * Creates a request for an operation on a given service with * a set of input parameters. * * @param service [AWS.Service] the service to perform the operation on * @param operation [String] the operation to perform on the service * @param params [Object] parameters to send to the operation. * See the operation's documentation for the format of the * parameters. */ constructor: function Request(service, operation, params) { var endpoint = service.endpoint; var region = service.config.region; var customUserAgent = service.config.customUserAgent; if (service.isGlobalEndpoint) { if (service.signingRegion) { region = service.signingRegion; } else { region = 'us-east-1'; } } this.domain = domain && domain.active; this.service = service; this.operation = operation; this.params = params || {}; this.httpRequest = new AWS.HttpRequest(endpoint, region); this.httpRequest.appendToUserAgent(customUserAgent); this.startTime = service.getSkewCorrectedDate(); this.response = new AWS.Response(this); this._asm = new AcceptorStateMachine(fsm.states, 'validate'); this._haltHandlersOnError = false; AWS.SequentialExecutor.call(this); this.emit = this.emitEvent; }, /** * @!group Sending a Request */ /** * @overload send(callback = null) * Sends the request object. * * @callback callback function(err, data) * If a callback is supplied, it is called when a response is returned * from the service. * @context [AWS.Request] the request object being sent. * @param err [Error] the error object returned from the request. * Set to `null` if the request is successful. * @param data [Object] the de-serialized data returned from * the request. Set to `null` if a request error occurs. * @example Sending a request with a callback * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); * request.send(function(err, data) { console.log(err, data); }); * @example Sending a request with no callback (using event handlers) * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); * request.on('complete', function(response) { ... }); // register a callback * request.send(); */ send: function send(callback) { if (callback) { // append to user agent this.httpRequest.appendToUserAgent('callback'); this.on('complete', function (resp) { callback.call(resp, resp.error, resp.data); }); } this.runTo(); return this.response; }, /** * @!method promise() * Sends the request and returns a 'thenable' promise. * * Two callbacks can be provided to the `then` method on the returned promise. * The first callback will be called if the promise is fulfilled, and the second * callback will be called if the promise is rejected. * @callback fulfilledCallback function(data) * Called if the promise is fulfilled. * @param data [Object] the de-serialized data returned from the request. * @callback rejectedCallback function(error) * Called if the promise is rejected. * @param error [Error] the error object returned from the request. * @return [Promise] A promise that represents the state of the request. * @example Sending a request using promises. * var request = s3.putObject({Bucket: 'bucket', Key: 'key'}); * var result = request.promise(); * result.then(function(data) { ... }, function(error) { ... }); */ /** * @api private */ build: function build(callback) { return this.runTo('send', callback); }, /** * @api private */ runTo: function runTo(state, done) { this._asm.runTo(state, done, this); return this; }, /** * Aborts a request, emitting the error and complete events. * * @!macro nobrowser * @example Aborting a request after sending * var params = { * Bucket: 'bucket', Key: 'key', * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload * }; * var request = s3.putObject(params); * request.send(function (err, data) { * if (err) console.log("Error:", err.code, err.message); * else console.log(data); * }); * * // abort request in 1 second * setTimeout(request.abort.bind(request), 1000); * * // prints "Error: RequestAbortedError Request aborted by user" * @return [AWS.Request] the same request object, for chaining. * @since v1.4.0 */ abort: function abort() { this.removeAllListeners('validateResponse'); this.removeAllListeners('extractError'); this.on('validateResponse', function addAbortedError(resp) { resp.error = AWS.util.error(new Error('Request aborted by user'), { code: 'RequestAbortedError', retryable: false }); }); if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { // abort HTTP stream this.httpRequest.stream.abort(); if (this.httpRequest._abortCallback) { this.httpRequest._abortCallback(); } else { this.removeAllListeners('send'); // haven't sent yet, so let's not } } return this; }, /** * Iterates over each page of results given a pageable request, calling * the provided callback with each page of data. After all pages have been * retrieved, the callback is called with `null` data. * * @note This operation can generate multiple requests to a service. * @example Iterating over multiple pages of objects in an S3 bucket * var pages = 1; * s3.listObjects().eachPage(function(err, data) { * if (err) return; * console.log("Page", pages++); * console.log(data); * }); * @example Iterating over multiple pages with an asynchronous callback * s3.listObjects(params).eachPage(function(err, data, done) { * doSomethingAsyncAndOrExpensive(function() { * // The next page of results isn't fetched until done is called * done(); * }); * }); * @callback callback function(err, data, [doneCallback]) * Called with each page of resulting data from the request. If the * optional `doneCallback` is provided in the function, it must be called * when the callback is complete. * * @param err [Error] an error object, if an error occurred. * @param data [Object] a single page of response data. If there is no * more data, this object will be `null`. * @param doneCallback [Function] an optional done callback. If this * argument is defined in the function declaration, it should be called * when the next page is ready to be retrieved. This is useful for * controlling serial pagination across asynchronous operations. * @return [Boolean] if the callback returns `false`, pagination will * stop. * * @see AWS.Request.eachItem * @see AWS.Response.nextPage * @since v1.4.0 */ eachPage: function eachPage(callback) { // Make all callbacks async-ish callback = AWS.util.fn.makeAsync(callback, 3); function wrappedCallback(response) { callback.call(response, response.error, response.data, function (result) { if (result === false) return; if (response.hasNextPage()) { response.nextPage().on('complete', wrappedCallback).send(); } else { callback.call(response, null, null, AWS.util.fn.noop); } }); } this.on('complete', wrappedCallback).send(); }, /** * Enumerates over individual items of a request, paging the responses if * necessary. * * @api experimental * @since v1.4.0 */ eachItem: function eachItem(callback) { var self = this; function wrappedCallback(err, data) { if (err) return callback(err, null); if (data === null) return callback(null, null); var config = self.service.paginationConfig(self.operation); var resultKey = config.resultKey; if (Array.isArray(resultKey)) resultKey = resultKey[0]; var items = jmespath.search(data, resultKey); var continueIteration = true; AWS.util.arrayEach(items, function(item) { continueIteration = callback(null, item); if (continueIteration === false) { return AWS.util.abort; } }); return continueIteration; } this.eachPage(wrappedCallback); }, /** * @return [Boolean] whether the operation can return multiple pages of * response data. * @see AWS.Response.eachPage * @since v1.4.0 */ isPageable: function isPageable() { return this.service.paginationConfig(this.operation) ? true : false; }, /** * Sends the request and converts the request object into a readable stream * that can be read from or piped into a writable stream. * * @note The data read from a readable stream contains only * the raw HTTP body contents. * @example Manually reading from a stream * request.createReadStream().on('data', function(data) { * console.log("Got data:", data.toString()); * }); * @example Piping a request body into a file * var out = fs.createWriteStream('/path/to/outfile.jpg'); * s3.service.getObject(params).createReadStream().pipe(out); * @return [Stream] the readable stream object that can be piped * or read from (by registering 'data' event listeners). * @!macro nobrowser */ createReadStream: function createReadStream() { var streams = AWS.util.stream; var req = this; var stream = null; if (AWS.HttpClient.streamsApiVersion === 2) { stream = new streams.PassThrough(); process.nextTick(function() { req.send(); }); } else { stream = new streams.Stream(); stream.readable = true; stream.sent = false; stream.on('newListener', function(event) { if (!stream.sent && event === 'data') { stream.sent = true; process.nextTick(function() { req.send(); }); } }); } this.on('error', function(err) { stream.emit('error', err); }); this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) { if (statusCode < 300) { req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA); req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR); req.on('httpError', function streamHttpError(error) { resp.error = error; resp.error.retryable = false; }); var shouldCheckContentLength = false; var expectedLen; if (req.httpRequest.method !== 'HEAD') { expectedLen = parseInt(headers['content-length'], 10); } if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) { shouldCheckContentLength = true; var receivedLen = 0; } var checkContentLengthAndEmit = function checkContentLengthAndEmit() { if (shouldCheckContentLength && receivedLen !== expectedLen) { stream.emit('error', AWS.util.error( new Error('Stream content length mismatch. Received ' + receivedLen + ' of ' + expectedLen + ' bytes.'), { code: 'StreamContentLengthMismatch' } )); } else if (AWS.HttpClient.streamsApiVersion === 2) { stream.end(); } else { stream.emit('end'); } }; var httpStream = resp.httpResponse.createUnbufferedStream(); if (AWS.HttpClient.streamsApiVersion === 2) { if (shouldCheckContentLength) { var lengthAccumulator = new streams.PassThrough(); lengthAccumulator._write = function(chunk) { if (chunk && chunk.length) { receivedLen += chunk.length; } return streams.PassThrough.prototype._write.apply(this, arguments); }; lengthAccumulator.on('end', checkContentLengthAndEmit); stream.on('error', function(err) { shouldCheckContentLength = false; httpStream.unpipe(lengthAccumulator); lengthAccumulator.emit('end'); lengthAccumulator.end(); }); httpStream.pipe(lengthAccumulator).pipe(stream, { end: false }); } else { httpStream.pipe(stream); } } else { if (shouldCheckContentLength) { httpStream.on('data', function(arg) { if (arg && arg.length) { receivedLen += arg.length; } }); } httpStream.on('data', function(arg) { stream.emit('data', arg); }); httpStream.on('end', checkContentLengthAndEmit); } httpStream.on('error', function(err) { shouldCheckContentLength = false; stream.emit('error', err); }); } }); return stream; }, /** * @param [Array,Response] args This should be the response object, * or an array of args to send to the event. * @api private */ emitEvent: function emit(eventName, args, done) { if (typeof args === 'function') { done = args; args = null; } if (!done) done = function() { }; if (!args) args = this.eventParameters(eventName, this.response); var origEmit = AWS.SequentialExecutor.prototype.emit; origEmit.call(this, eventName, args, function (err) { if (err) this.response.error = err; done.call(this, err); }); }, /** * @api private */ eventParameters: function eventParameters(eventName) { switch (eventName) { case 'restart': case 'validate': case 'sign': case 'build': case 'afterValidate': case 'afterBuild': return [this]; case 'error': return [this.response.error, this.response]; default: return [this.response]; } }, /** * @api private */ presign: function presign(expires, callback) { if (!callback && typeof expires === 'function') { callback = expires; expires = null; } return new AWS.Signers.Presign().sign(this.toGet(), expires, callback); }, /** * @api private */ isPresigned: function isPresigned() { return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires'); }, /** * @api private */ toUnauthenticated: function toUnauthenticated() { this._unAuthenticated = true; this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS); this.removeListener('sign', AWS.EventListeners.Core.SIGN); return this; }, /** * @api private */ toGet: function toGet() { if (this.service.api.protocol === 'query' || this.service.api.protocol === 'ec2') { this.removeListener('build', this.buildAsGet); this.addListener('build', this.buildAsGet); } return this; }, /** * @api private */ buildAsGet: function buildAsGet(request) { request.httpRequest.method = 'GET'; request.httpRequest.path = request.service.endpoint.path + '?' + request.httpRequest.body; request.httpRequest.body = ''; // don't need these headers on a GET request delete request.httpRequest.headers['Content-Length']; delete request.httpRequest.headers['Content-Type']; }, /** * @api private */ haltHandlersOnError: function haltHandlersOnError() { this._haltHandlersOnError = true; } }); /** * @api private */ AWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) { this.prototype.promise = function promise() { var self = this; // append to user agent this.httpRequest.appendToUserAgent('promise'); return new PromiseDependency(function(resolve, reject) { self.on('complete', function(resp) { if (resp.error) { reject(resp.error); } else { // define $response property so that it is not enumerable // this prevents circular reference errors when stringifying the JSON object resolve(Object.defineProperty( resp.data || {}, '$response', {value: resp} )); } }); self.runTo(); }); }; }; /** * @api private */ AWS.Request.deletePromisesFromClass = function deletePromisesFromClass() { delete this.prototype.promise; }; AWS.util.addPromises(AWS.Request); AWS.util.mixin(AWS.Request, AWS.SequentialExecutor); /***/ }), /***/ 39925: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You * may not use this file except in compliance with the License. A copy of * the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "license" file accompanying this file. This file 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 AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; var jmespath = __webpack_require__(87783); /** * @api private */ function CHECK_ACCEPTORS(resp) { var waiter = resp.request._waiter; var acceptors = waiter.config.acceptors; var acceptorMatched = false; var state = 'retry'; acceptors.forEach(function(acceptor) { if (!acceptorMatched) { var matcher = waiter.matchers[acceptor.matcher]; if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) { acceptorMatched = true; state = acceptor.state; } } }); if (!acceptorMatched && resp.error) state = 'failure'; if (state === 'success') { waiter.setSuccess(resp); } else { waiter.setError(resp, state === 'retry'); } } /** * @api private */ AWS.ResourceWaiter = inherit({ /** * Waits for a given state on a service object * @param service [Service] the service object to wait on * @param state [String] the state (defined in waiter configuration) to wait * for. * @example Create a waiter for running EC2 instances * var ec2 = new AWS.EC2; * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning'); */ constructor: function constructor(service, state) { this.service = service; this.state = state; this.loadWaiterConfig(this.state); }, service: null, state: null, config: null, matchers: { path: function(resp, expected, argument) { try { var result = jmespath.search(resp.data, argument); } catch (err) { return false; } return jmespath.strictDeepEqual(result,expected); }, pathAll: function(resp, expected, argument) { try { var results = jmespath.search(resp.data, argument); } catch (err) { return false; } if (!Array.isArray(results)) results = [results]; var numResults = results.length; if (!numResults) return false; for (var ind = 0 ; ind < numResults; ind++) { if (!jmespath.strictDeepEqual(results[ind], expected)) { return false; } } return true; }, pathAny: function(resp, expected, argument) { try { var results = jmespath.search(resp.data, argument); } catch (err) { return false; } if (!Array.isArray(results)) results = [results]; var numResults = results.length; for (var ind = 0 ; ind < numResults; ind++) { if (jmespath.strictDeepEqual(results[ind], expected)) { return true; } } return false; }, status: function(resp, expected) { var statusCode = resp.httpResponse.statusCode; return (typeof statusCode === 'number') && (statusCode === expected); }, error: function(resp, expected) { if (typeof expected === 'string' && resp.error) { return expected === resp.error.code; } // if expected is not string, can be boolean indicating presence of error return expected === !!resp.error; } }, listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) { add('RETRY_CHECK', 'retry', function(resp) { var waiter = resp.request._waiter; if (resp.error && resp.error.code === 'ResourceNotReady') { resp.error.retryDelay = (waiter.config.delay || 0) * 1000; } }); add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS); add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS); }), /** * @return [AWS.Request] */ wait: function wait(params, callback) { if (typeof params === 'function') { callback = params; params = undefined; } if (params && params.$waiter) { params = AWS.util.copy(params); if (typeof params.$waiter.delay === 'number') { this.config.delay = params.$waiter.delay; } if (typeof params.$waiter.maxAttempts === 'number') { this.config.maxAttempts = params.$waiter.maxAttempts; } delete params.$waiter; } var request = this.service.makeRequest(this.config.operation, params); request._waiter = this; request.response.maxRetries = this.config.maxAttempts; request.addListeners(this.listeners); if (callback) request.send(callback); return request; }, setSuccess: function setSuccess(resp) { resp.error = null; resp.data = resp.data || {}; resp.request.removeAllListeners('extractData'); }, setError: function setError(resp, retryable) { resp.data = null; resp.error = AWS.util.error(resp.error || new Error(), { code: 'ResourceNotReady', message: 'Resource is not in the state ' + this.state, retryable: retryable }); }, /** * Loads waiter configuration from API configuration * * @api private */ loadWaiterConfig: function loadWaiterConfig(state) { if (!this.service.api.waiters[state]) { throw new AWS.util.error(new Error(), { code: 'StateNotFoundError', message: 'State ' + state + ' not found.' }); } this.config = AWS.util.copy(this.service.api.waiters[state]); } }); /***/ }), /***/ 58743: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; var jmespath = __webpack_require__(87783); /** * This class encapsulates the response information * from a service request operation sent through {AWS.Request}. * The response object has two main properties for getting information * back from a request: * * ## The `data` property * * The `response.data` property contains the serialized object data * retrieved from the service request. For instance, for an * Amazon DynamoDB `listTables` method call, the response data might * look like: * * ``` * > resp.data * { TableNames: * [ 'table1', 'table2', ... ] } * ``` * * The `data` property can be null if an error occurs (see below). * * ## The `error` property * * In the event of a service error (or transfer error), the * `response.error` property will be filled with the given * error data in the form: * * ``` * { code: 'SHORT_UNIQUE_ERROR_CODE', * message: 'Some human readable error message' } * ``` * * In the case of an error, the `data` property will be `null`. * Note that if you handle events that can be in a failure state, * you should always check whether `response.error` is set * before attempting to access the `response.data` property. * * @!attribute data * @readonly * @!group Data Properties * @note Inside of a {AWS.Request~httpData} event, this * property contains a single raw packet instead of the * full de-serialized service response. * @return [Object] the de-serialized response data * from the service. * * @!attribute error * An structure containing information about a service * or networking error. * @readonly * @!group Data Properties * @note This attribute is only filled if a service or * networking error occurs. * @return [Error] * * code [String] a unique short code representing the * error that was emitted. * * message [String] a longer human readable error message * * retryable [Boolean] whether the error message is * retryable. * * statusCode [Numeric] in the case of a request that reached the service, * this value contains the response status code. * * time [Date] the date time object when the error occurred. * * hostname [String] set when a networking error occurs to easily * identify the endpoint of the request. * * region [String] set when a networking error occurs to easily * identify the region of the request. * * @!attribute requestId * @readonly * @!group Data Properties * @return [String] the unique request ID associated with the response. * Log this value when debugging requests for AWS support. * * @!attribute retryCount * @readonly * @!group Operation Properties * @return [Integer] the number of retries that were * attempted before the request was completed. * * @!attribute redirectCount * @readonly * @!group Operation Properties * @return [Integer] the number of redirects that were * followed before the request was completed. * * @!attribute httpResponse * @readonly * @!group HTTP Properties * @return [AWS.HttpResponse] the raw HTTP response object * containing the response headers and body information * from the server. * * @see AWS.Request */ AWS.Response = inherit({ /** * @api private */ constructor: function Response(request) { this.request = request; this.data = null; this.error = null; this.retryCount = 0; this.redirectCount = 0; this.httpResponse = new AWS.HttpResponse(); if (request) { this.maxRetries = request.service.numRetries(); this.maxRedirects = request.service.config.maxRedirects; } }, /** * Creates a new request for the next page of response data, calling the * callback with the page data if a callback is provided. * * @callback callback function(err, data) * Called when a page of data is returned from the next request. * * @param err [Error] an error object, if an error occurred in the request * @param data [Object] the next page of data, or null, if there are no * more pages left. * @return [AWS.Request] the request object for the next page of data * @return [null] if no callback is provided and there are no pages left * to retrieve. * @since v1.4.0 */ nextPage: function nextPage(callback) { var config; var service = this.request.service; var operation = this.request.operation; try { config = service.paginationConfig(operation, true); } catch (e) { this.error = e; } if (!this.hasNextPage()) { if (callback) callback(this.error, null); else if (this.error) throw this.error; return null; } var params = AWS.util.copy(this.request.params); if (!this.nextPageTokens) { return callback ? callback(null, null) : null; } else { var inputTokens = config.inputToken; if (typeof inputTokens === 'string') inputTokens = [inputTokens]; for (var i = 0; i < inputTokens.length; i++) { params[inputTokens[i]] = this.nextPageTokens[i]; } return service.makeRequest(this.request.operation, params, callback); } }, /** * @return [Boolean] whether more pages of data can be returned by further * requests * @since v1.4.0 */ hasNextPage: function hasNextPage() { this.cacheNextPageTokens(); if (this.nextPageTokens) return true; if (this.nextPageTokens === undefined) return undefined; else return false; }, /** * @api private */ cacheNextPageTokens: function cacheNextPageTokens() { if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens; this.nextPageTokens = undefined; var config = this.request.service.paginationConfig(this.request.operation); if (!config) return this.nextPageTokens; this.nextPageTokens = null; if (config.moreResults) { if (!jmespath.search(this.data, config.moreResults)) { return this.nextPageTokens; } } var exprs = config.outputToken; if (typeof exprs === 'string') exprs = [exprs]; AWS.util.arrayEach.call(this, exprs, function (expr) { var output = jmespath.search(this.data, expr); if (output) { this.nextPageTokens = this.nextPageTokens || []; this.nextPageTokens.push(output); } }); return this.nextPageTokens; } }); /***/ }), /***/ 81600: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var byteLength = AWS.util.string.byteLength; var Buffer = AWS.util.Buffer; /** * The managed uploader allows for easy and efficient uploading of buffers, * blobs, or streams, using a configurable amount of concurrency to perform * multipart uploads where possible. This abstraction also enables uploading * streams of unknown size due to the use of multipart uploads. * * To construct a managed upload object, see the {constructor} function. * * ## Tracking upload progress * * The managed upload object can also track progress by attaching an * 'httpUploadProgress' listener to the upload manager. This event is similar * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more * information. * * ## Handling Multipart Cleanup * * By default, this class will automatically clean up any multipart uploads * when an individual part upload fails. This behavior can be disabled in order * to manually handle failures by setting the `leavePartsOnError` configuration * option to `true` when initializing the upload object. * * @!event httpUploadProgress(progress) * Triggered when the uploader has uploaded more data. * @note The `total` property may not be set if the stream being uploaded has * not yet finished chunking. In this case the `total` will be undefined * until the total stream size is known. * @note This event will not be emitted in Node.js 0.8.x. * @param progress [map] An object containing the `loaded` and `total` bytes * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload * size is known. * @context (see AWS.Request~send) */ AWS.S3.ManagedUpload = AWS.util.inherit({ /** * Creates a managed upload object with a set of configuration options. * * @note A "Body" parameter is required to be set prior to calling {send}. * @note In Node.js, sending "Body" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream} * may result in upload hangs. Using buffer stream is preferable. * @option options params [map] a map of parameters to pass to the upload * requests. The "Body" parameter is required to be specified either on * the service or in the params option. * @note ContentMD5 should not be provided when using the managed upload object. * Instead, setting "computeChecksums" to true will enable automatic ContentMD5 generation * by the managed upload object. * @option options queueSize [Number] (4) the size of the concurrent queue * manager to upload parts in parallel. Set to 1 for synchronous uploading * of parts. Note that the uploader will buffer at most queueSize * partSize * bytes into memory at any given time. * @option options partSize [Number] (5mb) the size in bytes for each * individual part to be uploaded. Adjust the part size to ensure the number * of parts does not exceed {maxTotalParts}. See {minPartSize} for the * minimum allowed part size. * @option options leavePartsOnError [Boolean] (false) whether to abort the * multipart upload if an error occurs. Set to true if you want to handle * failures manually. * @option options service [AWS.S3] an optional S3 service object to use for * requests. This object might have bound parameters used by the uploader. * @option options tags [Array] The tags to apply to the uploaded object. * Each tag should have a `Key` and `Value` keys. * @example Creating a default uploader for a stream object * var upload = new AWS.S3.ManagedUpload({ * params: {Bucket: 'bucket', Key: 'key', Body: stream} * }); * @example Creating an uploader with concurrency of 1 and partSize of 10mb * var upload = new AWS.S3.ManagedUpload({ * partSize: 10 * 1024 * 1024, queueSize: 1, * params: {Bucket: 'bucket', Key: 'key', Body: stream} * }); * @example Creating an uploader with tags * var upload = new AWS.S3.ManagedUpload({ * params: {Bucket: 'bucket', Key: 'key', Body: stream}, * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}] * }); * @see send */ constructor: function ManagedUpload(options) { var self = this; AWS.SequentialExecutor.call(self); self.body = null; self.sliceFn = null; self.callback = null; self.parts = {}; self.completeInfo = []; self.fillQueue = function() { self.callback(new Error('Unsupported body payload ' + typeof self.body)); }; self.configure(options); }, /** * @api private */ configure: function configure(options) { options = options || {}; this.partSize = this.minPartSize; if (options.queueSize) this.queueSize = options.queueSize; if (options.partSize) this.partSize = options.partSize; if (options.leavePartsOnError) this.leavePartsOnError = true; if (options.tags) { if (!Array.isArray(options.tags)) { throw new Error('Tags must be specified as an array; ' + typeof options.tags + ' provided.'); } this.tags = options.tags; } if (this.partSize < this.minPartSize) { throw new Error('partSize must be greater than ' + this.minPartSize); } this.service = options.service; this.bindServiceObject(options.params); this.validateBody(); this.adjustTotalBytes(); }, /** * @api private */ leavePartsOnError: false, /** * @api private */ queueSize: 4, /** * @api private */ partSize: null, /** * @readonly * @return [Number] the minimum number of bytes for an individual part * upload. */ minPartSize: 1024 * 1024 * 5, /** * @readonly * @return [Number] the maximum allowed number of parts in a multipart upload. */ maxTotalParts: 10000, /** * Initiates the managed upload for the payload. * * @callback callback function(err, data) * @param err [Error] an error or null if no error occurred. * @param data [map] The response data from the successful upload: * * `Location` (String) the URL of the uploaded object * * `ETag` (String) the ETag of the uploaded object * * `Bucket` (String) the bucket to which the object was uploaded * * `Key` (String) the key to which the object was uploaded * @example Sending a managed upload object * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; * var upload = new AWS.S3.ManagedUpload({params: params}); * upload.send(function(err, data) { * console.log(err, data); * }); */ send: function(callback) { var self = this; self.failed = false; self.callback = callback || function(err) { if (err) throw err; }; var runFill = true; if (self.sliceFn) { self.fillQueue = self.fillBuffer; } else if (AWS.util.isNode()) { var Stream = AWS.util.stream.Stream; if (self.body instanceof Stream) { runFill = false; self.fillQueue = self.fillStream; self.partBuffers = []; self.body. on('error', function(err) { self.cleanup(err); }). on('readable', function() { self.fillQueue(); }). on('end', function() { self.isDoneChunking = true; self.numParts = self.totalPartNumbers; self.fillQueue.call(self); if (self.isDoneChunking && self.totalPartNumbers >= 1 && self.doneParts === self.numParts) { self.finishMultiPart(); } }); } } if (runFill) self.fillQueue.call(self); }, /** * @!method promise() * Returns a 'thenable' promise. * * Two callbacks can be provided to the `then` method on the returned promise. * The first callback will be called if the promise is fulfilled, and the second * callback will be called if the promise is rejected. * @callback fulfilledCallback function(data) * Called if the promise is fulfilled. * @param data [map] The response data from the successful upload: * `Location` (String) the URL of the uploaded object * `ETag` (String) the ETag of the uploaded object * `Bucket` (String) the bucket to which the object was uploaded * `Key` (String) the key to which the object was uploaded * @callback rejectedCallback function(err) * Called if the promise is rejected. * @param err [Error] an error or null if no error occurred. * @return [Promise] A promise that represents the state of the upload request. * @example Sending an upload request using promises. * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream}); * var promise = upload.promise(); * promise.then(function(data) { ... }, function(err) { ... }); */ /** * Aborts a managed upload, including all concurrent upload requests. * @note By default, calling this function will cleanup a multipart upload * if one was created. To leave the multipart upload around after aborting * a request, configure `leavePartsOnError` to `true` in the {constructor}. * @note Calling {abort} in the browser environment will not abort any requests * that are already in flight. If a multipart upload was created, any parts * not yet uploaded will not be sent, and the multipart upload will be cleaned up. * @example Aborting an upload * var params = { * Bucket: 'bucket', Key: 'key', * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload * }; * var upload = s3.upload(params); * upload.send(function (err, data) { * if (err) console.log("Error:", err.code, err.message); * else console.log(data); * }); * * // abort request in 1 second * setTimeout(upload.abort.bind(upload), 1000); */ abort: function() { var self = this; //abort putObject request if (self.isDoneChunking === true && self.totalPartNumbers === 1 && self.singlePart) { self.singlePart.abort(); } else { self.cleanup(AWS.util.error(new Error('Request aborted by user'), { code: 'RequestAbortedError', retryable: false })); } }, /** * @api private */ validateBody: function validateBody() { var self = this; self.body = self.service.config.params.Body; if (typeof self.body === 'string') { self.body = AWS.util.buffer.toBuffer(self.body); } else if (!self.body) { throw new Error('params.Body is required'); } self.sliceFn = AWS.util.arraySliceFn(self.body); }, /** * @api private */ bindServiceObject: function bindServiceObject(params) { params = params || {}; var self = this; // bind parameters to new service object if (!self.service) { self.service = new AWS.S3({params: params}); } else { // Create a new S3 client from the supplied client's constructor. var service = self.service; var config = AWS.util.copy(service.config); config.signatureVersion = service.getSignatureVersion(); self.service = new service.constructor.__super__(config); self.service.config.params = AWS.util.merge(self.service.config.params || {}, params); Object.defineProperty(self.service, '_originalConfig', { get: function() { return service._originalConfig; }, enumerable: false, configurable: true }); } }, /** * @api private */ adjustTotalBytes: function adjustTotalBytes() { var self = this; try { // try to get totalBytes self.totalBytes = byteLength(self.body); } catch (e) { } // try to adjust partSize if we know payload length if (self.totalBytes) { var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts); if (newPartSize > self.partSize) self.partSize = newPartSize; } else { self.totalBytes = undefined; } }, /** * @api private */ isDoneChunking: false, /** * @api private */ partPos: 0, /** * @api private */ totalChunkedBytes: 0, /** * @api private */ totalUploadedBytes: 0, /** * @api private */ totalBytes: undefined, /** * @api private */ numParts: 0, /** * @api private */ totalPartNumbers: 0, /** * @api private */ activeParts: 0, /** * @api private */ doneParts: 0, /** * @api private */ parts: null, /** * @api private */ completeInfo: null, /** * @api private */ failed: false, /** * @api private */ multipartReq: null, /** * @api private */ partBuffers: null, /** * @api private */ partBufferLength: 0, /** * @api private */ fillBuffer: function fillBuffer() { var self = this; var bodyLen = byteLength(self.body); if (bodyLen === 0) { self.isDoneChunking = true; self.numParts = 1; self.nextChunk(self.body); return; } while (self.activeParts < self.queueSize && self.partPos < bodyLen) { var endPos = Math.min(self.partPos + self.partSize, bodyLen); var buf = self.sliceFn.call(self.body, self.partPos, endPos); self.partPos += self.partSize; if (byteLength(buf) < self.partSize || self.partPos === bodyLen) { self.isDoneChunking = true; self.numParts = self.totalPartNumbers + 1; } self.nextChunk(buf); } }, /** * @api private */ fillStream: function fillStream() { var self = this; if (self.activeParts >= self.queueSize) return; var buf = self.body.read(self.partSize - self.partBufferLength) || self.body.read(); if (buf) { self.partBuffers.push(buf); self.partBufferLength += buf.length; self.totalChunkedBytes += buf.length; } if (self.partBufferLength >= self.partSize) { // if we have single buffer we avoid copyfull concat var pbuf = self.partBuffers.length === 1 ? self.partBuffers[0] : Buffer.concat(self.partBuffers); self.partBuffers = []; self.partBufferLength = 0; // if we have more than partSize, push the rest back on the queue if (pbuf.length > self.partSize) { var rest = pbuf.slice(self.partSize); self.partBuffers.push(rest); self.partBufferLength += rest.length; pbuf = pbuf.slice(0, self.partSize); } self.nextChunk(pbuf); } if (self.isDoneChunking && !self.isDoneSending) { // if we have single buffer we avoid copyfull concat pbuf = self.partBuffers.length === 1 ? self.partBuffers[0] : Buffer.concat(self.partBuffers); self.partBuffers = []; self.partBufferLength = 0; self.totalBytes = self.totalChunkedBytes; self.isDoneSending = true; if (self.numParts === 0 || pbuf.length > 0) { self.numParts++; self.nextChunk(pbuf); } } self.body.read(0); }, /** * @api private */ nextChunk: function nextChunk(chunk) { var self = this; if (self.failed) return null; var partNumber = ++self.totalPartNumbers; if (self.isDoneChunking && partNumber === 1) { var params = {Body: chunk}; if (this.tags) { params.Tagging = this.getTaggingHeader(); } var req = self.service.putObject(params); req._managedUpload = self; req.on('httpUploadProgress', self.progress).send(self.finishSinglePart); self.singlePart = req; //save the single part request return null; } else if (self.service.config.params.ContentMD5) { var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), { code: 'InvalidDigest', retryable: false }); self.cleanup(err); return null; } if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) { return null; // Already uploaded this part. } self.activeParts++; if (!self.service.config.params.UploadId) { if (!self.multipartReq) { // create multipart self.multipartReq = self.service.createMultipartUpload(); self.multipartReq.on('success', function(resp) { self.service.config.params.UploadId = resp.data.UploadId; self.multipartReq = null; }); self.queueChunks(chunk, partNumber); self.multipartReq.on('error', function(err) { self.cleanup(err); }); self.multipartReq.send(); } else { self.queueChunks(chunk, partNumber); } } else { // multipart is created, just send self.uploadPart(chunk, partNumber); } }, /** * @api private */ getTaggingHeader: function getTaggingHeader() { var kvPairStrings = []; for (var i = 0; i < this.tags.length; i++) { kvPairStrings.push(AWS.util.uriEscape(this.tags[i].Key) + '=' + AWS.util.uriEscape(this.tags[i].Value)); } return kvPairStrings.join('&'); }, /** * @api private */ uploadPart: function uploadPart(chunk, partNumber) { var self = this; var partParams = { Body: chunk, ContentLength: AWS.util.string.byteLength(chunk), PartNumber: partNumber }; var partInfo = {ETag: null, PartNumber: partNumber}; self.completeInfo[partNumber] = partInfo; var req = self.service.uploadPart(partParams); self.parts[partNumber] = req; req._lastUploadedBytes = 0; req._managedUpload = self; req.on('httpUploadProgress', self.progress); req.send(function(err, data) { delete self.parts[partParams.PartNumber]; self.activeParts--; if (!err && (!data || !data.ETag)) { var message = 'No access to ETag property on response.'; if (AWS.util.isBrowser()) { message += ' Check CORS configuration to expose ETag header.'; } err = AWS.util.error(new Error(message), { code: 'ETagMissing', retryable: false }); } if (err) return self.cleanup(err); //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304) if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) return null; partInfo.ETag = data.ETag; self.doneParts++; if (self.isDoneChunking && self.doneParts === self.numParts) { self.finishMultiPart(); } else { self.fillQueue.call(self); } }); }, /** * @api private */ queueChunks: function queueChunks(chunk, partNumber) { var self = this; self.multipartReq.on('success', function() { self.uploadPart(chunk, partNumber); }); }, /** * @api private */ cleanup: function cleanup(err) { var self = this; if (self.failed) return; // clean up stream if (typeof self.body.removeAllListeners === 'function' && typeof self.body.resume === 'function') { self.body.removeAllListeners('readable'); self.body.removeAllListeners('end'); self.body.resume(); } // cleanup multipartReq listeners if (self.multipartReq) { self.multipartReq.removeAllListeners('success'); self.multipartReq.removeAllListeners('error'); self.multipartReq.removeAllListeners('complete'); delete self.multipartReq; } if (self.service.config.params.UploadId && !self.leavePartsOnError) { self.service.abortMultipartUpload().send(); } else if (self.leavePartsOnError) { self.isDoneChunking = false; } AWS.util.each(self.parts, function(partNumber, part) { part.removeAllListeners('complete'); part.abort(); }); self.activeParts = 0; self.partPos = 0; self.numParts = 0; self.totalPartNumbers = 0; self.parts = {}; self.failed = true; self.callback(err); }, /** * @api private */ finishMultiPart: function finishMultiPart() { var self = this; var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } }; self.service.completeMultipartUpload(completeParams, function(err, data) { if (err) { return self.cleanup(err); } if (data && typeof data.Location === 'string') { data.Location = data.Location.replace(/%2F/g, '/'); } if (Array.isArray(self.tags)) { for (var i = 0; i < self.tags.length; i++) { self.tags[i].Value = String(self.tags[i].Value); } self.service.putObjectTagging( {Tagging: {TagSet: self.tags}}, function(e, d) { if (e) { self.callback(e); } else { self.callback(e, data); } } ); } else { self.callback(err, data); } }); }, /** * @api private */ finishSinglePart: function finishSinglePart(err, data) { var upload = this.request._managedUpload; var httpReq = this.request.httpRequest; var endpoint = httpReq.endpoint; if (err) return upload.callback(err); data.Location = [endpoint.protocol, '//', endpoint.host, httpReq.path].join(''); data.key = this.request.params.Key; // will stay undocumented data.Key = this.request.params.Key; data.Bucket = this.request.params.Bucket; upload.callback(err, data); }, /** * @api private */ progress: function progress(info) { var upload = this._managedUpload; if (this.operation === 'putObject') { info.part = 1; info.key = this.params.Key; } else { upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes; this._lastUploadedBytes = info.loaded; info = { loaded: upload.totalUploadedBytes, total: upload.totalBytes, part: this.params.PartNumber, key: this.params.Key }; } upload.emit('httpUploadProgress', [info]); } }); AWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor); /** * @api private */ AWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) { this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency); }; /** * @api private */ AWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() { delete this.prototype.promise; }; AWS.util.addPromises(AWS.S3.ManagedUpload); /** * @api private */ module.exports = AWS.S3.ManagedUpload; /***/ }), /***/ 55948: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * @api private * @!method on(eventName, callback) * Registers an event listener callback for the event given by `eventName`. * Parameters passed to the callback function depend on the individual event * being triggered. See the event documentation for those parameters. * * @param eventName [String] the event name to register the listener for * @param callback [Function] the listener callback function * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true. * Default to be false. * @return [AWS.SequentialExecutor] the same object for chaining */ AWS.SequentialExecutor = AWS.util.inherit({ constructor: function SequentialExecutor() { this._events = {}; }, /** * @api private */ listeners: function listeners(eventName) { return this._events[eventName] ? this._events[eventName].slice(0) : []; }, on: function on(eventName, listener, toHead) { if (this._events[eventName]) { toHead ? this._events[eventName].unshift(listener) : this._events[eventName].push(listener); } else { this._events[eventName] = [listener]; } return this; }, onAsync: function onAsync(eventName, listener, toHead) { listener._isAsync = true; return this.on(eventName, listener, toHead); }, removeListener: function removeListener(eventName, listener) { var listeners = this._events[eventName]; if (listeners) { var length = listeners.length; var position = -1; for (var i = 0; i < length; ++i) { if (listeners[i] === listener) { position = i; } } if (position > -1) { listeners.splice(position, 1); } } return this; }, removeAllListeners: function removeAllListeners(eventName) { if (eventName) { delete this._events[eventName]; } else { this._events = {}; } return this; }, /** * @api private */ emit: function emit(eventName, eventArgs, doneCallback) { if (!doneCallback) doneCallback = function() { }; var listeners = this.listeners(eventName); var count = listeners.length; this.callListeners(listeners, eventArgs, doneCallback); return count > 0; }, /** * @api private */ callListeners: function callListeners(listeners, args, doneCallback, prevError) { var self = this; var error = prevError || null; function callNextListener(err) { if (err) { error = AWS.util.error(error || new Error(), err); if (self._haltHandlersOnError) { return doneCallback.call(self, error); } } self.callListeners(listeners, args, doneCallback, error); } while (listeners.length > 0) { var listener = listeners.shift(); if (listener._isAsync) { // asynchronous listener listener.apply(self, args.concat([callNextListener])); return; // stop here, callNextListener will continue } else { // synchronous listener try { listener.apply(self, args); } catch (err) { error = AWS.util.error(error || new Error(), err); } if (error && self._haltHandlersOnError) { doneCallback.call(self, error); return; } } } doneCallback.call(self, error); }, /** * Adds or copies a set of listeners from another list of * listeners or SequentialExecutor object. * * @param listeners [map>, AWS.SequentialExecutor] * a list of events and callbacks, or an event emitter object * containing listeners to add to this emitter object. * @return [AWS.SequentialExecutor] the emitter object, for chaining. * @example Adding listeners from a map of listeners * emitter.addListeners({ * event1: [function() { ... }, function() { ... }], * event2: [function() { ... }] * }); * emitter.emit('event1'); // emitter has event1 * emitter.emit('event2'); // emitter has event2 * @example Adding listeners from another emitter object * var emitter1 = new AWS.SequentialExecutor(); * emitter1.on('event1', function() { ... }); * emitter1.on('event2', function() { ... }); * var emitter2 = new AWS.SequentialExecutor(); * emitter2.addListeners(emitter1); * emitter2.emit('event1'); // emitter2 has event1 * emitter2.emit('event2'); // emitter2 has event2 */ addListeners: function addListeners(listeners) { var self = this; // extract listeners if parameter is an SequentialExecutor object if (listeners._events) listeners = listeners._events; AWS.util.each(listeners, function(event, callbacks) { if (typeof callbacks === 'function') callbacks = [callbacks]; AWS.util.arrayEach(callbacks, function(callback) { self.on(event, callback); }); }); return self; }, /** * Registers an event with {on} and saves the callback handle function * as a property on the emitter object using a given `name`. * * @param name [String] the property name to set on this object containing * the callback function handle so that the listener can be removed in * the future. * @param (see on) * @return (see on) * @example Adding a named listener DATA_CALLBACK * var listener = function() { doSomething(); }; * emitter.addNamedListener('DATA_CALLBACK', 'data', listener); * * // the following prints: true * console.log(emitter.DATA_CALLBACK == listener); */ addNamedListener: function addNamedListener(name, eventName, callback, toHead) { this[name] = callback; this.addListener(eventName, callback, toHead); return this; }, /** * @api private */ addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback, toHead) { callback._isAsync = true; return this.addNamedListener(name, eventName, callback, toHead); }, /** * Helper method to add a set of named listeners using * {addNamedListener}. The callback contains a parameter * with a handle to the `addNamedListener` method. * * @callback callback function(add) * The callback function is called immediately in order to provide * the `add` function to the block. This simplifies the addition of * a large group of named listeners. * @param add [Function] the {addNamedListener} function to call * when registering listeners. * @example Adding a set of named listeners * emitter.addNamedListeners(function(add) { * add('DATA_CALLBACK', 'data', function() { ... }); * add('OTHER', 'otherEvent', function() { ... }); * add('LAST', 'lastEvent', function() { ... }); * }); * * // these properties are now set: * emitter.DATA_CALLBACK; * emitter.OTHER; * emitter.LAST; */ addNamedListeners: function addNamedListeners(callback) { var self = this; callback( function() { self.addNamedListener.apply(self, arguments); }, function() { self.addNamedAsyncListener.apply(self, arguments); } ); return this; } }); /** * {on} is the prefered method. * @api private */ AWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on; /** * @api private */ module.exports = AWS.SequentialExecutor; /***/ }), /***/ 68903: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var Api = __webpack_require__(17657); var regionConfig = __webpack_require__(18262); var inherit = AWS.util.inherit; var clientCount = 0; /** * The service class representing an AWS service. * * @class_abstract This class is an abstract class. * * @!attribute apiVersions * @return [Array] the list of API versions supported by this service. * @readonly */ AWS.Service = inherit({ /** * Create a new service object with a configuration object * * @param config [map] a map of configuration options */ constructor: function Service(config) { if (!this.loadServiceClass) { throw AWS.util.error(new Error(), 'Service must be constructed with `new\' operator'); } var ServiceClass = this.loadServiceClass(config || {}); if (ServiceClass) { var originalConfig = AWS.util.copy(config); var svc = new ServiceClass(config); Object.defineProperty(svc, '_originalConfig', { get: function() { return originalConfig; }, enumerable: false, configurable: true }); svc._clientId = ++clientCount; return svc; } this.initialize(config); }, /** * @api private */ initialize: function initialize(config) { var svcConfig = AWS.config[this.serviceIdentifier]; this.config = new AWS.Config(AWS.config); if (svcConfig) this.config.update(svcConfig, true); if (config) this.config.update(config, true); this.validateService(); if (!this.config.endpoint) regionConfig.configureEndpoint(this); this.config.endpoint = this.endpointFromTemplate(this.config.endpoint); this.setEndpoint(this.config.endpoint); //enable attaching listeners to service client AWS.SequentialExecutor.call(this); AWS.Service.addDefaultMonitoringListeners(this); if ((this.config.clientSideMonitoring || AWS.Service._clientSideMonitoring) && this.publisher) { var publisher = this.publisher; this.addNamedListener('PUBLISH_API_CALL', 'apiCall', function PUBLISH_API_CALL(event) { process.nextTick(function() {publisher.eventHandler(event);}); }); this.addNamedListener('PUBLISH_API_ATTEMPT', 'apiCallAttempt', function PUBLISH_API_ATTEMPT(event) { process.nextTick(function() {publisher.eventHandler(event);}); }); } }, /** * @api private */ validateService: function validateService() { }, /** * @api private */ loadServiceClass: function loadServiceClass(serviceConfig) { var config = serviceConfig; if (!AWS.util.isEmpty(this.api)) { return null; } else if (config.apiConfig) { return AWS.Service.defineServiceApi(this.constructor, config.apiConfig); } else if (!this.constructor.services) { return null; } else { config = new AWS.Config(AWS.config); config.update(serviceConfig, true); var version = config.apiVersions[this.constructor.serviceIdentifier]; version = version || config.apiVersion; return this.getLatestServiceClass(version); } }, /** * @api private */ getLatestServiceClass: function getLatestServiceClass(version) { version = this.getLatestServiceVersion(version); if (this.constructor.services[version] === null) { AWS.Service.defineServiceApi(this.constructor, version); } return this.constructor.services[version]; }, /** * @api private */ getLatestServiceVersion: function getLatestServiceVersion(version) { if (!this.constructor.services || this.constructor.services.length === 0) { throw new Error('No services defined on ' + this.constructor.serviceIdentifier); } if (!version) { version = 'latest'; } else if (AWS.util.isType(version, Date)) { version = AWS.util.date.iso8601(version).split('T')[0]; } if (Object.hasOwnProperty(this.constructor.services, version)) { return version; } var keys = Object.keys(this.constructor.services).sort(); var selectedVersion = null; for (var i = keys.length - 1; i >= 0; i--) { // versions that end in "*" are not available on disk and can be // skipped, so do not choose these as selectedVersions if (keys[i][keys[i].length - 1] !== '*') { selectedVersion = keys[i]; } if (keys[i].substr(0, 10) <= version) { return selectedVersion; } } throw new Error('Could not find ' + this.constructor.serviceIdentifier + ' API to satisfy version constraint `' + version + '\''); }, /** * @api private */ api: {}, /** * @api private */ defaultRetryCount: 3, /** * @api private */ customizeRequests: function customizeRequests(callback) { if (!callback) { this.customRequestHandler = null; } else if (typeof callback === 'function') { this.customRequestHandler = callback; } else { throw new Error('Invalid callback type \'' + typeof callback + '\' provided in customizeRequests'); } }, /** * Calls an operation on a service with the given input parameters. * * @param operation [String] the name of the operation to call on the service. * @param params [map] a map of input options for the operation * @callback callback function(err, data) * If a callback is supplied, it is called when a response is returned * from the service. * @param err [Error] the error object returned from the request. * Set to `null` if the request is successful. * @param data [Object] the de-serialized data returned from * the request. Set to `null` if a request error occurs. */ makeRequest: function makeRequest(operation, params, callback) { if (typeof params === 'function') { callback = params; params = null; } params = params || {}; if (this.config.params) { // copy only toplevel bound params var rules = this.api.operations[operation]; if (rules) { params = AWS.util.copy(params); AWS.util.each(this.config.params, function(key, value) { if (rules.input.members[key]) { if (params[key] === undefined || params[key] === null) { params[key] = value; } } }); } } var request = new AWS.Request(this, operation, params); this.addAllRequestListeners(request); this.attachMonitoringEmitter(request); if (callback) request.send(callback); return request; }, /** * Calls an operation on a service with the given input parameters, without * any authentication data. This method is useful for "public" API operations. * * @param operation [String] the name of the operation to call on the service. * @param params [map] a map of input options for the operation * @callback callback function(err, data) * If a callback is supplied, it is called when a response is returned * from the service. * @param err [Error] the error object returned from the request. * Set to `null` if the request is successful. * @param data [Object] the de-serialized data returned from * the request. Set to `null` if a request error occurs. */ makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) { if (typeof params === 'function') { callback = params; params = {}; } var request = this.makeRequest(operation, params).toUnauthenticated(); return callback ? request.send(callback) : request; }, /** * Waits for a given state * * @param state [String] the state on the service to wait for * @param params [map] a map of parameters to pass with each request * @option params $waiter [map] a map of configuration options for the waiter * @option params $waiter.delay [Number] The number of seconds to wait between * requests * @option params $waiter.maxAttempts [Number] The maximum number of requests * to send while waiting * @callback callback function(err, data) * If a callback is supplied, it is called when a response is returned * from the service. * @param err [Error] the error object returned from the request. * Set to `null` if the request is successful. * @param data [Object] the de-serialized data returned from * the request. Set to `null` if a request error occurs. */ waitFor: function waitFor(state, params, callback) { var waiter = new AWS.ResourceWaiter(this, state); return waiter.wait(params, callback); }, /** * @api private */ addAllRequestListeners: function addAllRequestListeners(request) { var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(), AWS.EventListeners.CorePost]; for (var i = 0; i < list.length; i++) { if (list[i]) request.addListeners(list[i]); } // disable parameter validation if (!this.config.paramValidation) { request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); } if (this.config.logger) { // add logging events request.addListeners(AWS.EventListeners.Logger); } this.setupRequestListeners(request); // call prototype's customRequestHandler if (typeof this.constructor.prototype.customRequestHandler === 'function') { this.constructor.prototype.customRequestHandler(request); } // call instance's customRequestHandler if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') { this.customRequestHandler(request); } }, /** * Event recording metrics for a whole API call. * @returns {object} a subset of api call metrics * @api private */ apiCallEvent: function apiCallEvent(request) { var api = request.service.api.operations[request.operation]; var monitoringEvent = { Type: 'ApiCall', Api: api ? api.name : request.operation, Version: 1, Service: request.service.api.serviceId || request.service.api.endpointPrefix, Region: request.httpRequest.region, MaxRetriesExceeded: 0, UserAgent: request.httpRequest.getUserAgent(), }; var response = request.response; if (response.httpResponse.statusCode) { monitoringEvent.FinalHttpStatusCode = response.httpResponse.statusCode; } if (response.error) { var error = response.error; var statusCode = response.httpResponse.statusCode; if (statusCode > 299) { if (error.code) monitoringEvent.FinalAwsException = error.code; if (error.message) monitoringEvent.FinalAwsExceptionMessage = error.message; } else { if (error.code || error.name) monitoringEvent.FinalSdkException = error.code || error.name; if (error.message) monitoringEvent.FinalSdkExceptionMessage = error.message; } } return monitoringEvent; }, /** * Event recording metrics for an API call attempt. * @returns {object} a subset of api call attempt metrics * @api private */ apiAttemptEvent: function apiAttemptEvent(request) { var api = request.service.api.operations[request.operation]; var monitoringEvent = { Type: 'ApiCallAttempt', Api: api ? api.name : request.operation, Version: 1, Service: request.service.api.serviceId || request.service.api.endpointPrefix, Fqdn: request.httpRequest.endpoint.hostname, UserAgent: request.httpRequest.getUserAgent(), }; var response = request.response; if (response.httpResponse.statusCode) { monitoringEvent.HttpStatusCode = response.httpResponse.statusCode; } if ( !request._unAuthenticated && request.service.config.credentials && request.service.config.credentials.accessKeyId ) { monitoringEvent.AccessKey = request.service.config.credentials.accessKeyId; } if (!response.httpResponse.headers) return monitoringEvent; if (request.httpRequest.headers['x-amz-security-token']) { monitoringEvent.SessionToken = request.httpRequest.headers['x-amz-security-token']; } if (response.httpResponse.headers['x-amzn-requestid']) { monitoringEvent.XAmznRequestId = response.httpResponse.headers['x-amzn-requestid']; } if (response.httpResponse.headers['x-amz-request-id']) { monitoringEvent.XAmzRequestId = response.httpResponse.headers['x-amz-request-id']; } if (response.httpResponse.headers['x-amz-id-2']) { monitoringEvent.XAmzId2 = response.httpResponse.headers['x-amz-id-2']; } return monitoringEvent; }, /** * Add metrics of failed request. * @api private */ attemptFailEvent: function attemptFailEvent(request) { var monitoringEvent = this.apiAttemptEvent(request); var response = request.response; var error = response.error; if (response.httpResponse.statusCode > 299 ) { if (error.code) monitoringEvent.AwsException = error.code; if (error.message) monitoringEvent.AwsExceptionMessage = error.message; } else { if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name; if (error.message) monitoringEvent.SdkExceptionMessage = error.message; } return monitoringEvent; }, /** * Attach listeners to request object to fetch metrics of each request * and emit data object through \'ApiCall\' and \'ApiCallAttempt\' events. * @api private */ attachMonitoringEmitter: function attachMonitoringEmitter(request) { var attemptTimestamp; //timestamp marking the beginning of a request attempt var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency var attemptLatency; //latency from request sent out to http response reaching SDK var callStartRealTime; //Start time of API call. Used to calculating API call latency var attemptCount = 0; //request.retryCount is not reliable here var region; //region cache region for each attempt since it can be updated in plase (e.g. s3) var callTimestamp; //timestamp when the request is created var self = this; var addToHead = true; request.on('validate', function () { callStartRealTime = AWS.util.realClock.now(); callTimestamp = Date.now(); }, addToHead); request.on('sign', function () { attemptStartRealTime = AWS.util.realClock.now(); attemptTimestamp = Date.now(); region = request.httpRequest.region; attemptCount++; }, addToHead); request.on('validateResponse', function() { attemptLatency = Math.round(AWS.util.realClock.now() - attemptStartRealTime); }); request.addNamedListener('API_CALL_ATTEMPT', 'success', function API_CALL_ATTEMPT() { var apiAttemptEvent = self.apiAttemptEvent(request); apiAttemptEvent.Timestamp = attemptTimestamp; apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0; apiAttemptEvent.Region = region; self.emit('apiCallAttempt', [apiAttemptEvent]); }); request.addNamedListener('API_CALL_ATTEMPT_RETRY', 'retry', function API_CALL_ATTEMPT_RETRY() { var apiAttemptEvent = self.attemptFailEvent(request); apiAttemptEvent.Timestamp = attemptTimestamp; //attemptLatency may not be available if fail before response attemptLatency = attemptLatency || Math.round(AWS.util.realClock.now() - attemptStartRealTime); apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0; apiAttemptEvent.Region = region; self.emit('apiCallAttempt', [apiAttemptEvent]); }); request.addNamedListener('API_CALL', 'complete', function API_CALL() { var apiCallEvent = self.apiCallEvent(request); apiCallEvent.AttemptCount = attemptCount; if (apiCallEvent.AttemptCount <= 0) return; apiCallEvent.Timestamp = callTimestamp; var latency = Math.round(AWS.util.realClock.now() - callStartRealTime); apiCallEvent.Latency = latency >= 0 ? latency : 0; var response = request.response; if ( response.error && response.error.retryable && typeof response.retryCount === 'number' && typeof response.maxRetries === 'number' && (response.retryCount >= response.maxRetries) ) { apiCallEvent.MaxRetriesExceeded = 1; } self.emit('apiCall', [apiCallEvent]); }); }, /** * Override this method to setup any custom request listeners for each * new request to the service. * * @method_abstract This is an abstract method. */ setupRequestListeners: function setupRequestListeners(request) { }, /** * Gets the signing name for a given request * @api private */ getSigningName: function getSigningName() { return this.api.signingName || this.api.endpointPrefix; }, /** * Gets the signer class for a given request * @api private */ getSignerClass: function getSignerClass(request) { var version; // get operation authtype if present var operation = null; var authtype = ''; if (request) { var operations = request.service.api.operations || {}; operation = operations[request.operation] || null; authtype = operation ? operation.authtype : ''; } if (this.config.signatureVersion) { version = this.config.signatureVersion; } else if (authtype === 'v4' || authtype === 'v4-unsigned-body') { version = 'v4'; } else { version = this.api.signatureVersion; } return AWS.Signers.RequestSigner.getVersion(version); }, /** * @api private */ serviceInterface: function serviceInterface() { switch (this.api.protocol) { case 'ec2': return AWS.EventListeners.Query; case 'query': return AWS.EventListeners.Query; case 'json': return AWS.EventListeners.Json; case 'rest-json': return AWS.EventListeners.RestJson; case 'rest-xml': return AWS.EventListeners.RestXml; } if (this.api.protocol) { throw new Error('Invalid service `protocol\' ' + this.api.protocol + ' in API config'); } }, /** * @api private */ successfulResponse: function successfulResponse(resp) { return resp.httpResponse.statusCode < 300; }, /** * How many times a failed request should be retried before giving up. * the defaultRetryCount can be overriden by service classes. * * @api private */ numRetries: function numRetries() { if (this.config.maxRetries !== undefined) { return this.config.maxRetries; } else { return this.defaultRetryCount; } }, /** * @api private */ retryDelays: function retryDelays(retryCount, err) { return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions, err); }, /** * @api private */ retryableError: function retryableError(error) { if (this.timeoutError(error)) return true; if (this.networkingError(error)) return true; if (this.expiredCredentialsError(error)) return true; if (this.throttledError(error)) return true; if (error.statusCode >= 500) return true; return false; }, /** * @api private */ networkingError: function networkingError(error) { return error.code === 'NetworkingError'; }, /** * @api private */ timeoutError: function timeoutError(error) { return error.code === 'TimeoutError'; }, /** * @api private */ expiredCredentialsError: function expiredCredentialsError(error) { // TODO : this only handles *one* of the expired credential codes return (error.code === 'ExpiredTokenException'); }, /** * @api private */ clockSkewError: function clockSkewError(error) { switch (error.code) { case 'RequestTimeTooSkewed': case 'RequestExpired': case 'InvalidSignatureException': case 'SignatureDoesNotMatch': case 'AuthFailure': case 'RequestInTheFuture': return true; default: return false; } }, /** * @api private */ getSkewCorrectedDate: function getSkewCorrectedDate() { return new Date(Date.now() + this.config.systemClockOffset); }, /** * @api private */ applyClockOffset: function applyClockOffset(newServerTime) { if (newServerTime) { this.config.systemClockOffset = newServerTime - Date.now(); } }, /** * @api private */ isClockSkewed: function isClockSkewed(newServerTime) { if (newServerTime) { return Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= 300000; } }, /** * @api private */ throttledError: function throttledError(error) { // this logic varies between services if (error.statusCode === 429) return true; switch (error.code) { case 'ProvisionedThroughputExceededException': case 'Throttling': case 'ThrottlingException': case 'RequestLimitExceeded': case 'RequestThrottled': case 'RequestThrottledException': case 'TooManyRequestsException': case 'TransactionInProgressException': //dynamodb case 'EC2ThrottledException': return true; default: return false; } }, /** * @api private */ endpointFromTemplate: function endpointFromTemplate(endpoint) { if (typeof endpoint !== 'string') return endpoint; var e = endpoint; e = e.replace(/\{service\}/g, this.api.endpointPrefix); e = e.replace(/\{region\}/g, this.config.region); e = e.replace(/\{scheme\}/g, this.config.sslEnabled ? 'https' : 'http'); return e; }, /** * @api private */ setEndpoint: function setEndpoint(endpoint) { this.endpoint = new AWS.Endpoint(endpoint, this.config); }, /** * @api private */ paginationConfig: function paginationConfig(operation, throwException) { var paginator = this.api.operations[operation].paginator; if (!paginator) { if (throwException) { var e = new Error(); throw AWS.util.error(e, 'No pagination configuration for ' + operation); } return null; } return paginator; } }); AWS.util.update(AWS.Service, { /** * Adds one method for each operation described in the api configuration * * @api private */ defineMethods: function defineMethods(svc) { AWS.util.each(svc.prototype.api.operations, function iterator(method) { if (svc.prototype[method]) return; var operation = svc.prototype.api.operations[method]; if (operation.authtype === 'none') { svc.prototype[method] = function (params, callback) { return this.makeUnauthenticatedRequest(method, params, callback); }; } else { svc.prototype[method] = function (params, callback) { return this.makeRequest(method, params, callback); }; } }); }, /** * Defines a new Service class using a service identifier and list of versions * including an optional set of features (functions) to apply to the class * prototype. * * @param serviceIdentifier [String] the identifier for the service * @param versions [Array] a list of versions that work with this * service * @param features [Object] an object to attach to the prototype * @return [Class] the service class defined by this function. */ defineService: function defineService(serviceIdentifier, versions, features) { AWS.Service._serviceMap[serviceIdentifier] = true; if (!Array.isArray(versions)) { features = versions; versions = []; } var svc = inherit(AWS.Service, features || {}); if (typeof serviceIdentifier === 'string') { AWS.Service.addVersions(svc, versions); var identifier = svc.serviceIdentifier || serviceIdentifier; svc.serviceIdentifier = identifier; } else { // defineService called with an API svc.prototype.api = serviceIdentifier; AWS.Service.defineMethods(svc); } AWS.SequentialExecutor.call(this.prototype); //util.clientSideMonitoring is only available in node if (!this.prototype.publisher && AWS.util.clientSideMonitoring) { var Publisher = AWS.util.clientSideMonitoring.Publisher; var configProvider = AWS.util.clientSideMonitoring.configProvider; var publisherConfig = configProvider(); this.prototype.publisher = new Publisher(publisherConfig); if (publisherConfig.enabled) { //if csm is enabled in environment, SDK should send all metrics AWS.Service._clientSideMonitoring = true; } } AWS.SequentialExecutor.call(svc.prototype); AWS.Service.addDefaultMonitoringListeners(svc.prototype); return svc; }, /** * @api private */ addVersions: function addVersions(svc, versions) { if (!Array.isArray(versions)) versions = [versions]; svc.services = svc.services || {}; for (var i = 0; i < versions.length; i++) { if (svc.services[versions[i]] === undefined) { svc.services[versions[i]] = null; } } svc.apiVersions = Object.keys(svc.services).sort(); }, /** * @api private */ defineServiceApi: function defineServiceApi(superclass, version, apiConfig) { var svc = inherit(superclass, { serviceIdentifier: superclass.serviceIdentifier }); function setApi(api) { if (api.isApi) { svc.prototype.api = api; } else { svc.prototype.api = new Api(api, { serviceIdentifier: superclass.serviceIdentifier }); } } if (typeof version === 'string') { if (apiConfig) { setApi(apiConfig); } else { try { setApi(AWS.apiLoader(superclass.serviceIdentifier, version)); } catch (err) { throw AWS.util.error(err, { message: 'Could not find API configuration ' + superclass.serviceIdentifier + '-' + version }); } } if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) { superclass.apiVersions = superclass.apiVersions.concat(version).sort(); } superclass.services[version] = svc; } else { setApi(version); } AWS.Service.defineMethods(svc); return svc; }, /** * @api private */ hasService: function(identifier) { return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier); }, /** * @param attachOn attach default monitoring listeners to object * * Each monitoring event should be emitted from service client to service constructor prototype and then * to global service prototype like bubbling up. These default monitoring events listener will transfer * the monitoring events to the upper layer. * @api private */ addDefaultMonitoringListeners: function addDefaultMonitoringListeners(attachOn) { attachOn.addNamedListener('MONITOR_EVENTS_BUBBLE', 'apiCallAttempt', function EVENTS_BUBBLE(event) { var baseClass = Object.getPrototypeOf(attachOn); if (baseClass._events) baseClass.emit('apiCallAttempt', [event]); }); attachOn.addNamedListener('CALL_EVENTS_BUBBLE', 'apiCall', function CALL_EVENTS_BUBBLE(event) { var baseClass = Object.getPrototypeOf(attachOn); if (baseClass._events) baseClass.emit('apiCall', [event]); }); }, /** * @api private */ _serviceMap: {} }); AWS.util.mixin(AWS.Service, AWS.SequentialExecutor); /** * @api private */ module.exports = AWS.Service; /***/ }), /***/ 4338: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.APIGateway.prototype, { /** * Sets the Accept header to application/json. * * @api private */ setAcceptHeader: function setAcceptHeader(req) { var httpRequest = req.httpRequest; if (!httpRequest.headers.Accept) { httpRequest.headers['Accept'] = 'application/json'; } }, /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('build', this.setAcceptHeader); if (request.operation === 'getExport') { var params = request.params || {}; if (params.exportType === 'swagger') { request.addListener('extractData', AWS.util.convertPayloadToString); } } } }); /***/ }), /***/ 95483: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); // pull in CloudFront signer __webpack_require__(93260); AWS.util.update(AWS.CloudFront.prototype, { setupRequestListeners: function setupRequestListeners(request) { request.addListener('extractData', AWS.util.hoistPayloadMember); } }); /***/ }), /***/ 48571: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * Constructs a service interface object. Each API operation is exposed as a * function on service. * * ### Sending a Request Using CloudSearchDomain * * ```javascript * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); * csd.search(params, function (err, data) { * if (err) console.log(err, err.stack); // an error occurred * else console.log(data); // successful response * }); * ``` * * ### Locking the API Version * * In order to ensure that the CloudSearchDomain object uses this specific API, * you can construct the object by passing the `apiVersion` option to the * constructor: * * ```javascript * var csd = new AWS.CloudSearchDomain({ * endpoint: 'my.host.tld', * apiVersion: '2013-01-01' * }); * ``` * * You can also set the API version globally in `AWS.config.apiVersions` using * the **cloudsearchdomain** service identifier: * * ```javascript * AWS.config.apiVersions = { * cloudsearchdomain: '2013-01-01', * // other service API versions * }; * * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); * ``` * * @note You *must* provide an `endpoint` configuration parameter when * constructing this service. See {constructor} for more information. * * @!method constructor(options = {}) * Constructs a service object. This object has one method for each * API operation. * * @example Constructing a CloudSearchDomain object * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); * @note You *must* provide an `endpoint` when constructing this service. * @option (see AWS.Config.constructor) * * @service cloudsearchdomain * @version 2013-01-01 */ AWS.util.update(AWS.CloudSearchDomain.prototype, { /** * @api private */ validateService: function validateService() { if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { var msg = 'AWS.CloudSearchDomain requires an explicit ' + '`endpoint\' configuration option.'; throw AWS.util.error(new Error(), {name: 'InvalidEndpoint', message: msg}); } }, /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS ); request.onAsync('validate', this.validateCredentials); request.addListener('validate', this.updateRegion); if (request.operation === 'search') { request.addListener('build', this.convertGetToPost); } }, /** * @api private */ validateCredentials: function(req, done) { if (!req.service.api.signatureVersion) return done(); // none req.service.config.getCredentials(function(err) { if (err) { req.removeListener('sign', AWS.EventListeners.Core.SIGN); } done(); }); }, /** * @api private */ convertGetToPost: function(request) { var httpRequest = request.httpRequest; // convert queries to POST to avoid length restrictions var path = httpRequest.path.split('?'); httpRequest.method = 'POST'; httpRequest.path = path[0]; httpRequest.body = path[1]; httpRequest.headers['Content-Length'] = httpRequest.body.length; httpRequest.headers['Content-Type'] = 'application/x-www-form-urlencoded'; }, /** * @api private */ updateRegion: function updateRegion(request) { var endpoint = request.httpRequest.endpoint.hostname; var zones = endpoint.split('.'); request.httpRequest.region = zones[1] || request.httpRequest.region; } }); /***/ }), /***/ 59050: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var rdsutil = __webpack_require__(30650); /** * @api private */ var crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot']; AWS.util.update(AWS.DocDB.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { if ( crossRegionOperations.indexOf(request.operation) !== -1 && this.config.params && this.config.params.SourceRegion && request.params && !request.params.SourceRegion ) { request.params.SourceRegion = this.config.params.SourceRegion; } rdsutil.setupRequestListeners(this, request, crossRegionOperations); }, }); /***/ }), /***/ 17101: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); __webpack_require__(90030); AWS.util.update(AWS.DynamoDB.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { if (request.service.config.dynamoDbCrc32) { request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); request.addListener('extractData', this.checkCrc32); request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); } }, /** * @api private */ checkCrc32: function checkCrc32(resp) { if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) { resp.data = null; resp.error = AWS.util.error(new Error(), { code: 'CRC32CheckFailed', message: 'CRC32 integrity check failed', retryable: true }); resp.request.haltHandlersOnError(); throw (resp.error); } }, /** * @api private */ crc32IsValid: function crc32IsValid(resp) { var crc = resp.httpResponse.headers['x-amz-crc32']; if (!crc) return true; // no (valid) CRC32 header return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body); }, /** * @api private */ defaultRetryCount: 10, /** * @api private */ retryDelays: function retryDelays(retryCount, err) { var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions); if (typeof retryDelayOptions.base !== 'number') { retryDelayOptions.base = 50; // default for dynamodb } var delay = AWS.util.calculateRetryDelay(retryCount, retryDelayOptions, err); return delay; } }); /***/ }), /***/ 92501: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.EC2.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); request.addListener('extractError', this.extractError); if (request.operation === 'copySnapshot') { request.onAsync('validate', this.buildCopySnapshotPresignedUrl); } }, /** * @api private */ buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) { if (req.params.PresignedUrl || req._subRequest) { return done(); } req.params = AWS.util.copy(req.params); req.params.DestinationRegion = req.service.config.region; var config = AWS.util.copy(req.service.config); delete config.endpoint; config.region = req.params.SourceRegion; var svc = new req.service.constructor(config); var newReq = svc[req.operation](req.params); newReq._subRequest = true; newReq.presign(function(err, url) { if (err) done(err); else { req.params.PresignedUrl = url; done(); } }); }, /** * @api private */ extractError: function extractError(resp) { // EC2 nests the error code and message deeper than other AWS Query services. var httpResponse = resp.httpResponse; var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || ''); if (data.Errors) { resp.error = AWS.util.error(new Error(), { code: data.Errors.Error.Code, message: data.Errors.Error.Message }); } else { resp.error = AWS.util.error(new Error(), { code: httpResponse.statusCode, message: null }); } resp.error.requestId = data.RequestID || null; } }); /***/ }), /***/ 14472: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.Glacier.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { if (Array.isArray(request._events.validate)) { request._events.validate.unshift(this.validateAccountId); } else { request.on('validate', this.validateAccountId); } request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); request.on('build', this.addGlacierApiVersion); request.on('build', this.addTreeHashHeaders); }, /** * @api private */ validateAccountId: function validateAccountId(request) { if (request.params.accountId !== undefined) return; request.params = AWS.util.copy(request.params); request.params.accountId = '-'; }, /** * @api private */ addGlacierApiVersion: function addGlacierApiVersion(request) { var version = request.service.api.apiVersion; request.httpRequest.headers['x-amz-glacier-version'] = version; }, /** * @api private */ addTreeHashHeaders: function addTreeHashHeaders(request) { if (request.params.body === undefined) return; var hashes = request.service.computeChecksums(request.params.body); request.httpRequest.headers['X-Amz-Content-Sha256'] = hashes.linearHash; if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) { request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash; } }, /** * @!group Computing Checksums */ /** * Computes the SHA-256 linear and tree hash checksums for a given * block of Buffer data. Pass the tree hash of the computed checksums * as the checksum input to the {completeMultipartUpload} when performing * a multi-part upload. * * @example Calculate checksum of 5.5MB data chunk * var glacier = new AWS.Glacier(); * var data = Buffer.alloc(5.5 * 1024 * 1024); * data.fill('0'); // fill with zeros * var results = glacier.computeChecksums(data); * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' } * @param data [Buffer, String] data to calculate the checksum for * @return [map] a map containing * the linearHash and treeHash properties representing hex based digests * of the respective checksums. * @see completeMultipartUpload */ computeChecksums: function computeChecksums(data) { if (!AWS.util.Buffer.isBuffer(data)) data = AWS.util.buffer.toBuffer(data); var mb = 1024 * 1024; var hashes = []; var hash = AWS.util.crypto.createHash('sha256'); // build leaf nodes in 1mb chunks for (var i = 0; i < data.length; i += mb) { var chunk = data.slice(i, Math.min(i + mb, data.length)); hash.update(chunk); hashes.push(AWS.util.crypto.sha256(chunk)); } return { linearHash: hash.digest('hex'), treeHash: this.buildHashTree(hashes) }; }, /** * @api private */ buildHashTree: function buildHashTree(hashes) { // merge leaf nodes while (hashes.length > 1) { var tmpHashes = []; for (var i = 0; i < hashes.length; i += 2) { if (hashes[i + 1]) { var tmpHash = AWS.util.buffer.alloc(64); tmpHash.write(hashes[i], 0, 32, 'binary'); tmpHash.write(hashes[i + 1], 32, 32, 'binary'); tmpHashes.push(AWS.util.crypto.sha256(tmpHash)); } else { tmpHashes.push(hashes[i]); } } hashes = tmpHashes; } return AWS.util.crypto.toHex(hashes[0]); } }); /***/ }), /***/ 27062: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * @api private */ var blobPayloadOutputOps = [ 'deleteThingShadow', 'getThingShadow', 'updateThingShadow' ]; /** * Constructs a service interface object. Each API operation is exposed as a * function on service. * * ### Sending a Request Using IotData * * ```javascript * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); * iotdata.getThingShadow(params, function (err, data) { * if (err) console.log(err, err.stack); // an error occurred * else console.log(data); // successful response * }); * ``` * * ### Locking the API Version * * In order to ensure that the IotData object uses this specific API, * you can construct the object by passing the `apiVersion` option to the * constructor: * * ```javascript * var iotdata = new AWS.IotData({ * endpoint: 'my.host.tld', * apiVersion: '2015-05-28' * }); * ``` * * You can also set the API version globally in `AWS.config.apiVersions` using * the **iotdata** service identifier: * * ```javascript * AWS.config.apiVersions = { * iotdata: '2015-05-28', * // other service API versions * }; * * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); * ``` * * @note You *must* provide an `endpoint` configuration parameter when * constructing this service. See {constructor} for more information. * * @!method constructor(options = {}) * Constructs a service object. This object has one method for each * API operation. * * @example Constructing a IotData object * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); * @note You *must* provide an `endpoint` when constructing this service. * @option (see AWS.Config.constructor) * * @service iotdata * @version 2015-05-28 */ AWS.util.update(AWS.IotData.prototype, { /** * @api private */ validateService: function validateService() { if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { var msg = 'AWS.IotData requires an explicit ' + '`endpoint\' configuration option.'; throw AWS.util.error(new Error(), {name: 'InvalidEndpoint', message: msg}); } }, /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('validateResponse', this.validateResponseBody); if (blobPayloadOutputOps.indexOf(request.operation) > -1) { request.addListener('extractData', AWS.util.convertPayloadToString); } }, /** * @api private */ validateResponseBody: function validateResponseBody(resp) { var body = resp.httpResponse.body.toString() || '{}'; var bodyCheck = body.trim(); if (!bodyCheck || bodyCheck.charAt(0) !== '{') { resp.httpResponse.body = ''; } } }); /***/ }), /***/ 8452: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.Lambda.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { if (request.operation === 'invoke') { request.addListener('extractData', AWS.util.convertPayloadToString); } } }); /***/ }), /***/ 22922: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.LexModelsV2.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('build', this.modifyContentType); }, /** * Normally rest-json services require `Content-Type` header to be 'application/json', * However Lex Model V2 services requires the header to be 'application/x-amz-json-1.1'. * * @api private */ modifyContentType: function modifyContentType(request) { if (request.httpRequest.headers['Content-Type'] === 'application/json') { request.httpRequest.headers['Content-Type'] = 'application/x-amz-json-1.1'; } } }); /***/ }), /***/ 64605: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.LookoutMetrics.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('build', this.modifyContentType); }, /** * Normally rest-json services require `Content-Type` header to be 'application/json', * However lookout metrics services requires the header to be 'application/x-amz-json-1.1'. * * @api private */ modifyContentType: function modifyContentType(request) { if (request.httpRequest.headers['Content-Type'] === 'application/json') { request.httpRequest.headers['Content-Type'] = 'application/x-amz-json-1.1'; } } }); /***/ }), /***/ 19174: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.MachineLearning.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { if (request.operation === 'predict') { request.addListener('build', this.buildEndpoint); } }, /** * Updates request endpoint from PredictEndpoint * @api private */ buildEndpoint: function buildEndpoint(request) { var url = request.params.PredictEndpoint; if (url) { request.httpRequest.endpoint = new AWS.Endpoint(url); } } }); /***/ }), /***/ 73090: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var rdsutil = __webpack_require__(30650); /** * @api private */ var crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot']; AWS.util.update(AWS.Neptune.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { if ( crossRegionOperations.indexOf(request.operation) !== -1 && this.config.params && this.config.params.SourceRegion && request.params && !request.params.SourceRegion ) { request.params.SourceRegion = this.config.params.SourceRegion; } rdsutil.setupRequestListeners(this, request, crossRegionOperations); }, }); /***/ }), /***/ 53199: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { __webpack_require__(44086); /***/ }), /***/ 71928: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var rdsutil = __webpack_require__(30650); __webpack_require__(16612); /** * @api private */ var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication']; AWS.util.update(AWS.RDS.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { rdsutil.setupRequestListeners(this, request, crossRegionOperations); }, }); /***/ }), /***/ 64070: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.RDSDataService.prototype, { /** * @return [Boolean] whether the error can be retried * @api private */ retryableError: function retryableError(error) { if (error.code === 'BadRequestException' && error.message && error.message.match(/^Communications link failure/) && error.statusCode === 400) { return true; } else { var _super = AWS.Service.prototype.retryableError; return _super.call(this, error); } } }); /***/ }), /***/ 30650: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var rdsutil = { /** * @api private */ setupRequestListeners: function setupRequestListeners(service, request, crossRegionOperations) { if (crossRegionOperations.indexOf(request.operation) !== -1 && request.params.SourceRegion) { request.params = AWS.util.copy(request.params); if (request.params.PreSignedUrl || request.params.SourceRegion === service.config.region) { delete request.params.SourceRegion; } else { var doesParamValidation = !!service.config.paramValidation; // remove the validate parameters listener so we can re-add it after we build the URL if (doesParamValidation) { request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); } request.onAsync('validate', rdsutil.buildCrossRegionPresignedUrl); if (doesParamValidation) { request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); } } } }, /** * @api private */ buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) { var config = AWS.util.copy(req.service.config); config.region = req.params.SourceRegion; delete req.params.SourceRegion; delete config.endpoint; // relevant params for the operation will already be in req.params delete config.params; config.signatureVersion = 'v4'; var destinationRegion = req.service.config.region; var svc = new req.service.constructor(config); var newReq = svc[req.operation](AWS.util.copy(req.params)); newReq.on('build', function addDestinationRegionParam(request) { var httpRequest = request.httpRequest; httpRequest.params.DestinationRegion = destinationRegion; httpRequest.body = AWS.util.queryParamsToString(httpRequest.params); }); newReq.presign(function(err, url) { if (err) done(err); else { req.params.PreSignedUrl = url; done(); } }); } }; /** * @api private */ module.exports = rdsutil; /***/ }), /***/ 69627: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.Route53.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.on('build', this.sanitizeUrl); }, /** * @api private */ sanitizeUrl: function sanitizeUrl(request) { var path = request.httpRequest.path; request.httpRequest.path = path.replace(/\/%2F\w+%2F/, '/'); }, /** * @return [Boolean] whether the error can be retried * @api private */ retryableError: function retryableError(error) { if (error.code === 'PriorRequestNotComplete' && error.statusCode === 400) { return true; } else { var _super = AWS.Service.prototype.retryableError; return _super.call(this, error); } } }); /***/ }), /***/ 26543: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var v4Credentials = __webpack_require__(62660); var resolveRegionalEndpointsFlag = __webpack_require__(85566); var s3util = __webpack_require__(35895); var regionUtil = __webpack_require__(18262); // Pull in managed upload extension __webpack_require__(81600); /** * @api private */ var operationsWith200StatusCodeError = { 'completeMultipartUpload': true, 'copyObject': true, 'uploadPartCopy': true }; /** * @api private */ var regionRedirectErrorCodes = [ 'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints 'BadRequest', // head operations on virtual-hosted global bucket endpoints 'PermanentRedirect', // non-head operations on path-style or regional endpoints 301 // head operations on path-style or regional endpoints ]; var OBJECT_LAMBDA_SERVICE = 's3-object-lambda'; AWS.util.update(AWS.S3.prototype, { /** * @api private */ getSignatureVersion: function getSignatureVersion(request) { var defaultApiVersion = this.api.signatureVersion; var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null; var regionDefinedVersion = this.config.signatureVersion; var isPresigned = request ? request.isPresigned() : false; /* 1) User defined version specified: a) always return user defined version 2) No user defined version specified: a) If not using presigned urls, default to V4 b) If using presigned urls, default to lowest version the region supports */ if (userDefinedVersion) { userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion; return userDefinedVersion; } if (isPresigned !== true) { defaultApiVersion = 'v4'; } else if (regionDefinedVersion) { defaultApiVersion = regionDefinedVersion; } return defaultApiVersion; }, /** * @api private */ getSigningName: function getSigningName(req) { if (req && req.operation === 'writeGetObjectResponse') { return OBJECT_LAMBDA_SERVICE; } var _super = AWS.Service.prototype.getSigningName; return (req && req._parsedArn && req._parsedArn.service) ? req._parsedArn.service : _super.call(this); }, /** * @api private */ getSignerClass: function getSignerClass(request) { var signatureVersion = this.getSignatureVersion(request); return AWS.Signers.RequestSigner.getVersion(signatureVersion); }, /** * @api private */ validateService: function validateService() { var msg; var messages = []; // default to us-east-1 when no region is provided if (!this.config.region) this.config.region = 'us-east-1'; if (!this.config.endpoint && this.config.s3BucketEndpoint) { messages.push('An endpoint must be provided when configuring ' + '`s3BucketEndpoint` to true.'); } if (messages.length === 1) { msg = messages[0]; } else if (messages.length > 1) { msg = 'Multiple configuration errors:\n' + messages.join('\n'); } if (msg) { throw AWS.util.error(new Error(), {name: 'InvalidEndpoint', message: msg}); } }, /** * @api private */ shouldDisableBodySigning: function shouldDisableBodySigning(request) { var signerClass = this.getSignerClass(); if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4 && request.httpRequest.endpoint.protocol === 'https:') { return true; } return false; }, /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { var prependListener = true; request.addListener('validate', this.validateScheme); request.addListener('validate', this.validateBucketName, prependListener); request.addListener('validate', this.optInUsEast1RegionalEndpoint, prependListener); request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_REGION); request.addListener('build', this.addContentType); request.addListener('build', this.computeContentMd5); request.addListener('build', this.computeSseCustomerKeyMd5); request.addListener('build', this.populateURI); request.addListener('afterBuild', this.addExpect100Continue); request.addListener('extractError', this.extractError); request.addListener('extractData', AWS.util.hoistPayloadMember); request.addListener('extractData', this.extractData); request.addListener('extractData', this.extractErrorFrom200Response); request.addListener('beforePresign', this.prepareSignedUrl); if (this.shouldDisableBodySigning(request)) { request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); request.addListener('afterBuild', this.disableBodySigning); } //deal with ARNs supplied to Bucket if (request.operation !== 'createBucket' && s3util.isArnInParam(request, 'Bucket')) { // avoid duplicate parsing in the future request._parsedArn = AWS.util.ARN.parse(request.params.Bucket); request.removeListener('validate', this.validateBucketName); request.removeListener('build', this.populateURI); if (request._parsedArn.service === 's3') { request.addListener('validate', s3util.validateS3AccessPointArn); request.addListener('validate', this.validateArnResourceType); } else if (request._parsedArn.service === 's3-outposts') { request.addListener('validate', s3util.validateOutpostsAccessPointArn); request.addListener('validate', s3util.validateOutpostsArn); } request.addListener('validate', s3util.validateArnRegion); request.addListener('validate', s3util.validateArnAccount); request.addListener('validate', s3util.validateArnService); request.addListener('build', this.populateUriFromAccessPointArn); request.addListener('build', s3util.validatePopulateUriFromArn); return; } //listeners regarding region inference request.addListener('validate', this.validateBucketEndpoint); request.addListener('validate', this.correctBucketRegionFromCache); request.onAsync('extractError', this.requestBucketRegion); if (AWS.util.isBrowser()) { request.onAsync('retry', this.reqRegionForNetworkingError); } }, /** * @api private */ validateScheme: function(req) { var params = req.params, scheme = req.httpRequest.endpoint.protocol, sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey; if (sensitive && scheme !== 'https:') { var msg = 'Cannot send SSE keys over HTTP. Set \'sslEnabled\'' + 'to \'true\' in your configuration'; throw AWS.util.error(new Error(), { code: 'ConfigError', message: msg }); } }, /** * @api private */ validateBucketEndpoint: function(req) { if (!req.params.Bucket && req.service.config.s3BucketEndpoint) { var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.'; throw AWS.util.error(new Error(), { code: 'ConfigError', message: msg }); } }, /** * Validate resource-type supplied in S3 ARN */ validateArnResourceType: function validateArnResourceType(req) { var resource = req._parsedArn.resource; if ( resource.indexOf('accesspoint:') !== 0 && resource.indexOf('accesspoint/') !== 0 ) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'ARN resource should begin with \'accesspoint/\'' }); } }, /** * @api private */ validateBucketName: function validateBucketName(req) { var service = req.service; var signatureVersion = service.getSignatureVersion(req); var bucket = req.params && req.params.Bucket; var key = req.params && req.params.Key; var slashIndex = bucket && bucket.indexOf('/'); if (bucket && slashIndex >= 0) { if (typeof key === 'string' && slashIndex > 0) { req.params = AWS.util.copy(req.params); // Need to include trailing slash to match sigv2 behavior var prefix = bucket.substr(slashIndex + 1) || ''; req.params.Key = prefix + '/' + key; req.params.Bucket = bucket.substr(0, slashIndex); } else if (signatureVersion === 'v4') { var msg = 'Bucket names cannot contain forward slashes. Bucket: ' + bucket; throw AWS.util.error(new Error(), { code: 'InvalidBucket', message: msg }); } } }, /** * @api private */ isValidAccelerateOperation: function isValidAccelerateOperation(operation) { var invalidOperations = [ 'createBucket', 'deleteBucket', 'listBuckets' ]; return invalidOperations.indexOf(operation) === -1; }, /** * When us-east-1 region endpoint configuration is set, in stead of sending request to * global endpoint(e.g. 's3.amazonaws.com'), we will send request to * 's3.us-east-1.amazonaws.com'. * @api private */ optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint(req) { var service = req.service; var config = service.config; config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag(service._originalConfig, { env: 'AWS_S3_US_EAST_1_REGIONAL_ENDPOINT', sharedConfig: 's3_us_east_1_regional_endpoint', clientConfig: 's3UsEast1RegionalEndpoint' }); if ( !(service._originalConfig || {}).endpoint && req.httpRequest.region === 'us-east-1' && config.s3UsEast1RegionalEndpoint === 'regional' && req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0 ) { var insertPoint = config.endpoint.indexOf('.amazonaws.com'); regionalEndpoint = config.endpoint.substring(0, insertPoint) + '.us-east-1' + config.endpoint.substring(insertPoint); req.httpRequest.updateEndpoint(regionalEndpoint); } }, /** * S3 prefers dns-compatible bucket names to be moved from the uri path * to the hostname as a sub-domain. This is not possible, even for dns-compat * buckets when using SSL and the bucket name contains a dot ('.'). The * ssl wildcard certificate is only 1-level deep. * * @api private */ populateURI: function populateURI(req) { var httpRequest = req.httpRequest; var b = req.params.Bucket; var service = req.service; var endpoint = httpRequest.endpoint; if (b) { if (!service.pathStyleBucketName(b)) { if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) { if (service.config.useDualstack) { endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com'; } else { endpoint.hostname = b + '.s3-accelerate.amazonaws.com'; } } else if (!service.config.s3BucketEndpoint) { endpoint.hostname = b + '.' + endpoint.hostname; } var port = endpoint.port; if (port !== 80 && port !== 443) { endpoint.host = endpoint.hostname + ':' + endpoint.port; } else { endpoint.host = endpoint.hostname; } httpRequest.virtualHostedBucket = b; // needed for signing the request service.removeVirtualHostedBucketFromPath(req); } } }, /** * Takes the bucket name out of the path if bucket is virtual-hosted * * @api private */ removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) { var httpRequest = req.httpRequest; var bucket = httpRequest.virtualHostedBucket; if (bucket && httpRequest.path) { if (req.params && req.params.Key) { var encodedS3Key = '/' + AWS.util.uriEscapePath(req.params.Key); if (httpRequest.path.indexOf(encodedS3Key) === 0 && (httpRequest.path.length === encodedS3Key.length || httpRequest.path[encodedS3Key.length] === '?')) { //path only contains key or path contains only key and querystring return; } } httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), ''); if (httpRequest.path[0] !== '/') { httpRequest.path = '/' + httpRequest.path; } } }, /** * When user supply an access point ARN in the Bucket parameter, we need to * populate the URI according to the ARN. */ populateUriFromAccessPointArn: function populateUriFromAccessPointArn(req) { var accessPointArn = req._parsedArn; var isOutpostArn = accessPointArn.service === 's3-outposts'; var isObjectLambdaArn = accessPointArn.service === 's3-object-lambda'; var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: ''; var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint'; var dualStackSuffix = !isOutpostArn && req.service.config.useDualstack ? '.dualstack' : ''; var endpoint = req.httpRequest.endpoint; var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region); var useArnRegion = req.service.config.s3UseArnRegion; endpoint.hostname = [ accessPointArn.accessPoint + '-' + accessPointArn.accountId + outpostsSuffix, serviceName + dualStackSuffix, useArnRegion ? accessPointArn.region : req.service.config.region, dnsSuffix ].join('.'); if (isObjectLambdaArn) { // should be in the format: "accesspoint/${accesspointName}" var serviceName = 's3-object-lambda'; var accesspointName = accessPointArn.resource.split('/')[1]; endpoint.hostname = [ accesspointName + '-' + accessPointArn.accountId, serviceName, useArnRegion ? accessPointArn.region : req.service.config.region, dnsSuffix ].join('.'); } endpoint.host = endpoint.hostname; var encodedArn = AWS.util.uriEscape(req.params.Bucket); var path = req.httpRequest.path; //remove the Bucket value from path req.httpRequest.path = path.replace(new RegExp('/' + encodedArn), ''); if (req.httpRequest.path[0] !== '/') { req.httpRequest.path = '/' + req.httpRequest.path; } req.httpRequest.region = accessPointArn.region; //region used to sign }, /** * Adds Expect: 100-continue header if payload is greater-or-equal 1MB * @api private */ addExpect100Continue: function addExpect100Continue(req) { var len = req.httpRequest.headers['Content-Length']; if (AWS.util.isNode() && (len >= 1024 * 1024 || req.params.Body instanceof AWS.util.stream.Stream)) { req.httpRequest.headers['Expect'] = '100-continue'; } }, /** * Adds a default content type if none is supplied. * * @api private */ addContentType: function addContentType(req) { var httpRequest = req.httpRequest; if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') { // Content-Type is not set in GET/HEAD requests delete httpRequest.headers['Content-Type']; return; } if (!httpRequest.headers['Content-Type']) { // always have a Content-Type httpRequest.headers['Content-Type'] = 'application/octet-stream'; } var contentType = httpRequest.headers['Content-Type']; if (AWS.util.isBrowser()) { if (typeof httpRequest.body === 'string' && !contentType.match(/;\s*charset=/)) { var charset = '; charset=UTF-8'; httpRequest.headers['Content-Type'] += charset; } else { var replaceFn = function(_, prefix, charsetName) { return prefix + charsetName.toUpperCase(); }; httpRequest.headers['Content-Type'] = contentType.replace(/(;\s*charset=)(.+)$/, replaceFn); } } }, /** * @api private */ computableChecksumOperations: { putBucketCors: true, putBucketLifecycle: true, putBucketLifecycleConfiguration: true, putBucketTagging: true, deleteObjects: true, putBucketReplication: true, putObjectLegalHold: true, putObjectRetention: true, putObjectLockConfiguration: true }, /** * Checks whether checksums should be computed for the request. * If the request requires checksums to be computed, this will always * return true, otherwise it depends on whether {AWS.Config.computeChecksums} * is set. * * @param req [AWS.Request] the request to check against * @return [Boolean] whether to compute checksums for a request. * @api private */ willComputeChecksums: function willComputeChecksums(req) { if (this.computableChecksumOperations[req.operation]) return true; if (!this.config.computeChecksums) return false; // TODO: compute checksums for Stream objects if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) && typeof req.httpRequest.body !== 'string') { return false; } var rules = req.service.api.operations[req.operation].input.members; // Sha256 signing disabled, and not a presigned url if (req.service.shouldDisableBodySigning(req) && !Object.prototype.hasOwnProperty.call(req.httpRequest.headers, 'presigned-expires')) { if (rules.ContentMD5 && !req.params.ContentMD5) { return true; } } // V4 signer uses SHA256 signatures so only compute MD5 if it is required if (req.service.getSignerClass(req) === AWS.Signers.V4) { if (rules.ContentMD5 && !rules.ContentMD5.required) return false; } if (rules.ContentMD5 && !req.params.ContentMD5) return true; }, /** * A listener that computes the Content-MD5 and sets it in the header. * @see AWS.S3.willComputeChecksums * @api private */ computeContentMd5: function computeContentMd5(req) { if (req.service.willComputeChecksums(req)) { var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64'); req.httpRequest.headers['Content-MD5'] = md5; } }, /** * @api private */ computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) { var keys = { SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5', CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5' }; AWS.util.each(keys, function(key, header) { if (req.params[key]) { var value = AWS.util.crypto.md5(req.params[key], 'base64'); req.httpRequest.headers[header] = value; } }); }, /** * Returns true if the bucket name should be left in the URI path for * a request to S3. This function takes into account the current * endpoint protocol (e.g. http or https). * * @api private */ pathStyleBucketName: function pathStyleBucketName(bucketName) { // user can force path style requests via the configuration if (this.config.s3ForcePathStyle) return true; if (this.config.s3BucketEndpoint) return false; if (s3util.dnsCompatibleBucketName(bucketName)) { return (this.config.sslEnabled && bucketName.match(/\./)) ? true : false; } else { return true; // not dns compatible names must always use path style } }, /** * For COPY operations, some can be error even with status code 200. * SDK treats the response as exception when response body indicates * an exception or body is empty. * * @api private */ extractErrorFrom200Response: function extractErrorFrom200Response(resp) { if (!operationsWith200StatusCodeError[resp.request.operation]) return; var httpResponse = resp.httpResponse; if (httpResponse.body && httpResponse.body.toString().match('')) { // Response body with '...' indicates an exception. // Get S3 client object. In ManagedUpload, this.service refers to // S3 client object. resp.data = null; var service = this.service ? this.service : this; service.extractError(resp); throw resp.error; } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\w_]/)) { // When body is empty or incomplete, S3 might stop the request on detecting client // side aborting the request. resp.data = null; throw AWS.util.error(new Error(), { code: 'InternalError', message: 'S3 aborted request' }); } }, /** * @return [Boolean] whether the error can be retried * @api private */ retryableError: function retryableError(error, request) { if (operationsWith200StatusCodeError[request.operation] && error.statusCode === 200) { return true; } else if (request._requestRegionForBucket && request.service.bucketRegionCache[request._requestRegionForBucket]) { return false; } else if (error && error.code === 'RequestTimeout') { return true; } else if (error && regionRedirectErrorCodes.indexOf(error.code) != -1 && error.region && error.region != request.httpRequest.region) { request.httpRequest.region = error.region; if (error.statusCode === 301) { request.service.updateReqBucketRegion(request); } return true; } else { var _super = AWS.Service.prototype.retryableError; return _super.call(this, error, request); } }, /** * Updates httpRequest with region. If region is not provided, then * the httpRequest will be updated based on httpRequest.region * * @api private */ updateReqBucketRegion: function updateReqBucketRegion(request, region) { var httpRequest = request.httpRequest; if (typeof region === 'string' && region.length) { httpRequest.region = region; } if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)) { return; } var service = request.service; var s3Config = service.config; var s3BucketEndpoint = s3Config.s3BucketEndpoint; if (s3BucketEndpoint) { delete s3Config.s3BucketEndpoint; } var newConfig = AWS.util.copy(s3Config); delete newConfig.endpoint; newConfig.region = httpRequest.region; httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint; service.populateURI(request); s3Config.s3BucketEndpoint = s3BucketEndpoint; httpRequest.headers.Host = httpRequest.endpoint.host; if (request._asm.currentState === 'validate') { request.removeListener('build', service.populateURI); request.addListener('build', service.removeVirtualHostedBucketFromPath); } }, /** * Provides a specialized parser for getBucketLocation -- all other * operations are parsed by the super class. * * @api private */ extractData: function extractData(resp) { var req = resp.request; if (req.operation === 'getBucketLocation') { var match = resp.httpResponse.body.toString().match(/>(.+)<\/Location/); delete resp.data['_']; if (match) { resp.data.LocationConstraint = match[1]; } else { resp.data.LocationConstraint = ''; } } var bucket = req.params.Bucket || null; if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) { req.service.clearBucketRegionCache(bucket); } else { var headers = resp.httpResponse.headers || {}; var region = headers['x-amz-bucket-region'] || null; if (!region && req.operation === 'createBucket' && !resp.error) { var createBucketConfiguration = req.params.CreateBucketConfiguration; if (!createBucketConfiguration) { region = 'us-east-1'; } else if (createBucketConfiguration.LocationConstraint === 'EU') { region = 'eu-west-1'; } else { region = createBucketConfiguration.LocationConstraint; } } if (region) { if (bucket && region !== req.service.bucketRegionCache[bucket]) { req.service.bucketRegionCache[bucket] = region; } } } req.service.extractRequestIds(resp); }, /** * Extracts an error object from the http response. * * @api private */ extractError: function extractError(resp) { var codes = { 304: 'NotModified', 403: 'Forbidden', 400: 'BadRequest', 404: 'NotFound' }; var req = resp.request; var code = resp.httpResponse.statusCode; var body = resp.httpResponse.body || ''; var headers = resp.httpResponse.headers || {}; var region = headers['x-amz-bucket-region'] || null; var bucket = req.params.Bucket || null; var bucketRegionCache = req.service.bucketRegionCache; if (region && bucket && region !== bucketRegionCache[bucket]) { bucketRegionCache[bucket] = region; } var cachedRegion; if (codes[code] && body.length === 0) { if (bucket && !region) { cachedRegion = bucketRegionCache[bucket] || null; if (cachedRegion !== req.httpRequest.region) { region = cachedRegion; } } resp.error = AWS.util.error(new Error(), { code: codes[code], message: null, region: region }); } else { var data = new AWS.XML.Parser().parse(body.toString()); if (data.Region && !region) { region = data.Region; if (bucket && region !== bucketRegionCache[bucket]) { bucketRegionCache[bucket] = region; } } else if (bucket && !region && !data.Region) { cachedRegion = bucketRegionCache[bucket] || null; if (cachedRegion !== req.httpRequest.region) { region = cachedRegion; } } resp.error = AWS.util.error(new Error(), { code: data.Code || code, message: data.Message || null, region: region }); } req.service.extractRequestIds(resp); }, /** * If region was not obtained synchronously, then send async request * to get bucket region for errors resulting from wrong region. * * @api private */ requestBucketRegion: function requestBucketRegion(resp, done) { var error = resp.error; var req = resp.request; var bucket = req.params.Bucket || null; if (!error || !bucket || error.region || req.operation === 'listObjects' || (AWS.util.isNode() && req.operation === 'headBucket') || (error.statusCode === 400 && req.operation !== 'headObject') || regionRedirectErrorCodes.indexOf(error.code) === -1) { return done(); } var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects'; var reqParams = {Bucket: bucket}; if (reqOperation === 'listObjects') reqParams.MaxKeys = 0; var regionReq = req.service[reqOperation](reqParams); regionReq._requestRegionForBucket = bucket; regionReq.send(function() { var region = req.service.bucketRegionCache[bucket] || null; error.region = region; done(); }); }, /** * For browser only. If NetworkingError received, will attempt to obtain * the bucket region. * * @api private */ reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) { if (!AWS.util.isBrowser()) { return done(); } var error = resp.error; var request = resp.request; var bucket = request.params.Bucket; if (!error || error.code !== 'NetworkingError' || !bucket || request.httpRequest.region === 'us-east-1') { return done(); } var service = request.service; var bucketRegionCache = service.bucketRegionCache; var cachedRegion = bucketRegionCache[bucket] || null; if (cachedRegion && cachedRegion !== request.httpRequest.region) { service.updateReqBucketRegion(request, cachedRegion); done(); } else if (!s3util.dnsCompatibleBucketName(bucket)) { service.updateReqBucketRegion(request, 'us-east-1'); if (bucketRegionCache[bucket] !== 'us-east-1') { bucketRegionCache[bucket] = 'us-east-1'; } done(); } else if (request.httpRequest.virtualHostedBucket) { var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0}); service.updateReqBucketRegion(getRegionReq, 'us-east-1'); getRegionReq._requestRegionForBucket = bucket; getRegionReq.send(function() { var region = service.bucketRegionCache[bucket] || null; if (region && region !== request.httpRequest.region) { service.updateReqBucketRegion(request, region); } done(); }); } else { // DNS-compatible path-style // (s3ForcePathStyle or bucket name with dot over https) // Cannot obtain region information for this case done(); } }, /** * Cache for bucket region. * * @api private */ bucketRegionCache: {}, /** * Clears bucket region cache. * * @api private */ clearBucketRegionCache: function(buckets) { var bucketRegionCache = this.bucketRegionCache; if (!buckets) { buckets = Object.keys(bucketRegionCache); } else if (typeof buckets === 'string') { buckets = [buckets]; } for (var i = 0; i < buckets.length; i++) { delete bucketRegionCache[buckets[i]]; } return bucketRegionCache; }, /** * Corrects request region if bucket's cached region is different * * @api private */ correctBucketRegionFromCache: function correctBucketRegionFromCache(req) { var bucket = req.params.Bucket || null; if (bucket) { var service = req.service; var requestRegion = req.httpRequest.region; var cachedRegion = service.bucketRegionCache[bucket]; if (cachedRegion && cachedRegion !== requestRegion) { service.updateReqBucketRegion(req, cachedRegion); } } }, /** * Extracts S3 specific request ids from the http response. * * @api private */ extractRequestIds: function extractRequestIds(resp) { var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null; var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null; resp.extendedRequestId = extendedRequestId; resp.cfId = cfId; if (resp.error) { resp.error.requestId = resp.requestId || null; resp.error.extendedRequestId = extendedRequestId; resp.error.cfId = cfId; } }, /** * Get a pre-signed URL for a given operation name. * * @note You must ensure that you have static or previously resolved * credentials if you call this method synchronously (with no callback), * otherwise it may not properly sign the request. If you cannot guarantee * this (you are using an asynchronous credential provider, i.e., EC2 * IAM roles), you should always call this method with an asynchronous * callback. * @note Not all operation parameters are supported when using pre-signed * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, * `ContentLength`, or `Tagging` must be provided as headers when sending a * request. If you are using pre-signed URLs to upload from a browser and * need to use these fields, see {createPresignedPost}. * @note The default signer allows altering the request by adding corresponding * headers to set some parameters (e.g. Range) and these added parameters * won't be signed. You must use signatureVersion v4 to to include these * parameters in the signed portion of the URL and enforce exact matching * between headers and signed params in the URL. * @note This operation cannot be used with a promise. See note above regarding * asynchronous credentials and use with a callback. * @param operation [String] the name of the operation to call * @param params [map] parameters to pass to the operation. See the given * operation for the expected operation parameters. In addition, you can * also pass the "Expires" parameter to inform S3 how long the URL should * work for. * @option params Expires [Integer] (900) the number of seconds to expire * the pre-signed URL operation in. Defaults to 15 minutes. * @param callback [Function] if a callback is provided, this function will * pass the URL as the second parameter (after the error parameter) to * the callback function. * @return [String] if called synchronously (with no callback), returns the * signed URL. * @return [null] nothing is returned if a callback is provided. * @example Pre-signing a getObject operation (synchronously) * var params = {Bucket: 'bucket', Key: 'key'}; * var url = s3.getSignedUrl('getObject', params); * console.log('The URL is', url); * @example Pre-signing a putObject (asynchronously) * var params = {Bucket: 'bucket', Key: 'key'}; * s3.getSignedUrl('putObject', params, function (err, url) { * console.log('The URL is', url); * }); * @example Pre-signing a putObject operation with a specific payload * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; * var url = s3.getSignedUrl('putObject', params); * console.log('The URL is', url); * @example Passing in a 1-minute expiry time for a pre-signed URL * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; * var url = s3.getSignedUrl('getObject', params); * console.log('The URL is', url); // expires in 60 seconds */ getSignedUrl: function getSignedUrl(operation, params, callback) { params = AWS.util.copy(params || {}); var expires = params.Expires || 900; if (typeof expires !== 'number') { throw AWS.util.error(new Error(), { code: 'InvalidParameterException', message: 'The expiration must be a number, received ' + typeof expires }); } delete params.Expires; // we can't validate this var request = this.makeRequest(operation, params); if (callback) { AWS.util.defer(function() { request.presign(expires, callback); }); } else { return request.presign(expires, callback); } }, /** * @!method getSignedUrlPromise() * Returns a 'thenable' promise that will be resolved with a pre-signed URL * for a given operation name. * * Two callbacks can be provided to the `then` method on the returned promise. * The first callback will be called if the promise is fulfilled, and the second * callback will be called if the promise is rejected. * @note Not all operation parameters are supported when using pre-signed * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, * `ContentLength`, or `Tagging` must be provided as headers when sending a * request. If you are using pre-signed URLs to upload from a browser and * need to use these fields, see {createPresignedPost}. * @param operation [String] the name of the operation to call * @param params [map] parameters to pass to the operation. See the given * operation for the expected operation parameters. In addition, you can * also pass the "Expires" parameter to inform S3 how long the URL should * work for. * @option params Expires [Integer] (900) the number of seconds to expire * the pre-signed URL operation in. Defaults to 15 minutes. * @callback fulfilledCallback function(url) * Called if the promise is fulfilled. * @param url [String] the signed url * @callback rejectedCallback function(err) * Called if the promise is rejected. * @param err [Error] if an error occurred, this value will be filled * @return [Promise] A promise that represents the state of the `refresh` call. * @example Pre-signing a getObject operation * var params = {Bucket: 'bucket', Key: 'key'}; * var promise = s3.getSignedUrlPromise('getObject', params); * promise.then(function(url) { * console.log('The URL is', url); * }, function(err) { ... }); * @example Pre-signing a putObject operation with a specific payload * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; * var promise = s3.getSignedUrlPromise('putObject', params); * promise.then(function(url) { * console.log('The URL is', url); * }, function(err) { ... }); * @example Passing in a 1-minute expiry time for a pre-signed URL * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; * var promise = s3.getSignedUrlPromise('getObject', params); * promise.then(function(url) { * console.log('The URL is', url); * }, function(err) { ... }); */ /** * Get a pre-signed POST policy to support uploading to S3 directly from an * HTML form. * * @param params [map] * @option params Bucket [String] The bucket to which the post should be * uploaded * @option params Expires [Integer] (3600) The number of seconds for which * the presigned policy should be valid. * @option params Conditions [Array] An array of conditions that must be met * for the presigned policy to allow the * upload. This can include required tags, * the accepted range for content lengths, * etc. * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html * @option params Fields [map] Fields to include in the form. All * values passed in as fields will be * signed as exact match conditions. * @param callback [Function] * * @note All fields passed in when creating presigned post data will be signed * as exact match conditions. Any fields that will be interpolated by S3 * must be added to the fields hash after signing, and an appropriate * condition for such fields must be explicitly added to the Conditions * array passed to this function before signing. * * @example Presiging post data with a known key * var params = { * Bucket: 'bucket', * Fields: { * key: 'key' * } * }; * s3.createPresignedPost(params, function(err, data) { * if (err) { * console.error('Presigning post data encountered an error', err); * } else { * console.log('The post data is', data); * } * }); * * @example Presigning post data with an interpolated key * var params = { * Bucket: 'bucket', * Conditions: [ * ['starts-with', '$key', 'path/to/uploads/'] * ] * }; * s3.createPresignedPost(params, function(err, data) { * if (err) { * console.error('Presigning post data encountered an error', err); * } else { * data.Fields.key = 'path/to/uploads/${filename}'; * console.log('The post data is', data); * } * }); * * @note You must ensure that you have static or previously resolved * credentials if you call this method synchronously (with no callback), * otherwise it may not properly sign the request. If you cannot guarantee * this (you are using an asynchronous credential provider, i.e., EC2 * IAM roles), you should always call this method with an asynchronous * callback. * * @return [map] If called synchronously (with no callback), returns a hash * with the url to set as the form action and a hash of fields * to include in the form. * @return [null] Nothing is returned if a callback is provided. * * @callback callback function (err, data) * @param err [Error] the error object returned from the policy signer * @param data [map] The data necessary to construct an HTML form * @param data.url [String] The URL to use as the action of the form * @param data.fields [map] A hash of fields that must be included in the * form for the upload to succeed. This hash will * include the signed POST policy, your access key * ID and security token (if present), etc. These * may be safely included as input elements of type * 'hidden.' */ createPresignedPost: function createPresignedPost(params, callback) { if (typeof params === 'function' && callback === undefined) { callback = params; params = null; } params = AWS.util.copy(params || {}); var boundParams = this.config.params || {}; var bucket = params.Bucket || boundParams.Bucket, self = this, config = this.config, endpoint = AWS.util.copy(this.endpoint); if (!config.s3BucketEndpoint) { endpoint.pathname = '/' + bucket; } function finalizePost() { return { url: AWS.util.urlFormat(endpoint), fields: self.preparePostFields( config.credentials, config.region, bucket, params.Fields, params.Conditions, params.Expires ) }; } if (callback) { config.getCredentials(function (err) { if (err) { callback(err); } else { try { callback(null, finalizePost()); } catch (err) { callback(err); } } }); } else { return finalizePost(); } }, /** * @api private */ preparePostFields: function preparePostFields( credentials, region, bucket, fields, conditions, expiresInSeconds ) { var now = this.getSkewCorrectedDate(); if (!credentials || !region || !bucket) { throw new Error('Unable to create a POST object policy without a bucket,' + ' region, and credentials'); } fields = AWS.util.copy(fields || {}); conditions = (conditions || []).slice(0); expiresInSeconds = expiresInSeconds || 3600; var signingDate = AWS.util.date.iso8601(now).replace(/[:\-]|\.\d{3}/g, ''); var shortDate = signingDate.substr(0, 8); var scope = v4Credentials.createScope(shortDate, region, 's3'); var credential = credentials.accessKeyId + '/' + scope; fields['bucket'] = bucket; fields['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256'; fields['X-Amz-Credential'] = credential; fields['X-Amz-Date'] = signingDate; if (credentials.sessionToken) { fields['X-Amz-Security-Token'] = credentials.sessionToken; } for (var field in fields) { if (fields.hasOwnProperty(field)) { var condition = {}; condition[field] = fields[field]; conditions.push(condition); } } fields.Policy = this.preparePostPolicy( new Date(now.valueOf() + expiresInSeconds * 1000), conditions ); fields['X-Amz-Signature'] = AWS.util.crypto.hmac( v4Credentials.getSigningKey(credentials, shortDate, region, 's3', true), fields.Policy, 'hex' ); return fields; }, /** * @api private */ preparePostPolicy: function preparePostPolicy(expiration, conditions) { return AWS.util.base64.encode(JSON.stringify({ expiration: AWS.util.date.iso8601(expiration), conditions: conditions })); }, /** * @api private */ prepareSignedUrl: function prepareSignedUrl(request) { request.addListener('validate', request.service.noPresignedContentLength); request.removeListener('build', request.service.addContentType); if (!request.params.Body) { // no Content-MD5/SHA-256 if body is not provided request.removeListener('build', request.service.computeContentMd5); } else { request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); } }, /** * @api private * @param request */ disableBodySigning: function disableBodySigning(request) { var headers = request.httpRequest.headers; // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) { headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'; } }, /** * @api private */ noPresignedContentLength: function noPresignedContentLength(request) { if (request.params.ContentLength !== undefined) { throw AWS.util.error(new Error(), {code: 'UnexpectedParameter', message: 'ContentLength is not supported in pre-signed URLs.'}); } }, createBucket: function createBucket(params, callback) { // When creating a bucket *outside* the classic region, the location // constraint must be set for the bucket and it must match the endpoint. // This chunk of code will set the location constraint param based // on the region (when possible), but it will not override a passed-in // location constraint. if (typeof params === 'function' || !params) { callback = callback || params; params = {}; } var hostname = this.endpoint.hostname; // copy params so that appending keys does not unintentioinallly // mutate params object argument passed in by user var copiedParams = AWS.util.copy(params); if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) { copiedParams.CreateBucketConfiguration = { LocationConstraint: this.config.region }; } return this.makeRequest('createBucket', copiedParams, callback); }, writeGetObjectResponse: function writeGetObjectResponse(params, callback) { var request = this.makeRequest('writeGetObjectResponse', AWS.util.copy(params), callback); var hostname = this.endpoint.hostname; if (hostname.indexOf(this.config.region) !== -1) { // hostname specifies a region already hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.'); } else { // Hostname doesn't have a region. // Object Lambda requires an explicit region. hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.' + this.config.region + '.'); } request.httpRequest.endpoint = new AWS.Endpoint(hostname, this.config); return request; }, /** * @see AWS.S3.ManagedUpload * @overload upload(params = {}, [options], [callback]) * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent * concurrent handling of parts if the payload is large enough. You can * configure the concurrent queue size by setting `options`. Note that this * is the only operation for which the SDK can retry requests with stream * bodies. * * @param (see AWS.S3.putObject) * @option (see AWS.S3.ManagedUpload.constructor) * @return [AWS.S3.ManagedUpload] the managed upload object that can call * `send()` or track progress. * @example Uploading a stream object * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; * s3.upload(params, function(err, data) { * console.log(err, data); * }); * @example Uploading a stream with concurrency of 1 and partSize of 10mb * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; * var options = {partSize: 10 * 1024 * 1024, queueSize: 1}; * s3.upload(params, options, function(err, data) { * console.log(err, data); * }); * @callback callback function(err, data) * @param err [Error] an error or null if no error occurred. * @param data [map] The response data from the successful upload: * @param data.Location [String] the URL of the uploaded object * @param data.ETag [String] the ETag of the uploaded object * @param data.Bucket [String] the bucket to which the object was uploaded * @param data.Key [String] the key to which the object was uploaded */ upload: function upload(params, options, callback) { if (typeof options === 'function' && callback === undefined) { callback = options; options = null; } options = options || {}; options = AWS.util.merge(options || {}, {service: this, params: params}); var uploader = new AWS.S3.ManagedUpload(options); if (typeof callback === 'function') uploader.send(callback); return uploader; } }); /** * @api private */ AWS.S3.addPromisesToClass = function addPromisesToClass(PromiseDependency) { this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod('getSignedUrl', PromiseDependency); }; /** * @api private */ AWS.S3.deletePromisesFromClass = function deletePromisesFromClass() { delete this.prototype.getSignedUrlPromise; }; AWS.util.addPromises(AWS.S3); /***/ }), /***/ 71207: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var s3util = __webpack_require__(35895); var regionUtil = __webpack_require__(18262); AWS.util.update(AWS.S3Control.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('extractError', this.extractHostId); request.addListener('extractData', this.extractHostId); request.addListener('validate', this.validateAccountId); var isArnInBucket = s3util.isArnInParam(request, 'Bucket'); var isArnInName = s3util.isArnInParam(request, 'Name'); if (isArnInBucket) { request._parsedArn = AWS.util.ARN.parse(request.params['Bucket']); request.addListener('validate', this.validateOutpostsBucketArn); request.addListener('validate', s3util.validateOutpostsArn); request.addListener('afterBuild', this.addOutpostIdHeader); } else if (isArnInName) { request._parsedArn = AWS.util.ARN.parse(request.params['Name']); request.addListener('validate', s3util.validateOutpostsAccessPointArn); request.addListener('validate', s3util.validateOutpostsArn); request.addListener('afterBuild', this.addOutpostIdHeader); } if (isArnInBucket || isArnInName) { request.addListener('validate', s3util.validateArnRegion); request.addListener('validate', this.validateArnAccountWithParams, true); request.addListener('validate', s3util.validateArnAccount); request.addListener('validate', s3util.validateArnService); request.addListener('build', this.populateParamFromArn, true); request.addListener('build', this.populateUriFromArn); request.addListener('build', s3util.validatePopulateUriFromArn); } if (request.params.OutpostId && (request.operation === 'createBucket' || request.operation === 'listRegionalBuckets')) { request.addListener('build', this.populateEndpointForOutpostId); } }, /** * Adds outpostId header */ addOutpostIdHeader: function addOutpostIdHeader(req) { req.httpRequest.headers['x-amz-outpost-id'] = req._parsedArn.outpostId; }, /** * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name */ validateOutpostsBucketArn: function validateOutpostsBucketArn(req) { var parsedArn = req._parsedArn; //can be ':' or '/' var delimiter = parsedArn.resource['outpost'.length]; if (parsedArn.resource.split(delimiter).length !== 4) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Bucket ARN should have two resources outpost/{outpostId}/bucket/{accesspointName}' }); } var bucket = parsedArn.resource.split(delimiter)[3]; if (!s3util.dnsCompatibleBucketName(bucket) || bucket.match(/\./)) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Bucket ARN is not DNS compatible. Got ' + bucket }); } //set parsed valid bucket req._parsedArn.bucket = bucket; }, /** * @api private */ populateParamFromArn: function populateParamFromArn(req) { var parsedArn = req._parsedArn; if (s3util.isArnInParam(req, 'Bucket')) { req.params.Bucket = parsedArn.bucket; } else if (s3util.isArnInParam(req, 'Name')) { req.params.Name = parsedArn.accessPoint; } }, /** * Populate URI according to the ARN */ populateUriFromArn: function populateUriFromArn(req) { var parsedArn = req._parsedArn; var endpoint = req.httpRequest.endpoint; var useArnRegion = req.service.config.s3UseArnRegion; endpoint.hostname = [ 's3-outposts', useArnRegion ? parsedArn.region : req.service.config.region, 'amazonaws.com' ].join('.'); endpoint.host = endpoint.hostname; }, /** * @api private */ populateEndpointForOutpostId: function populateEndpointForOutpostId(req) { var endpoint = req.httpRequest.endpoint; endpoint.hostname = [ 's3-outposts', req.service.config.region, 'amazonaws.com' ].join('.'); endpoint.host = endpoint.hostname; }, /** * @api private */ extractHostId: function(response) { var hostId = response.httpResponse.headers ? response.httpResponse.headers['x-amz-id-2'] : null; response.extendedRequestId = hostId; if (response.error) { response.error.extendedRequestId = hostId; } }, /** * @api private */ validateArnAccountWithParams: function validateArnAccountWithParams(req) { var params = req.params; var inputModel = req.service.api.operations[req.operation].input; if (inputModel.members.AccountId) { var parsedArn = req._parsedArn; if (parsedArn.accountId) { if (params.AccountId) { if (params.AccountId !== parsedArn.accountId) { throw AWS.util.error( new Error(), {code: 'ValidationError', message: 'AccountId in ARN and request params should be same.'} ); } } else { // Store accountId from ARN in params params.AccountId = parsedArn.accountId; } } } }, /** * @api private */ validateAccountId: function(request) { var params = request.params; if (!Object.prototype.hasOwnProperty.call(params, 'AccountId')) return; var accountId = params.AccountId; //validate type if (typeof accountId !== 'string') { throw AWS.util.error( new Error(), {code: 'ValidationError', message: 'AccountId must be a string.'} ); } //validate length if (accountId.length < 1 || accountId.length > 63) { throw AWS.util.error( new Error(), {code: 'ValidationError', message: 'AccountId length should be between 1 to 63 characters, inclusive.'} ); } //validate pattern var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; if (!hostPattern.test(accountId)) { throw AWS.util.error(new Error(), {code: 'ValidationError', message: 'AccountId should be hostname compatible. AccountId: ' + accountId}); } }, /** * @api private */ getSigningName: function getSigningName(req) { var _super = AWS.Service.prototype.getSigningName; if (req && req._parsedArn && req._parsedArn.service) { return req._parsedArn.service; } else if (req.params.OutpostId && (req.operation === 'createBucket' || req.operation === 'listRegionalBuckets')) { return 's3-outposts'; } else { return _super.call(this, req); } }, }); /***/ }), /***/ 35895: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var regionUtil = __webpack_require__(18262); var s3util = { /** * @api private */ isArnInParam: function isArnInParam(req, paramName) { var inputShape = (req.service.api.operations[req.operation] || {}).input || {}; var inputMembers = inputShape.members || {}; if (!req.params[paramName] || !inputMembers[paramName]) return false; return AWS.util.ARN.validate(req.params[paramName]); }, /** * Validate service component from ARN supplied in Bucket parameter */ validateArnService: function validateArnService(req) { var parsedArn = req._parsedArn; if (parsedArn.service !== 's3' && parsedArn.service !== 's3-outposts' && parsedArn.service !== 's3-object-lambda') { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'expect \'s3\' or \'s3-outposts\' or \'s3-object-lambda\' in ARN service component' }); } }, /** * Validate account ID from ARN supplied in Bucket parameter is a valid account */ validateArnAccount: function validateArnAccount(req) { var parsedArn = req._parsedArn; if (!/[0-9]{12}/.exec(parsedArn.accountId)) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'ARN accountID does not match regex "[0-9]{12}"' }); } }, /** * Validate ARN supplied in Bucket parameter is a valid access point ARN */ validateS3AccessPointArn: function validateS3AccessPointArn(req) { var parsedArn = req._parsedArn; //can be ':' or '/' var delimiter = parsedArn.resource['accesspoint'.length]; if (parsedArn.resource.split(delimiter).length !== 2) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Access Point ARN should have one resource accesspoint/{accesspointName}' }); } var accessPoint = parsedArn.resource.split(delimiter)[1]; var accessPointPrefix = accessPoint + '-' + parsedArn.accountId; if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\./)) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint }); } //set parsed valid access point req._parsedArn.accessPoint = accessPoint; }, /** * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN */ validateOutpostsArn: function validateOutpostsArn(req) { var parsedArn = req._parsedArn; if ( parsedArn.resource.indexOf('outpost:') !== 0 && parsedArn.resource.indexOf('outpost/') !== 0 ) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'ARN resource should begin with \'outpost/\'' }); } //can be ':' or '/' var delimiter = parsedArn.resource['outpost'.length]; var outpostId = parsedArn.resource.split(delimiter)[1]; var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); if (!dnsHostRegex.test(outpostId)) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Outpost resource in ARN is not DNS compatible. Got ' + outpostId }); } req._parsedArn.outpostId = outpostId; }, /** * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN */ validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) { var parsedArn = req._parsedArn; //can be ':' or '/' var delimiter = parsedArn.resource['outpost'.length]; if (parsedArn.resource.split(delimiter).length !== 4) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}' }); } var accessPoint = parsedArn.resource.split(delimiter)[3]; var accessPointPrefix = accessPoint + '-' + parsedArn.accountId; if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\./)) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint }); } //set parsed valid access point req._parsedArn.accessPoint = accessPoint; }, /** * Validate region field in ARN supplied in Bucket parameter is a valid region */ validateArnRegion: function validateArnRegion(req) { var useArnRegion = s3util.loadUseArnRegionConfig(req); var regionFromArn = req._parsedArn.region; var clientRegion = req.service.config.region; if (!regionFromArn) { throw AWS.util.error(new Error(), { code: 'InvalidARN', message: 'ARN region is empty' }); } if ( clientRegion.indexOf('fips') >= 0 || regionFromArn.indexOf('fips') >= 0 ) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'ARN endpoint is not compatible with FIPS region' }); } if (!useArnRegion && regionFromArn !== clientRegion) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'Configured region conflicts with access point region' }); } else if ( useArnRegion && regionUtil.getEndpointSuffix(regionFromArn) !== regionUtil.getEndpointSuffix(clientRegion) ) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'Configured region and access point region not in same partition' }); } if (req.service.config.useAccelerateEndpoint) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'useAccelerateEndpoint config is not supported with access point ARN' }); } if (req._parsedArn.service === 's3-outposts' && req.service.config.useDualstack) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'useDualstack config is not supported with outposts access point ARN' }); } }, loadUseArnRegionConfig: function loadUseArnRegionConfig(req) { var envName = 'AWS_S3_USE_ARN_REGION'; var configName = 's3_use_arn_region'; var useArnRegion = true; var originalConfig = req.service._originalConfig || {}; if (req.service.config.s3UseArnRegion !== undefined) { return req.service.config.s3UseArnRegion; } else if (originalConfig.s3UseArnRegion !== undefined) { useArnRegion = originalConfig.s3UseArnRegion === true; } else if (AWS.util.isNode()) { //load from environmental variable AWS_USE_ARN_REGION if (process.env[envName]) { var value = process.env[envName].trim().toLowerCase(); if (['false', 'true'].indexOf(value) < 0) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: envName + ' only accepts true or false. Got ' + process.env[envName], retryable: false }); } useArnRegion = value === 'true'; } else { //load from shared config property use_arn_region var profiles = {}; var profile = {}; try { profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader); profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; } catch (e) {} if (profile[configName]) { if (['false', 'true'].indexOf(profile[configName].trim().toLowerCase()) < 0) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: configName + ' only accepts true or false. Got ' + profile[configName], retryable: false }); } useArnRegion = profile[configName].trim().toLowerCase() === 'true'; } } } req.service.config.s3UseArnRegion = useArnRegion; return useArnRegion; }, /** * Validations before URI can be populated */ validatePopulateUriFromArn: function validatePopulateUriFromArn(req) { if (req.service._originalConfig && req.service._originalConfig.endpoint) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'Custom endpoint is not compatible with access point ARN' }); } if (req.service.config.s3ForcePathStyle) { throw AWS.util.error(new Error(), { code: 'InvalidConfiguration', message: 'Cannot construct path-style endpoint with access point' }); } }, /** * Returns true if the bucket name is DNS compatible. Buckets created * outside of the classic region MUST be DNS compatible. * * @api private */ dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) { var b = bucketName; var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/); var ipAddress = new RegExp(/(\d+\.){3}\d+/); var dots = new RegExp(/\.\./); return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false; }, }; /** * @api private */ module.exports = s3util; /***/ }), /***/ 94571: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.update(AWS.SQS.prototype, { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('build', this.buildEndpoint); if (request.service.config.computeChecksums) { if (request.operation === 'sendMessage') { request.addListener('extractData', this.verifySendMessageChecksum); } else if (request.operation === 'sendMessageBatch') { request.addListener('extractData', this.verifySendMessageBatchChecksum); } else if (request.operation === 'receiveMessage') { request.addListener('extractData', this.verifyReceiveMessageChecksum); } } }, /** * @api private */ verifySendMessageChecksum: function verifySendMessageChecksum(response) { if (!response.data) return; var md5 = response.data.MD5OfMessageBody; var body = this.params.MessageBody; var calculatedMd5 = this.service.calculateChecksum(body); if (calculatedMd5 !== md5) { var msg = 'Got "' + response.data.MD5OfMessageBody + '", expecting "' + calculatedMd5 + '".'; this.service.throwInvalidChecksumError(response, [response.data.MessageId], msg); } }, /** * @api private */ verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) { if (!response.data) return; var service = this.service; var entries = {}; var errors = []; var messageIds = []; AWS.util.arrayEach(response.data.Successful, function (entry) { entries[entry.Id] = entry; }); AWS.util.arrayEach(this.params.Entries, function (entry) { if (entries[entry.Id]) { var md5 = entries[entry.Id].MD5OfMessageBody; var body = entry.MessageBody; if (!service.isChecksumValid(md5, body)) { errors.push(entry.Id); messageIds.push(entries[entry.Id].MessageId); } } }); if (errors.length > 0) { service.throwInvalidChecksumError(response, messageIds, 'Invalid messages: ' + errors.join(', ')); } }, /** * @api private */ verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) { if (!response.data) return; var service = this.service; var messageIds = []; AWS.util.arrayEach(response.data.Messages, function(message) { var md5 = message.MD5OfBody; var body = message.Body; if (!service.isChecksumValid(md5, body)) { messageIds.push(message.MessageId); } }); if (messageIds.length > 0) { service.throwInvalidChecksumError(response, messageIds, 'Invalid messages: ' + messageIds.join(', ')); } }, /** * @api private */ throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) { response.error = AWS.util.error(new Error(), { retryable: true, code: 'InvalidChecksum', messageIds: ids, message: response.request.operation + ' returned an invalid MD5 response. ' + message }); }, /** * @api private */ isChecksumValid: function isChecksumValid(checksum, data) { return this.calculateChecksum(data) === checksum; }, /** * @api private */ calculateChecksum: function calculateChecksum(data) { return AWS.util.crypto.md5(data, 'hex'); }, /** * @api private */ buildEndpoint: function buildEndpoint(request) { var url = request.httpRequest.params.QueueUrl; if (url) { request.httpRequest.endpoint = new AWS.Endpoint(url); // signature version 4 requires the region name to be set, // sqs queue urls contain the region name var matches = request.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./); if (matches) request.httpRequest.region = matches[1]; } } }); /***/ }), /***/ 91055: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var resolveRegionalEndpointsFlag = __webpack_require__(85566); var ENV_REGIONAL_ENDPOINT_ENABLED = 'AWS_STS_REGIONAL_ENDPOINTS'; var CONFIG_REGIONAL_ENDPOINT_ENABLED = 'sts_regional_endpoints'; AWS.util.update(AWS.STS.prototype, { /** * @overload credentialsFrom(data, credentials = null) * Creates a credentials object from STS response data containing * credentials information. Useful for quickly setting AWS credentials. * * @note This is a low-level utility function. If you want to load temporary * credentials into your process for subsequent requests to AWS resources, * you should use {AWS.TemporaryCredentials} instead. * @param data [map] data retrieved from a call to {getFederatedToken}, * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. * @param credentials [AWS.Credentials] an optional credentials object to * fill instead of creating a new object. Useful when modifying an * existing credentials object from a refresh call. * @return [AWS.TemporaryCredentials] the set of temporary credentials * loaded from a raw STS operation response. * @example Using credentialsFrom to load global AWS credentials * var sts = new AWS.STS(); * sts.getSessionToken(function (err, data) { * if (err) console.log("Error getting credentials"); * else { * AWS.config.credentials = sts.credentialsFrom(data); * } * }); * @see AWS.TemporaryCredentials */ credentialsFrom: function credentialsFrom(data, credentials) { if (!data) return null; if (!credentials) credentials = new AWS.TemporaryCredentials(); credentials.expired = false; credentials.accessKeyId = data.Credentials.AccessKeyId; credentials.secretAccessKey = data.Credentials.SecretAccessKey; credentials.sessionToken = data.Credentials.SessionToken; credentials.expireTime = data.Credentials.Expiration; return credentials; }, assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) { return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback); }, assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback); }, /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.addListener('validate', this.optInRegionalEndpoint, true); }, /** * @api private */ optInRegionalEndpoint: function optInRegionalEndpoint(req) { var service = req.service; var config = service.config; config.stsRegionalEndpoints = resolveRegionalEndpointsFlag(service._originalConfig, { env: ENV_REGIONAL_ENDPOINT_ENABLED, sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED, clientConfig: 'stsRegionalEndpoints' }); if ( config.stsRegionalEndpoints === 'regional' && service.isGlobalEndpoint ) { //client will throw if region is not supplied; request will be signed with specified region if (!config.region) { throw AWS.util.error(new Error(), {code: 'ConfigError', message: 'Missing region in config'}); } var insertPoint = config.endpoint.indexOf('.amazonaws.com'); var regionalEndpoint = config.endpoint.substring(0, insertPoint) + '.' + config.region + config.endpoint.substring(insertPoint); req.httpRequest.updateEndpoint(regionalEndpoint); req.httpRequest.region = config.region; } } }); /***/ }), /***/ 31987: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); AWS.util.hideProperties(AWS, ['SimpleWorkflow']); /** * @constant * @readonly * Backwards compatibility for access to the {AWS.SWF} service class. */ AWS.SimpleWorkflow = AWS.SWF; /***/ }), /***/ 29697: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var IniLoader = __webpack_require__(95417).IniLoader; /** * Singleton object to load specified config/credentials files. * It will cache all the files ever loaded; */ module.exports.b = new IniLoader(); /***/ }), /***/ 95417: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var os = __webpack_require__(12087); var path = __webpack_require__(85622); function parseFile(filename, isConfig) { var content = AWS.util.ini.parse(AWS.util.readFileSync(filename)); var tmpContent = {}; Object.keys(content).forEach(function(profileName) { var profileContent = content[profileName]; profileName = isConfig ? profileName.replace(/^profile\s/, '') : profileName; Object.defineProperty(tmpContent, profileName, { value: profileContent, enumerable: true }); }); return tmpContent; } /** * Ini file loader class the same as that used in the SDK. It loads and * parses config and credentials files in .ini format and cache the content * to assure files are only read once. * Note that calling operations on the instance instantiated from this class * won't affect the behavior of SDK since SDK uses an internal singleton of * this class. * @!macro nobrowser */ AWS.IniLoader = AWS.util.inherit({ constructor: function IniLoader() { this.resolvedProfiles = {}; }, /** Remove all cached files. Used after config files are updated. */ clearCachedFiles: function clearCachedFiles() { this.resolvedProfiles = {}; }, /** * Load configurations from config/credentials files and cache them * for later use. If no file is specified it will try to load default * files. * @param options [map] information describing the file * @option options filename [String] ('~/.aws/credentials' or defined by * AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if * isConfig is set to true) * path to the file to be read. * @option options isConfig [Boolean] (false) True to read config file. * @return [map] object containing contents from file in key-value * pairs. */ loadFrom: function loadFrom(options) { options = options || {}; var isConfig = options.isConfig === true; var filename = options.filename || this.getDefaultFilePath(isConfig); if (!this.resolvedProfiles[filename]) { var fileContent = this.parseFile(filename, isConfig); Object.defineProperty(this.resolvedProfiles, filename, { value: fileContent }); } return this.resolvedProfiles[filename]; }, /** * @api private */ parseFile: parseFile, /** * @api private */ getDefaultFilePath: function getDefaultFilePath(isConfig) { return path.join( this.getHomeDir(), '.aws', isConfig ? 'config' : 'credentials' ); }, /** * @api private */ getHomeDir: function getHomeDir() { var env = process.env; var home = env.HOME || env.USERPROFILE || (env.HOMEPATH ? ((env.HOMEDRIVE || 'C:/') + env.HOMEPATH) : null); if (home) { return home; } if (typeof os.homedir === 'function') { return os.homedir(); } throw AWS.util.error( new Error('Cannot load credentials, HOME path not set') ); } }); var IniLoader = AWS.IniLoader; module.exports = { IniLoader: IniLoader, parseFile: parseFile, }; /***/ }), /***/ 60328: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; /** * @api private */ var expiresHeader = 'presigned-expires'; /** * @api private */ function signedUrlBuilder(request) { var expires = request.httpRequest.headers[expiresHeader]; var signerClass = request.service.getSignerClass(request); delete request.httpRequest.headers['User-Agent']; delete request.httpRequest.headers['X-Amz-User-Agent']; if (signerClass === AWS.Signers.V4) { if (expires > 604800) { // one week expiry is invalid var message = 'Presigning does not support expiry time greater ' + 'than a week with SigV4 signing.'; throw AWS.util.error(new Error(), { code: 'InvalidExpiryTime', message: message, retryable: false }); } request.httpRequest.headers[expiresHeader] = expires; } else if (signerClass === AWS.Signers.S3) { var now = request.service ? request.service.getSkewCorrectedDate() : AWS.util.date.getDate(); request.httpRequest.headers[expiresHeader] = parseInt( AWS.util.date.unixTimestamp(now) + expires, 10).toString(); } else { throw AWS.util.error(new Error(), { message: 'Presigning only supports S3 or SigV4 signing.', code: 'UnsupportedSigner', retryable: false }); } } /** * @api private */ function signedUrlSigner(request) { var endpoint = request.httpRequest.endpoint; var parsedUrl = AWS.util.urlParse(request.httpRequest.path); var queryParams = {}; if (parsedUrl.search) { queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1)); } var auth = request.httpRequest.headers['Authorization'].split(' '); if (auth[0] === 'AWS') { auth = auth[1].split(':'); queryParams['Signature'] = auth.pop(); queryParams['AWSAccessKeyId'] = auth.join(':'); AWS.util.each(request.httpRequest.headers, function (key, value) { if (key === expiresHeader) key = 'Expires'; if (key.indexOf('x-amz-meta-') === 0) { // Delete existing, potentially not normalized key delete queryParams[key]; key = key.toLowerCase(); } queryParams[key] = value; }); delete request.httpRequest.headers[expiresHeader]; delete queryParams['Authorization']; delete queryParams['Host']; } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing auth.shift(); var rest = auth.join(' '); var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1]; queryParams['X-Amz-Signature'] = signature; delete queryParams['Expires']; } // build URL endpoint.pathname = parsedUrl.pathname; endpoint.search = AWS.util.queryParamsToString(queryParams); } /** * @api private */ AWS.Signers.Presign = inherit({ /** * @api private */ sign: function sign(request, expireTime, callback) { request.httpRequest.headers[expiresHeader] = expireTime || 3600; request.on('build', signedUrlBuilder); request.on('sign', signedUrlSigner); request.removeListener('afterBuild', AWS.EventListeners.Core.SET_CONTENT_LENGTH); request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); request.emit('beforePresign', [request]); if (callback) { request.build(function() { if (this.response.error) callback(this.response.error); else { callback(null, AWS.util.urlFormat(request.httpRequest.endpoint)); } }); } else { request.build(); if (request.response.error) throw request.response.error; return AWS.util.urlFormat(request.httpRequest.endpoint); } } }); /** * @api private */ module.exports = AWS.Signers.Presign; /***/ }), /***/ 9897: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; /** * @api private */ AWS.Signers.RequestSigner = inherit({ constructor: function RequestSigner(request) { this.request = request; }, setServiceClientId: function setServiceClientId(id) { this.serviceClientId = id; }, getServiceClientId: function getServiceClientId() { return this.serviceClientId; } }); AWS.Signers.RequestSigner.getVersion = function getVersion(version) { switch (version) { case 'v2': return AWS.Signers.V2; case 'v3': return AWS.Signers.V3; case 's3v4': return AWS.Signers.V4; case 'v4': return AWS.Signers.V4; case 's3': return AWS.Signers.S3; case 'v3https': return AWS.Signers.V3Https; } throw new Error('Unknown signing version ' + version); }; __webpack_require__(28489); __webpack_require__(66458); __webpack_require__(24473); __webpack_require__(26529); __webpack_require__(58616); __webpack_require__(60328); /***/ }), /***/ 58616: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; /** * @api private */ AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, { /** * When building the stringToSign, these sub resource params should be * part of the canonical resource string with their NON-decoded values */ subResources: { 'acl': 1, 'accelerate': 1, 'analytics': 1, 'cors': 1, 'lifecycle': 1, 'delete': 1, 'inventory': 1, 'location': 1, 'logging': 1, 'metrics': 1, 'notification': 1, 'partNumber': 1, 'policy': 1, 'requestPayment': 1, 'replication': 1, 'restore': 1, 'tagging': 1, 'torrent': 1, 'uploadId': 1, 'uploads': 1, 'versionId': 1, 'versioning': 1, 'versions': 1, 'website': 1 }, // when building the stringToSign, these querystring params should be // part of the canonical resource string with their NON-encoded values responseHeaders: { 'response-content-type': 1, 'response-content-language': 1, 'response-expires': 1, 'response-cache-control': 1, 'response-content-disposition': 1, 'response-content-encoding': 1 }, addAuthorization: function addAuthorization(credentials, date) { if (!this.request.headers['presigned-expires']) { this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date); } if (credentials.sessionToken) { // presigned URLs require this header to be lowercased this.request.headers['x-amz-security-token'] = credentials.sessionToken; } var signature = this.sign(credentials.secretAccessKey, this.stringToSign()); var auth = 'AWS ' + credentials.accessKeyId + ':' + signature; this.request.headers['Authorization'] = auth; }, stringToSign: function stringToSign() { var r = this.request; var parts = []; parts.push(r.method); parts.push(r.headers['Content-MD5'] || ''); parts.push(r.headers['Content-Type'] || ''); // This is the "Date" header, but we use X-Amz-Date. // The S3 signing mechanism requires us to pass an empty // string for this Date header regardless. parts.push(r.headers['presigned-expires'] || ''); var headers = this.canonicalizedAmzHeaders(); if (headers) parts.push(headers); parts.push(this.canonicalizedResource()); return parts.join('\n'); }, canonicalizedAmzHeaders: function canonicalizedAmzHeaders() { var amzHeaders = []; AWS.util.each(this.request.headers, function (name) { if (name.match(/^x-amz-/i)) amzHeaders.push(name); }); amzHeaders.sort(function (a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1; }); var parts = []; AWS.util.arrayEach.call(this, amzHeaders, function (name) { parts.push(name.toLowerCase() + ':' + String(this.request.headers[name])); }); return parts.join('\n'); }, canonicalizedResource: function canonicalizedResource() { var r = this.request; var parts = r.path.split('?'); var path = parts[0]; var querystring = parts[1]; var resource = ''; if (r.virtualHostedBucket) resource += '/' + r.virtualHostedBucket; resource += path; if (querystring) { // collect a list of sub resources and query params that need to be signed var resources = []; AWS.util.arrayEach.call(this, querystring.split('&'), function (param) { var name = param.split('=')[0]; var value = param.split('=')[1]; if (this.subResources[name] || this.responseHeaders[name]) { var subresource = { name: name }; if (value !== undefined) { if (this.subResources[name]) { subresource.value = value; } else { subresource.value = decodeURIComponent(value); } } resources.push(subresource); } }); resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; }); if (resources.length) { querystring = []; AWS.util.arrayEach(resources, function (res) { if (res.value === undefined) { querystring.push(res.name); } else { querystring.push(res.name + '=' + res.value); } }); resource += '?' + querystring.join('&'); } } return resource; }, sign: function sign(secret, string) { return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1'); } }); /** * @api private */ module.exports = AWS.Signers.S3; /***/ }), /***/ 28489: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; /** * @api private */ AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { addAuthorization: function addAuthorization(credentials, date) { if (!date) date = AWS.util.date.getDate(); var r = this.request; r.params.Timestamp = AWS.util.date.iso8601(date); r.params.SignatureVersion = '2'; r.params.SignatureMethod = 'HmacSHA256'; r.params.AWSAccessKeyId = credentials.accessKeyId; if (credentials.sessionToken) { r.params.SecurityToken = credentials.sessionToken; } delete r.params.Signature; // delete old Signature for re-signing r.params.Signature = this.signature(credentials); r.body = AWS.util.queryParamsToString(r.params); r.headers['Content-Length'] = r.body.length; }, signature: function signature(credentials) { return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); }, stringToSign: function stringToSign() { var parts = []; parts.push(this.request.method); parts.push(this.request.endpoint.host.toLowerCase()); parts.push(this.request.pathname()); parts.push(AWS.util.queryParamsToString(this.request.params)); return parts.join('\n'); } }); /** * @api private */ module.exports = AWS.Signers.V2; /***/ }), /***/ 66458: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; /** * @api private */ AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { addAuthorization: function addAuthorization(credentials, date) { var datetime = AWS.util.date.rfc822(date); this.request.headers['X-Amz-Date'] = datetime; if (credentials.sessionToken) { this.request.headers['x-amz-security-token'] = credentials.sessionToken; } this.request.headers['X-Amzn-Authorization'] = this.authorization(credentials, datetime); }, authorization: function authorization(credentials) { return 'AWS3 ' + 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + 'Algorithm=HmacSHA256,' + 'SignedHeaders=' + this.signedHeaders() + ',' + 'Signature=' + this.signature(credentials); }, signedHeaders: function signedHeaders() { var headers = []; AWS.util.arrayEach(this.headersToSign(), function iterator(h) { headers.push(h.toLowerCase()); }); return headers.sort().join(';'); }, canonicalHeaders: function canonicalHeaders() { var headers = this.request.headers; var parts = []; AWS.util.arrayEach(this.headersToSign(), function iterator(h) { parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim()); }); return parts.sort().join('\n') + '\n'; }, headersToSign: function headersToSign() { var headers = []; AWS.util.each(this.request.headers, function iterator(k) { if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) { headers.push(k); } }); return headers; }, signature: function signature(credentials) { return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); }, stringToSign: function stringToSign() { var parts = []; parts.push(this.request.method); parts.push('/'); parts.push(''); parts.push(this.canonicalHeaders()); parts.push(this.request.body); return AWS.util.crypto.sha256(parts.join('\n')); } }); /** * @api private */ module.exports = AWS.Signers.V3; /***/ }), /***/ 24473: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var inherit = AWS.util.inherit; __webpack_require__(66458); /** * @api private */ AWS.Signers.V3Https = inherit(AWS.Signers.V3, { authorization: function authorization(credentials) { return 'AWS3-HTTPS ' + 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + 'Algorithm=HmacSHA256,' + 'Signature=' + this.signature(credentials); }, stringToSign: function stringToSign() { return this.request.headers['X-Amz-Date']; } }); /** * @api private */ module.exports = AWS.Signers.V3Https; /***/ }), /***/ 26529: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var v4Credentials = __webpack_require__(62660); var inherit = AWS.util.inherit; /** * @api private */ var expiresHeader = 'presigned-expires'; /** * @api private */ AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, { constructor: function V4(request, serviceName, options) { AWS.Signers.RequestSigner.call(this, request); this.serviceName = serviceName; options = options || {}; this.signatureCache = typeof options.signatureCache === 'boolean' ? options.signatureCache : true; this.operation = options.operation; this.signatureVersion = options.signatureVersion; }, algorithm: 'AWS4-HMAC-SHA256', addAuthorization: function addAuthorization(credentials, date) { var datetime = AWS.util.date.iso8601(date).replace(/[:\-]|\.\d{3}/g, ''); if (this.isPresigned()) { this.updateForPresigned(credentials, datetime); } else { this.addHeaders(credentials, datetime); } this.request.headers['Authorization'] = this.authorization(credentials, datetime); }, addHeaders: function addHeaders(credentials, datetime) { this.request.headers['X-Amz-Date'] = datetime; if (credentials.sessionToken) { this.request.headers['x-amz-security-token'] = credentials.sessionToken; } }, updateForPresigned: function updateForPresigned(credentials, datetime) { var credString = this.credentialString(datetime); var qs = { 'X-Amz-Date': datetime, 'X-Amz-Algorithm': this.algorithm, 'X-Amz-Credential': credentials.accessKeyId + '/' + credString, 'X-Amz-Expires': this.request.headers[expiresHeader], 'X-Amz-SignedHeaders': this.signedHeaders() }; if (credentials.sessionToken) { qs['X-Amz-Security-Token'] = credentials.sessionToken; } if (this.request.headers['Content-Type']) { qs['Content-Type'] = this.request.headers['Content-Type']; } if (this.request.headers['Content-MD5']) { qs['Content-MD5'] = this.request.headers['Content-MD5']; } if (this.request.headers['Cache-Control']) { qs['Cache-Control'] = this.request.headers['Cache-Control']; } // need to pull in any other X-Amz-* headers AWS.util.each.call(this, this.request.headers, function(key, value) { if (key === expiresHeader) return; if (this.isSignableHeader(key)) { var lowerKey = key.toLowerCase(); // Metadata should be normalized if (lowerKey.indexOf('x-amz-meta-') === 0) { qs[lowerKey] = value; } else if (lowerKey.indexOf('x-amz-') === 0) { qs[key] = value; } } }); var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?'; this.request.path += sep + AWS.util.queryParamsToString(qs); }, authorization: function authorization(credentials, datetime) { var parts = []; var credString = this.credentialString(datetime); parts.push(this.algorithm + ' Credential=' + credentials.accessKeyId + '/' + credString); parts.push('SignedHeaders=' + this.signedHeaders()); parts.push('Signature=' + this.signature(credentials, datetime)); return parts.join(', '); }, signature: function signature(credentials, datetime) { var signingKey = v4Credentials.getSigningKey( credentials, datetime.substr(0, 8), this.request.region, this.serviceName, this.signatureCache ); return AWS.util.crypto.hmac(signingKey, this.stringToSign(datetime), 'hex'); }, stringToSign: function stringToSign(datetime) { var parts = []; parts.push('AWS4-HMAC-SHA256'); parts.push(datetime); parts.push(this.credentialString(datetime)); parts.push(this.hexEncodedHash(this.canonicalString())); return parts.join('\n'); }, canonicalString: function canonicalString() { var parts = [], pathname = this.request.pathname(); if (this.serviceName !== 's3' && this.signatureVersion !== 's3v4') pathname = AWS.util.uriEscapePath(pathname); parts.push(this.request.method); parts.push(pathname); parts.push(this.request.search()); parts.push(this.canonicalHeaders() + '\n'); parts.push(this.signedHeaders()); parts.push(this.hexEncodedBodyHash()); return parts.join('\n'); }, canonicalHeaders: function canonicalHeaders() { var headers = []; AWS.util.each.call(this, this.request.headers, function (key, item) { headers.push([key, item]); }); headers.sort(function (a, b) { return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1; }); var parts = []; AWS.util.arrayEach.call(this, headers, function (item) { var key = item[0].toLowerCase(); if (this.isSignableHeader(key)) { var value = item[1]; if (typeof value === 'undefined' || value === null || typeof value.toString !== 'function') { throw AWS.util.error(new Error('Header ' + key + ' contains invalid value'), { code: 'InvalidHeader' }); } parts.push(key + ':' + this.canonicalHeaderValues(value.toString())); } }); return parts.join('\n'); }, canonicalHeaderValues: function canonicalHeaderValues(values) { return values.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); }, signedHeaders: function signedHeaders() { var keys = []; AWS.util.each.call(this, this.request.headers, function (key) { key = key.toLowerCase(); if (this.isSignableHeader(key)) keys.push(key); }); return keys.sort().join(';'); }, credentialString: function credentialString(datetime) { return v4Credentials.createScope( datetime.substr(0, 8), this.request.region, this.serviceName ); }, hexEncodedHash: function hash(string) { return AWS.util.crypto.sha256(string, 'hex'); }, hexEncodedBodyHash: function hexEncodedBodyHash() { var request = this.request; if (this.isPresigned() && this.serviceName === 's3' && !request.body) { return 'UNSIGNED-PAYLOAD'; } else if (request.headers['X-Amz-Content-Sha256']) { return request.headers['X-Amz-Content-Sha256']; } else { return this.hexEncodedHash(this.request.body || ''); } }, unsignableHeaders: [ 'authorization', 'content-type', 'content-length', 'user-agent', expiresHeader, 'expect', 'x-amzn-trace-id' ], isSignableHeader: function isSignableHeader(key) { if (key.toLowerCase().indexOf('x-amz-') === 0) return true; return this.unsignableHeaders.indexOf(key) < 0; }, isPresigned: function isPresigned() { return this.request.headers[expiresHeader] ? true : false; } }); /** * @api private */ module.exports = AWS.Signers.V4; /***/ }), /***/ 62660: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); /** * @api private */ var cachedSecret = {}; /** * @api private */ var cacheQueue = []; /** * @api private */ var maxCacheEntries = 50; /** * @api private */ var v4Identifier = 'aws4_request'; /** * @api private */ module.exports = { /** * @api private * * @param date [String] * @param region [String] * @param serviceName [String] * @return [String] */ createScope: function createScope(date, region, serviceName) { return [ date.substr(0, 8), region, serviceName, v4Identifier ].join('/'); }, /** * @api private * * @param credentials [Credentials] * @param date [String] * @param region [String] * @param service [String] * @param shouldCache [Boolean] * @return [String] */ getSigningKey: function getSigningKey( credentials, date, region, service, shouldCache ) { var credsIdentifier = AWS.util.crypto .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64'); var cacheKey = [credsIdentifier, date, region, service].join('_'); shouldCache = shouldCache !== false; if (shouldCache && (cacheKey in cachedSecret)) { return cachedSecret[cacheKey]; } var kDate = AWS.util.crypto.hmac( 'AWS4' + credentials.secretAccessKey, date, 'buffer' ); var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer'); var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer'); var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer'); if (shouldCache) { cachedSecret[cacheKey] = signingKey; cacheQueue.push(cacheKey); if (cacheQueue.length > maxCacheEntries) { // remove the oldest entry (not the least recently used) delete cachedSecret[cacheQueue.shift()]; } } return signingKey; }, /** * @api private * * Empties the derived signing key cache. Made available for testing purposes * only. */ emptyCache: function emptyCache() { cachedSecret = {}; cacheQueue = []; } }; /***/ }), /***/ 68118: /***/ ((module) => { function AcceptorStateMachine(states, state) { this.currentState = state || null; this.states = states || {}; } AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) { if (typeof finalState === 'function') { inputError = bindObject; bindObject = done; done = finalState; finalState = null; } var self = this; var state = self.states[self.currentState]; state.fn.call(bindObject || self, inputError, function(err) { if (err) { if (state.fail) self.currentState = state.fail; else return done ? done.call(bindObject, err) : null; } else { if (state.accept) self.currentState = state.accept; else return done ? done.call(bindObject) : null; } if (self.currentState === finalState) { return done ? done.call(bindObject, err) : null; } self.runTo(finalState, done, bindObject, err); }); }; AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) { if (typeof acceptState === 'function') { fn = acceptState; acceptState = null; failState = null; } else if (typeof failState === 'function') { fn = failState; failState = null; } if (!this.currentState) this.currentState = name; this.states[name] = { accept: acceptState, fail: failState, fn: fn }; return this; }; /** * @api private */ module.exports = AcceptorStateMachine; /***/ }), /***/ 77985: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint guard-for-in:0 */ var AWS; /** * A set of utility methods for use with the AWS SDK. * * @!attribute abort * Return this value from an iterator function {each} or {arrayEach} * to break out of the iteration. * @example Breaking out of an iterator function * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) { * if (key == 'b') return AWS.util.abort; * }); * @see each * @see arrayEach * @api private */ var util = { environment: 'nodejs', engine: function engine() { if (util.isBrowser() && typeof navigator !== 'undefined') { return navigator.userAgent; } else { var engine = process.platform + '/' + process.version; if (process.env.AWS_EXECUTION_ENV) { engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV; } return engine; } }, userAgent: function userAgent() { var name = util.environment; var agent = 'aws-sdk-' + name + '/' + __webpack_require__(28437).VERSION; if (name === 'nodejs') agent += ' ' + util.engine(); return agent; }, uriEscape: function uriEscape(string) { var output = encodeURIComponent(string); output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape); // AWS percent-encodes some extra non-standard characters in a URI output = output.replace(/[*]/g, function(ch) { return '%' + ch.charCodeAt(0).toString(16).toUpperCase(); }); return output; }, uriEscapePath: function uriEscapePath(string) { var parts = []; util.arrayEach(string.split('/'), function (part) { parts.push(util.uriEscape(part)); }); return parts.join('/'); }, urlParse: function urlParse(url) { return util.url.parse(url); }, urlFormat: function urlFormat(url) { return util.url.format(url); }, queryStringParse: function queryStringParse(qs) { return util.querystring.parse(qs); }, queryParamsToString: function queryParamsToString(params) { var items = []; var escape = util.uriEscape; var sortedKeys = Object.keys(params).sort(); util.arrayEach(sortedKeys, function(name) { var value = params[name]; var ename = escape(name); var result = ename + '='; if (Array.isArray(value)) { var vals = []; util.arrayEach(value, function(item) { vals.push(escape(item)); }); result = ename + '=' + vals.sort().join('&' + ename + '='); } else if (value !== undefined && value !== null) { result = ename + '=' + escape(value); } items.push(result); }); return items.join('&'); }, readFileSync: function readFileSync(path) { if (util.isBrowser()) return null; return __webpack_require__(35747).readFileSync(path, 'utf-8'); }, base64: { encode: function encode64(string) { if (typeof string === 'number') { throw util.error(new Error('Cannot base64 encode number ' + string)); } if (string === null || typeof string === 'undefined') { return string; } var buf = util.buffer.toBuffer(string); return buf.toString('base64'); }, decode: function decode64(string) { if (typeof string === 'number') { throw util.error(new Error('Cannot base64 decode number ' + string)); } if (string === null || typeof string === 'undefined') { return string; } return util.buffer.toBuffer(string, 'base64'); } }, buffer: { /** * Buffer constructor for Node buffer and buffer pollyfill */ toBuffer: function(data, encoding) { return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ? util.Buffer.from(data, encoding) : new util.Buffer(data, encoding); }, alloc: function(size, fill, encoding) { if (typeof size !== 'number') { throw new Error('size passed to alloc must be a number.'); } if (typeof util.Buffer.alloc === 'function') { return util.Buffer.alloc(size, fill, encoding); } else { var buf = new util.Buffer(size); if (fill !== undefined && typeof buf.fill === 'function') { buf.fill(fill, undefined, undefined, encoding); } return buf; } }, toStream: function toStream(buffer) { if (!util.Buffer.isBuffer(buffer)) buffer = util.buffer.toBuffer(buffer); var readable = new (util.stream.Readable)(); var pos = 0; readable._read = function(size) { if (pos >= buffer.length) return readable.push(null); var end = pos + size; if (end > buffer.length) end = buffer.length; readable.push(buffer.slice(pos, end)); pos = end; }; return readable; }, /** * Concatenates a list of Buffer objects. */ concat: function(buffers) { var length = 0, offset = 0, buffer = null, i; for (i = 0; i < buffers.length; i++) { length += buffers[i].length; } buffer = util.buffer.alloc(length); for (i = 0; i < buffers.length; i++) { buffers[i].copy(buffer, offset); offset += buffers[i].length; } return buffer; } }, string: { byteLength: function byteLength(string) { if (string === null || string === undefined) return 0; if (typeof string === 'string') string = util.buffer.toBuffer(string); if (typeof string.byteLength === 'number') { return string.byteLength; } else if (typeof string.length === 'number') { return string.length; } else if (typeof string.size === 'number') { return string.size; } else if (typeof string.path === 'string') { return __webpack_require__(35747).lstatSync(string.path).size; } else { throw util.error(new Error('Cannot determine length of ' + string), { object: string }); } }, upperFirst: function upperFirst(string) { return string[0].toUpperCase() + string.substr(1); }, lowerFirst: function lowerFirst(string) { return string[0].toLowerCase() + string.substr(1); } }, ini: { parse: function string(ini) { var currentSection, map = {}; util.arrayEach(ini.split(/\r?\n/), function(line) { line = line.split(/(^|\s)[;#]/)[0]; // remove comments var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/); if (section) { currentSection = section[1]; if (currentSection === '__proto__' || currentSection.split(/\s/)[1] === '__proto__') { throw util.error( new Error('Cannot load profile name \'' + currentSection + '\' from shared ini file.') ); } } else if (currentSection) { var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/); if (item) { map[currentSection] = map[currentSection] || {}; map[currentSection][item[1]] = item[2]; } } }); return map; } }, fn: { noop: function() {}, callback: function (err) { if (err) throw err; }, /** * Turn a synchronous function into as "async" function by making it call * a callback. The underlying function is called with all but the last argument, * which is treated as the callback. The callback is passed passed a first argument * of null on success to mimick standard node callbacks. */ makeAsync: function makeAsync(fn, expectedArgs) { if (expectedArgs && expectedArgs <= fn.length) { return fn; } return function() { var args = Array.prototype.slice.call(arguments, 0); var callback = args.pop(); var result = fn.apply(null, args); callback(result); }; } }, /** * Date and time utility functions. */ date: { /** * @return [Date] the current JavaScript date object. Since all * AWS services rely on this date object, you can override * this function to provide a special time value to AWS service * requests. */ getDate: function getDate() { if (!AWS) AWS = __webpack_require__(28437); if (AWS.config.systemClockOffset) { // use offset when non-zero return new Date(new Date().getTime() + AWS.config.systemClockOffset); } else { return new Date(); } }, /** * @return [String] the date in ISO-8601 format */ iso8601: function iso8601(date) { if (date === undefined) { date = util.date.getDate(); } return date.toISOString().replace(/\.\d{3}Z$/, 'Z'); }, /** * @return [String] the date in RFC 822 format */ rfc822: function rfc822(date) { if (date === undefined) { date = util.date.getDate(); } return date.toUTCString(); }, /** * @return [Integer] the UNIX timestamp value for the current time */ unixTimestamp: function unixTimestamp(date) { if (date === undefined) { date = util.date.getDate(); } return date.getTime() / 1000; }, /** * @param [String,number,Date] date * @return [Date] */ from: function format(date) { if (typeof date === 'number') { return new Date(date * 1000); // unix timestamp } else { return new Date(date); } }, /** * Given a Date or date-like value, this function formats the * date into a string of the requested value. * @param [String,number,Date] date * @param [String] formatter Valid formats are: # * 'iso8601' # * 'rfc822' # * 'unixTimestamp' * @return [String] */ format: function format(date, formatter) { if (!formatter) formatter = 'iso8601'; return util.date[formatter](util.date.from(date)); }, parseTimestamp: function parseTimestamp(value) { if (typeof value === 'number') { // unix timestamp (number) return new Date(value * 1000); } else if (value.match(/^\d+$/)) { // unix timestamp return new Date(value * 1000); } else if (value.match(/^\d{4}/)) { // iso8601 return new Date(value); } else if (value.match(/^\w{3},/)) { // rfc822 return new Date(value); } else { throw util.error( new Error('unhandled timestamp format: ' + value), {code: 'TimestampParserError'}); } } }, crypto: { crc32Table: [ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D], crc32: function crc32(data) { var tbl = util.crypto.crc32Table; var crc = 0 ^ -1; if (typeof data === 'string') { data = util.buffer.toBuffer(data); } for (var i = 0; i < data.length; i++) { var code = data.readUInt8(i); crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF]; } return (crc ^ -1) >>> 0; }, hmac: function hmac(key, string, digest, fn) { if (!digest) digest = 'binary'; if (digest === 'buffer') { digest = undefined; } if (!fn) fn = 'sha256'; if (typeof string === 'string') string = util.buffer.toBuffer(string); return util.crypto.lib.createHmac(fn, key).update(string).digest(digest); }, md5: function md5(data, digest, callback) { return util.crypto.hash('md5', data, digest, callback); }, sha256: function sha256(data, digest, callback) { return util.crypto.hash('sha256', data, digest, callback); }, hash: function(algorithm, data, digest, callback) { var hash = util.crypto.createHash(algorithm); if (!digest) { digest = 'binary'; } if (digest === 'buffer') { digest = undefined; } if (typeof data === 'string') data = util.buffer.toBuffer(data); var sliceFn = util.arraySliceFn(data); var isBuffer = util.Buffer.isBuffer(data); //Identifying objects with an ArrayBuffer as buffers if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true; if (callback && typeof data === 'object' && typeof data.on === 'function' && !isBuffer) { data.on('data', function(chunk) { hash.update(chunk); }); data.on('error', function(err) { callback(err); }); data.on('end', function() { callback(null, hash.digest(digest)); }); } else if (callback && sliceFn && !isBuffer && typeof FileReader !== 'undefined') { // this might be a File/Blob var index = 0, size = 1024 * 512; var reader = new FileReader(); reader.onerror = function() { callback(new Error('Failed to read data.')); }; reader.onload = function() { var buf = new util.Buffer(new Uint8Array(reader.result)); hash.update(buf); index += buf.length; reader._continueReading(); }; reader._continueReading = function() { if (index >= data.size) { callback(null, hash.digest(digest)); return; } var back = index + size; if (back > data.size) back = data.size; reader.readAsArrayBuffer(sliceFn.call(data, index, back)); }; reader._continueReading(); } else { if (util.isBrowser() && typeof data === 'object' && !isBuffer) { data = new util.Buffer(new Uint8Array(data)); } var out = hash.update(data).digest(digest); if (callback) callback(null, out); return out; } }, toHex: function toHex(data) { var out = []; for (var i = 0; i < data.length; i++) { out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2)); } return out.join(''); }, createHash: function createHash(algorithm) { return util.crypto.lib.createHash(algorithm); } }, /** @!ignore */ /* Abort constant */ abort: {}, each: function each(object, iterFunction) { for (var key in object) { if (Object.prototype.hasOwnProperty.call(object, key)) { var ret = iterFunction.call(this, key, object[key]); if (ret === util.abort) break; } } }, arrayEach: function arrayEach(array, iterFunction) { for (var idx in array) { if (Object.prototype.hasOwnProperty.call(array, idx)) { var ret = iterFunction.call(this, array[idx], parseInt(idx, 10)); if (ret === util.abort) break; } } }, update: function update(obj1, obj2) { util.each(obj2, function iterator(key, item) { obj1[key] = item; }); return obj1; }, merge: function merge(obj1, obj2) { return util.update(util.copy(obj1), obj2); }, copy: function copy(object) { if (object === null || object === undefined) return object; var dupe = {}; // jshint forin:false for (var key in object) { dupe[key] = object[key]; } return dupe; }, isEmpty: function isEmpty(obj) { for (var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return false; } } return true; }, arraySliceFn: function arraySliceFn(obj) { var fn = obj.slice || obj.webkitSlice || obj.mozSlice; return typeof fn === 'function' ? fn : null; }, isType: function isType(obj, type) { // handle cross-"frame" objects if (typeof type === 'function') type = util.typeName(type); return Object.prototype.toString.call(obj) === '[object ' + type + ']'; }, typeName: function typeName(type) { if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name; var str = type.toString(); var match = str.match(/^\s*function (.+)\(/); return match ? match[1] : str; }, error: function error(err, options) { var originalError = null; if (typeof err.message === 'string' && err.message !== '') { if (typeof options === 'string' || (options && options.message)) { originalError = util.copy(err); originalError.message = err.message; } } err.message = err.message || null; if (typeof options === 'string') { err.message = options; } else if (typeof options === 'object' && options !== null) { util.update(err, options); if (options.message) err.message = options.message; if (options.code || options.name) err.code = options.code || options.name; if (options.stack) err.stack = options.stack; } if (typeof Object.defineProperty === 'function') { Object.defineProperty(err, 'name', {writable: true, enumerable: false}); Object.defineProperty(err, 'message', {enumerable: true}); } err.name = String(options && options.name || err.name || err.code || 'Error'); err.time = new Date(); if (originalError) err.originalError = originalError; return err; }, /** * @api private */ inherit: function inherit(klass, features) { var newObject = null; if (features === undefined) { features = klass; klass = Object; newObject = {}; } else { var ctor = function ConstructorWrapper() {}; ctor.prototype = klass.prototype; newObject = new ctor(); } // constructor not supplied, create pass-through ctor if (features.constructor === Object) { features.constructor = function() { if (klass !== Object) { return klass.apply(this, arguments); } }; } features.constructor.prototype = newObject; util.update(features.constructor.prototype, features); features.constructor.__super__ = klass; return features.constructor; }, /** * @api private */ mixin: function mixin() { var klass = arguments[0]; for (var i = 1; i < arguments.length; i++) { // jshint forin:false for (var prop in arguments[i].prototype) { var fn = arguments[i].prototype[prop]; if (prop !== 'constructor') { klass.prototype[prop] = fn; } } } return klass; }, /** * @api private */ hideProperties: function hideProperties(obj, props) { if (typeof Object.defineProperty !== 'function') return; util.arrayEach(props, function (key) { Object.defineProperty(obj, key, { enumerable: false, writable: true, configurable: true }); }); }, /** * @api private */ property: function property(obj, name, value, enumerable, isValue) { var opts = { configurable: true, enumerable: enumerable !== undefined ? enumerable : true }; if (typeof value === 'function' && !isValue) { opts.get = value; } else { opts.value = value; opts.writable = true; } Object.defineProperty(obj, name, opts); }, /** * @api private */ memoizedProperty: function memoizedProperty(obj, name, get, enumerable) { var cachedValue = null; // build enumerable attribute for each value with lazy accessor. util.property(obj, name, function() { if (cachedValue === null) { cachedValue = get(); } return cachedValue; }, enumerable); }, /** * TODO Remove in major version revision * This backfill populates response data without the * top-level payload name. * * @api private */ hoistPayloadMember: function hoistPayloadMember(resp) { var req = resp.request; var operationName = req.operation; var operation = req.service.api.operations[operationName]; var output = operation.output; if (output.payload && !operation.hasEventOutput) { var payloadMember = output.members[output.payload]; var responsePayload = resp.data[output.payload]; if (payloadMember.type === 'structure') { util.each(responsePayload, function(key, value) { util.property(resp.data, key, value, false); }); } } }, /** * Compute SHA-256 checksums of streams * * @api private */ computeSha256: function computeSha256(body, done) { if (util.isNode()) { var Stream = util.stream.Stream; var fs = __webpack_require__(35747); if (typeof Stream === 'function' && body instanceof Stream) { if (typeof body.path === 'string') { // assume file object var settings = {}; if (typeof body.start === 'number') { settings.start = body.start; } if (typeof body.end === 'number') { settings.end = body.end; } body = fs.createReadStream(body.path, settings); } else { // TODO support other stream types return done(new Error('Non-file stream objects are ' + 'not supported with SigV4')); } } } util.crypto.sha256(body, 'hex', function(err, sha) { if (err) done(err); else done(null, sha); }); }, /** * @api private */ isClockSkewed: function isClockSkewed(serverTime) { if (serverTime) { util.property(AWS.config, 'isClockSkewed', Math.abs(new Date().getTime() - serverTime) >= 300000, false); return AWS.config.isClockSkewed; } }, applyClockOffset: function applyClockOffset(serverTime) { if (serverTime) AWS.config.systemClockOffset = serverTime - new Date().getTime(); }, /** * @api private */ extractRequestId: function extractRequestId(resp) { var requestId = resp.httpResponse.headers['x-amz-request-id'] || resp.httpResponse.headers['x-amzn-requestid']; if (!requestId && resp.data && resp.data.ResponseMetadata) { requestId = resp.data.ResponseMetadata.RequestId; } if (requestId) { resp.requestId = requestId; } if (resp.error) { resp.error.requestId = requestId; } }, /** * @api private */ addPromises: function addPromises(constructors, PromiseDependency) { var deletePromises = false; if (PromiseDependency === undefined && AWS && AWS.config) { PromiseDependency = AWS.config.getPromisesDependency(); } if (PromiseDependency === undefined && typeof Promise !== 'undefined') { PromiseDependency = Promise; } if (typeof PromiseDependency !== 'function') deletePromises = true; if (!Array.isArray(constructors)) constructors = [constructors]; for (var ind = 0; ind < constructors.length; ind++) { var constructor = constructors[ind]; if (deletePromises) { if (constructor.deletePromisesFromClass) { constructor.deletePromisesFromClass(); } } else if (constructor.addPromisesToClass) { constructor.addPromisesToClass(PromiseDependency); } } }, /** * @api private * Return a function that will return a promise whose fate is decided by the * callback behavior of the given method with `methodName`. The method to be * promisified should conform to node.js convention of accepting a callback as * last argument and calling that callback with error as the first argument * and success value on the second argument. */ promisifyMethod: function promisifyMethod(methodName, PromiseDependency) { return function promise() { var self = this; var args = Array.prototype.slice.call(arguments); return new PromiseDependency(function(resolve, reject) { args.push(function(err, data) { if (err) { reject(err); } else { resolve(data); } }); self[methodName].apply(self, args); }); }; }, /** * @api private */ isDualstackAvailable: function isDualstackAvailable(service) { if (!service) return false; var metadata = __webpack_require__(49497); if (typeof service !== 'string') service = service.serviceIdentifier; if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false; return !!metadata[service].dualstackAvailable; }, /** * @api private */ calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions, err) { if (!retryDelayOptions) retryDelayOptions = {}; var customBackoff = retryDelayOptions.customBackoff || null; if (typeof customBackoff === 'function') { return customBackoff(retryCount, err); } var base = typeof retryDelayOptions.base === 'number' ? retryDelayOptions.base : 100; var delay = Math.random() * (Math.pow(2, retryCount) * base); return delay; }, /** * @api private */ handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) { if (!options) options = {}; var http = AWS.HttpClient.getInstance(); var httpOptions = options.httpOptions || {}; var retryCount = 0; var errCallback = function(err) { var maxRetries = options.maxRetries || 0; if (err && err.code === 'TimeoutError') err.retryable = true; // Call `calculateRetryDelay()` only when relevant, see #3401 if (err && err.retryable && retryCount < maxRetries) { var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions, err); if (delay >= 0) { retryCount++; setTimeout(sendRequest, delay + (err.retryAfter || 0)); return; } } cb(err); }; var sendRequest = function() { var data = ''; http.handleRequest(httpRequest, httpOptions, function(httpResponse) { httpResponse.on('data', function(chunk) { data += chunk.toString(); }); httpResponse.on('end', function() { var statusCode = httpResponse.statusCode; if (statusCode < 300) { cb(null, data); } else { var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0; var err = util.error(new Error(), { statusCode: statusCode, retryable: statusCode >= 500 || statusCode === 429 } ); if (retryAfter && err.retryable) err.retryAfter = retryAfter; errCallback(err); } }); }, errCallback); }; AWS.util.defer(sendRequest); }, /** * @api private */ uuid: { v4: function uuidV4() { return __webpack_require__(2155).v4(); } }, /** * @api private */ convertPayloadToString: function convertPayloadToString(resp) { var req = resp.request; var operation = req.operation; var rules = req.service.api.operations[operation].output || {}; if (rules.payload && resp.data[rules.payload]) { resp.data[rules.payload] = resp.data[rules.payload].toString(); } }, /** * @api private */ defer: function defer(callback) { if (typeof process === 'object' && typeof process.nextTick === 'function') { process.nextTick(callback); } else if (typeof setImmediate === 'function') { setImmediate(callback); } else { setTimeout(callback, 0); } }, /** * @api private */ getRequestPayloadShape: function getRequestPayloadShape(req) { var operations = req.service.api.operations; if (!operations) return undefined; var operation = (operations || {})[req.operation]; if (!operation || !operation.input || !operation.input.payload) return undefined; return operation.input.members[operation.input.payload]; }, getProfilesFromSharedConfig: function getProfilesFromSharedConfig(iniLoader, filename) { var profiles = {}; var profilesFromConfig = {}; if (process.env[util.configOptInEnv]) { var profilesFromConfig = iniLoader.loadFrom({ isConfig: true, filename: process.env[util.sharedConfigFileEnv] }); } var profilesFromCreds= {}; try { var profilesFromCreds = iniLoader.loadFrom({ filename: filename || (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv]) }); } catch (error) { // if using config, assume it is fully descriptive without a credentials file: if (!process.env[util.configOptInEnv]) throw error; } for (var i = 0, profileNames = Object.keys(profilesFromConfig); i < profileNames.length; i++) { profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromConfig[profileNames[i]]); } for (var i = 0, profileNames = Object.keys(profilesFromCreds); i < profileNames.length; i++) { profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromCreds[profileNames[i]]); } return profiles; /** * Roughly the semantics of `Object.assign(target, source)` */ function objectAssign(target, source) { for (var i = 0, keys = Object.keys(source); i < keys.length; i++) { target[keys[i]] = source[keys[i]]; } return target; } }, /** * @api private */ ARN: { validate: function validateARN(str) { return str && str.indexOf('arn:') === 0 && str.split(':').length >= 6; }, parse: function parseARN(arn) { var matched = arn.split(':'); return { partition: matched[1], service: matched[2], region: matched[3], accountId: matched[4], resource: matched.slice(5).join(':') }; }, build: function buildARN(arnObject) { if ( arnObject.service === undefined || arnObject.region === undefined || arnObject.accountId === undefined || arnObject.resource === undefined ) throw util.error(new Error('Input ARN object is invalid')); return 'arn:'+ (arnObject.partition || 'aws') + ':' + arnObject.service + ':' + arnObject.region + ':' + arnObject.accountId + ':' + arnObject.resource; } }, /** * @api private */ defaultProfile: 'default', /** * @api private */ configOptInEnv: 'AWS_SDK_LOAD_CONFIG', /** * @api private */ sharedCredentialsFileEnv: 'AWS_SHARED_CREDENTIALS_FILE', /** * @api private */ sharedConfigFileEnv: 'AWS_CONFIG_FILE', /** * @api private */ imdsDisabledEnv: 'AWS_EC2_METADATA_DISABLED' }; /** * @api private */ module.exports = util; /***/ }), /***/ 23546: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(77985); var XmlNode = __webpack_require__(20397).XmlNode; var XmlText = __webpack_require__(90971).XmlText; function XmlBuilder() { } XmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) { var xml = new XmlNode(rootElement); applyNamespaces(xml, shape, true); serialize(xml, params, shape); return xml.children.length > 0 || noEmpty ? xml.toString() : ''; }; function serialize(xml, value, shape) { switch (shape.type) { case 'structure': return serializeStructure(xml, value, shape); case 'map': return serializeMap(xml, value, shape); case 'list': return serializeList(xml, value, shape); default: return serializeScalar(xml, value, shape); } } function serializeStructure(xml, params, shape) { util.arrayEach(shape.memberNames, function(memberName) { var memberShape = shape.members[memberName]; if (memberShape.location !== 'body') return; var value = params[memberName]; var name = memberShape.name; if (value !== undefined && value !== null) { if (memberShape.isXmlAttribute) { xml.addAttribute(name, value); } else if (memberShape.flattened) { serialize(xml, value, memberShape); } else { var element = new XmlNode(name); xml.addChildNode(element); applyNamespaces(element, memberShape); serialize(element, value, memberShape); } } }); } function serializeMap(xml, map, shape) { var xmlKey = shape.key.name || 'key'; var xmlValue = shape.value.name || 'value'; util.each(map, function(key, value) { var entry = new XmlNode(shape.flattened ? shape.name : 'entry'); xml.addChildNode(entry); var entryKey = new XmlNode(xmlKey); var entryValue = new XmlNode(xmlValue); entry.addChildNode(entryKey); entry.addChildNode(entryValue); serialize(entryKey, key, shape.key); serialize(entryValue, value, shape.value); }); } function serializeList(xml, list, shape) { if (shape.flattened) { util.arrayEach(list, function(value) { var name = shape.member.name || shape.name; var element = new XmlNode(name); xml.addChildNode(element); serialize(element, value, shape.member); }); } else { util.arrayEach(list, function(value) { var name = shape.member.name || 'member'; var element = new XmlNode(name); xml.addChildNode(element); serialize(element, value, shape.member); }); } } function serializeScalar(xml, value, shape) { xml.addChildNode( new XmlText(shape.toWireFormat(value)) ); } function applyNamespaces(xml, shape, isRoot) { var uri, prefix = 'xmlns'; if (shape.xmlNamespaceUri) { uri = shape.xmlNamespaceUri; if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix; } else if (isRoot && shape.api.xmlNamespaceUri) { uri = shape.api.xmlNamespaceUri; } if (uri) xml.addAttribute(prefix, uri); } /** * @api private */ module.exports = XmlBuilder; /***/ }), /***/ 98241: /***/ ((module) => { /** * Escapes characters that can not be in an XML attribute. */ function escapeAttribute(value) { return value.replace(/&/g, '&').replace(/'/g, ''').replace(//g, '>').replace(/"/g, '"'); } /** * @api private */ module.exports = { escapeAttribute: escapeAttribute }; /***/ }), /***/ 98464: /***/ ((module) => { /** * Escapes characters that can not be in an XML element. */ function escapeElement(value) { return value.replace(/&/g, '&').replace(//g, '>'); } /** * @api private */ module.exports = { escapeElement: escapeElement }; /***/ }), /***/ 96752: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var AWS = __webpack_require__(28437); var util = AWS.util; var Shape = AWS.Model.Shape; var xml2js = __webpack_require__(66189); /** * @api private */ var options = { // options passed to xml2js parser explicitCharkey: false, // undocumented trim: false, // trim the leading/trailing whitespace from text nodes normalize: false, // trim interior whitespace inside text nodes explicitRoot: false, // return the root node in the resulting object? emptyTag: null, // the default value for empty nodes explicitArray: true, // always put child nodes in an array ignoreAttrs: false, // ignore attributes, only create text nodes mergeAttrs: false, // merge attributes and child elements validator: null // a callable validator }; function NodeXmlParser() { } NodeXmlParser.prototype.parse = function(xml, shape) { shape = shape || {}; var result = null; var error = null; var parser = new xml2js.Parser(options); parser.parseString(xml, function (e, r) { error = e; result = r; }); if (result) { var data = parseXml(result, shape); if (result.ResponseMetadata) { data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {}); } return data; } else if (error) { throw util.error(error, {code: 'XMLParserError', retryable: true}); } else { // empty xml document return parseXml({}, shape); } }; function parseXml(xml, shape) { switch (shape.type) { case 'structure': return parseStructure(xml, shape); case 'map': return parseMap(xml, shape); case 'list': return parseList(xml, shape); case undefined: case null: return parseUnknown(xml); default: return parseScalar(xml, shape); } } function parseStructure(xml, shape) { var data = {}; if (xml === null) return data; util.each(shape.members, function(memberName, memberShape) { var xmlName = memberShape.name; if (Object.prototype.hasOwnProperty.call(xml, xmlName) && Array.isArray(xml[xmlName])) { var xmlChild = xml[xmlName]; if (!memberShape.flattened) xmlChild = xmlChild[0]; data[memberName] = parseXml(xmlChild, memberShape); } else if (memberShape.isXmlAttribute && xml.$ && Object.prototype.hasOwnProperty.call(xml.$, xmlName)) { data[memberName] = parseScalar(xml.$[xmlName], memberShape); } else if (memberShape.type === 'list' && !shape.api.xmlNoDefaultLists) { data[memberName] = memberShape.defaultValue; } }); return data; } function parseMap(xml, shape) { var data = {}; if (xml === null) return data; var xmlKey = shape.key.name || 'key'; var xmlValue = shape.value.name || 'value'; var iterable = shape.flattened ? xml : xml.entry; if (Array.isArray(iterable)) { util.arrayEach(iterable, function(child) { data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value); }); } return data; } function parseList(xml, shape) { var data = []; var name = shape.member.name || 'member'; if (shape.flattened) { util.arrayEach(xml, function(xmlChild) { data.push(parseXml(xmlChild, shape.member)); }); } else if (xml && Array.isArray(xml[name])) { util.arrayEach(xml[name], function(child) { data.push(parseXml(child, shape.member)); }); } return data; } function parseScalar(text, shape) { if (text && text.$ && text.$.encoding === 'base64') { shape = new Shape.create({type: text.$.encoding}); } if (text && text._) text = text._; if (typeof shape.toType === 'function') { return shape.toType(text); } else { return text; } } function parseUnknown(xml) { if (xml === undefined || xml === null) return ''; if (typeof xml === 'string') return xml; // parse a list if (Array.isArray(xml)) { var arr = []; for (i = 0; i < xml.length; i++) { arr.push(parseXml(xml[i], {})); } return arr; } // empty object var keys = Object.keys(xml), i; if (keys.length === 0 || (keys.length === 1 && keys[0] === '$')) { return {}; } // object, parse as structure var data = {}; for (i = 0; i < keys.length; i++) { var key = keys[i], value = xml[key]; if (key === '$') continue; if (value.length > 1) { // this member is a list data[key] = parseList(value, {member: {}}); } else { // this member is a single item data[key] = parseXml(value[0], {}); } } return data; } /** * @api private */ module.exports = NodeXmlParser; /***/ }), /***/ 20397: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var escapeAttribute = __webpack_require__(98241).escapeAttribute; /** * Represents an XML node. * @api private */ function XmlNode(name, children) { if (children === void 0) { children = []; } this.name = name; this.children = children; this.attributes = {}; } XmlNode.prototype.addAttribute = function (name, value) { this.attributes[name] = value; return this; }; XmlNode.prototype.addChildNode = function (child) { this.children.push(child); return this; }; XmlNode.prototype.removeAttribute = function (name) { delete this.attributes[name]; return this; }; XmlNode.prototype.toString = function () { var hasChildren = Boolean(this.children.length); var xmlText = '<' + this.name; // add attributes var attributes = this.attributes; for (var i = 0, attributeNames = Object.keys(attributes); i < attributeNames.length; i++) { var attributeName = attributeNames[i]; var attribute = attributes[attributeName]; if (typeof attribute !== 'undefined' && attribute !== null) { xmlText += ' ' + attributeName + '=\"' + escapeAttribute('' + attribute) + '\"'; } } return xmlText += !hasChildren ? '/>' : '>' + this.children.map(function (c) { return c.toString(); }).join('') + ''; }; /** * @api private */ module.exports = { XmlNode: XmlNode }; /***/ }), /***/ 90971: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var escapeElement = __webpack_require__(98464).escapeElement; /** * Represents an XML text value. * @api private */ function XmlText(value) { this.value = value; } XmlText.prototype.toString = function () { return escapeElement('' + this.value); }; /** * @api private */ module.exports = { XmlText: XmlText }; /***/ }), /***/ 96323: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); var LRU_1 = __webpack_require__(77710); var CACHE_SIZE = 1000; /** * Inspired node-lru-cache[https://github.com/isaacs/node-lru-cache] */ var EndpointCache = /** @class */ (function () { function EndpointCache(maxSize) { if (maxSize === void 0) { maxSize = CACHE_SIZE; } this.maxSize = maxSize; this.cache = new LRU_1.LRUCache(maxSize); } ; Object.defineProperty(EndpointCache.prototype, "size", { get: function () { return this.cache.length; }, enumerable: true, configurable: true }); EndpointCache.prototype.put = function (key, value) { var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; var endpointRecord = this.populateValue(value); this.cache.put(keyString, endpointRecord); }; EndpointCache.prototype.get = function (key) { var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; var now = Date.now(); var records = this.cache.get(keyString); if (records) { for (var i = 0; i < records.length; i++) { var record = records[i]; if (record.Expire < now) { this.cache.remove(keyString); return undefined; } } } return records; }; EndpointCache.getKeyString = function (key) { var identifiers = []; var identifierNames = Object.keys(key).sort(); for (var i = 0; i < identifierNames.length; i++) { var identifierName = identifierNames[i]; if (key[identifierName] === undefined) continue; identifiers.push(key[identifierName]); } return identifiers.join(' '); }; EndpointCache.prototype.populateValue = function (endpoints) { var now = Date.now(); return endpoints.map(function (endpoint) { return ({ Address: endpoint.Address || '', Expire: now + (endpoint.CachePeriodInMinutes || 1) * 60 * 1000 }); }); }; EndpointCache.prototype.empty = function () { this.cache.empty(); }; EndpointCache.prototype.remove = function (key) { var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; this.cache.remove(keyString); }; return EndpointCache; }()); exports.$ = EndpointCache; /***/ }), /***/ 77710: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var LinkedListNode = /** @class */ (function () { function LinkedListNode(key, value) { this.key = key; this.value = value; } return LinkedListNode; }()); var LRUCache = /** @class */ (function () { function LRUCache(size) { this.nodeMap = {}; this.size = 0; if (typeof size !== 'number' || size < 1) { throw new Error('Cache size can only be positive number'); } this.sizeLimit = size; } Object.defineProperty(LRUCache.prototype, "length", { get: function () { return this.size; }, enumerable: true, configurable: true }); LRUCache.prototype.prependToList = function (node) { if (!this.headerNode) { this.tailNode = node; } else { this.headerNode.prev = node; node.next = this.headerNode; } this.headerNode = node; this.size++; }; LRUCache.prototype.removeFromTail = function () { if (!this.tailNode) { return undefined; } var node = this.tailNode; var prevNode = node.prev; if (prevNode) { prevNode.next = undefined; } node.prev = undefined; this.tailNode = prevNode; this.size--; return node; }; LRUCache.prototype.detachFromList = function (node) { if (this.headerNode === node) { this.headerNode = node.next; } if (this.tailNode === node) { this.tailNode = node.prev; } if (node.prev) { node.prev.next = node.next; } if (node.next) { node.next.prev = node.prev; } node.next = undefined; node.prev = undefined; this.size--; }; LRUCache.prototype.get = function (key) { if (this.nodeMap[key]) { var node = this.nodeMap[key]; this.detachFromList(node); this.prependToList(node); return node.value; } }; LRUCache.prototype.remove = function (key) { if (this.nodeMap[key]) { var node = this.nodeMap[key]; this.detachFromList(node); delete this.nodeMap[key]; } }; LRUCache.prototype.put = function (key, value) { if (this.nodeMap[key]) { this.remove(key); } else if (this.size === this.sizeLimit) { var tailNode = this.removeFromTail(); var key_1 = tailNode.key; delete this.nodeMap[key_1]; } var newNode = new LinkedListNode(key, value); this.nodeMap[key] = newNode; this.prependToList(newNode); }; LRUCache.prototype.empty = function () { var keys = Object.keys(this.nodeMap); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var node = this.nodeMap[key]; this.detachFromList(node); delete this.nodeMap[key]; } }; return LRUCache; }()); exports.LRUCache = LRUCache; /***/ }), /***/ 96342: /***/ ((module, __unused_webpack_exports, __webpack_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 = __webpack_require__(76417) , parse = __webpack_require__(78835).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 /***/ }), /***/ 16071: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var aws4 = exports, url = __webpack_require__(78835), querystring = __webpack_require__(71191), crypto = __webpack_require__(76417), lru = __webpack_require__(74225), 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)) } // A bit of a combination of: // https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59 // https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199 // https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34 var HEADERS_TO_IGNORE = { 'authorization': true, 'connection': true, 'x-amzn-trace-id': true, 'user-agent': true, 'expect': true, 'presigned-expires': true, 'range': true, } // 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) .filter(function(key) { return HEADERS_TO_IGNORE[key.toLowerCase()] == null }) .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() }) .filter(function(key) { return HEADERS_TO_IGNORE[key] == null }) .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() } /***/ }), /***/ 74225: /***/ ((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 } /***/ }), /***/ 9417: /***/ ((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) { if(a===b) { return [ai, bi]; } 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; } /***/ }), /***/ 85848: /***/ (function(module, exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); /*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ ;(function(root) { // Detect free variables `exports`. var freeExports = true && exports; // Detect free variable `module`. var freeModule = true && module && module.exports == freeExports && module; // Detect free variable `global`, from Node.js or Browserified code, and use // it as `root`. var freeGlobal = typeof global == 'object' && global; if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { root = freeGlobal; } /*--------------------------------------------------------------------------*/ var InvalidCharacterError = function(message) { this.message = message; }; InvalidCharacterError.prototype = new Error; InvalidCharacterError.prototype.name = 'InvalidCharacterError'; var error = function(message) { // Note: the error messages used throughout this file match those used by // the native `atob`/`btoa` implementation in Chromium. throw new InvalidCharacterError(message); }; var TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // http://whatwg.org/html/common-microsyntaxes.html#space-character var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g; // `decode` is designed to be fully compatible with `atob` as described in the // HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob // The optimized base64-decoding algorithm used is based on @atk’s excellent // implementation. https://gist.github.com/atk/1020396 var decode = function(input) { input = String(input) .replace(REGEX_SPACE_CHARACTERS, ''); var length = input.length; if (length % 4 == 0) { input = input.replace(/==?$/, ''); length = input.length; } if ( length % 4 == 1 || // http://whatwg.org/C#alphanumeric-ascii-characters /[^+a-zA-Z0-9/]/.test(input) ) { error( 'Invalid character: the string to be decoded is not correctly encoded.' ); } var bitCounter = 0; var bitStorage; var buffer; var output = ''; var position = -1; while (++position < length) { buffer = TABLE.indexOf(input.charAt(position)); bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer; // Unless this is the first of a group of 4 characters… if (bitCounter++ % 4) { // …convert the first 8 bits to a single ASCII character. output += String.fromCharCode( 0xFF & bitStorage >> (-2 * bitCounter & 6) ); } } return output; }; // `encode` is designed to be fully compatible with `btoa` as described in the // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa var encode = function(input) { input = String(input); if (/[^\0-\xFF]/.test(input)) { // Note: no need to special-case astral symbols here, as surrogates are // matched, and the input is supposed to only contain ASCII anyway. error( 'The string to be encoded contains characters outside of the ' + 'Latin1 range.' ); } var padding = input.length % 3; var output = ''; var position = -1; var a; var b; var c; var buffer; // Make sure any padding is handled outside of the loop. var length = input.length - padding; while (++position < length) { // Read three bytes, i.e. 24 bits. a = input.charCodeAt(position) << 16; b = input.charCodeAt(++position) << 8; c = input.charCodeAt(++position); buffer = a + b + c; // Turn the 24 bits into four chunks of 6 bits each, and append the // matching character for each of them to the output. output += ( TABLE.charAt(buffer >> 18 & 0x3F) + TABLE.charAt(buffer >> 12 & 0x3F) + TABLE.charAt(buffer >> 6 & 0x3F) + TABLE.charAt(buffer & 0x3F) ); } if (padding == 2) { a = input.charCodeAt(position) << 8; b = input.charCodeAt(++position); buffer = a + b; output += ( TABLE.charAt(buffer >> 10) + TABLE.charAt((buffer >> 4) & 0x3F) + TABLE.charAt((buffer << 2) & 0x3F) + '=' ); } else if (padding == 1) { buffer = input.charCodeAt(position); output += ( TABLE.charAt(buffer >> 2) + TABLE.charAt((buffer << 4) & 0x3F) + '==' ); } return output; }; var base64 = { 'encode': encode, 'decode': decode, 'version': '1.0.0' }; // Some AMD build optimizers, like r.js, check for specific condition patterns // like the following: if ( typeof define == 'function' && typeof define.amd == 'object' && define.amd ) { define(function() { return base64; }); } else if (freeExports && !freeExports.nodeType) { if (freeModule) { // in Node.js or RingoJS v0.8.0+ freeModule.exports = base64; } else { // in Narwhal or RingoJS v0.7.0- for (var key in base64) { base64.hasOwnProperty(key) && (freeExports[key] = base64[key]); } } } else { // in Rhino or a web browser root.base64 = base64; } }(this)); /***/ }), /***/ 45447: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var crypto_hash_sha512 = __webpack_require__(68729).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 }; /***/ }), /***/ 33717: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var concatMap = __webpack_require__(86891); var balanced = __webpack_require__(9417); 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; } /***/ }), /***/ 65653: /***/ ((module) => { module.exports = process.hrtime || hrtime // polyfil for window.performance.now var performance = global.performance || {} var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function(){ return (new Date()).getTime() } // generate timestamp or delta // see http://nodejs.org/api/process.html#process_process_hrtime function hrtime(previousTimestamp){ var clocktime = performanceNow.call(performance)*1e-3 var seconds = Math.floor(clocktime) var nanoseconds = Math.floor((clocktime%1)*1e9) if (previousTimestamp) { seconds = seconds - previousTimestamp[0] nanoseconds = nanoseconds - previousTimestamp[1] if (nanoseconds<0) { seconds-- nanoseconds += 1e9 } } return [seconds,nanoseconds] } /***/ }), /***/ 29700: /***/ ((module, __unused_webpack_exports, __webpack_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 = __webpack_require__(92413), util = __webpack_require__(31669), timers = __webpack_require__(78213); // 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); } }; /***/ }), /***/ 2286: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { V4MAPPED, ADDRCONFIG, ALL, promises: { Resolver: AsyncResolver }, lookup: dnsLookup } = __webpack_require__(40881); const {promisify} = __webpack_require__(31669); const os = __webpack_require__(12087); 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; /***/ }), /***/ 35684: /***/ ((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 = __webpack_require__(35747) const path = __webpack_require__(85622) /* 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 /***/ }), /***/ 27972: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const os = __webpack_require__(12087); 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'); }; /***/ }), /***/ 81312: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const PassThrough = __webpack_require__(92413).PassThrough; const mimicResponse = __webpack_require__(42610); 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; /***/ }), /***/ 85443: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(31669); var Stream = __webpack_require__(92413).Stream; var DelayedStream = __webpack_require__(18611); 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); }; /***/ }), /***/ 17044: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.action = void 0; const commander = __webpack_require__(133); function action() { return (target, propertyKey, descriptor) => { commander.action(target[propertyKey]); }; } exports.action = action; //# sourceMappingURL=action.decorator.js.map /***/ }), /***/ 71303: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.alias = void 0; const program = __webpack_require__(133); function alias(text) { return (target) => { program.usage(text); }; } exports.alias = alias; //# sourceMappingURL=alias.decorator.js.map /***/ }), /***/ 55508: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.variadicArg = exports.requiredArg = exports.optionalArg = void 0; const metadata_1 = __webpack_require__(104); const models_1 = __webpack_require__(84908); const utils_1 = __webpack_require__(66725); /** * Parameter decorator used in subcommand function to denote an optional argument. */ function optionalArg(name) { return (target, propertyKey, parameterIndex) => { const args = (0, utils_1.decorateIfNot)(metadata_1.ArgsMetadata, [], target, propertyKey); args.unshift(new models_1.OptionalArg(name, parameterIndex)); }; } exports.optionalArg = optionalArg; /** * Parameter decorator used in subcommand function to denote a required argument. */ function requiredArg(name) { return (target, propertyKey, parameterIndex) => { const args = (0, utils_1.decorateIfNot)(metadata_1.ArgsMetadata, [], target, propertyKey); args.unshift(new models_1.RequiredArg(name, parameterIndex)); }; } exports.requiredArg = requiredArg; /** * Parameter decorator used in subcommand function to denote variadic arguments. */ function variadicArg(name) { return (target, propertyKey, parameterIndex) => { const args = (0, utils_1.decorateIfNot)(metadata_1.ArgsMetadata, [], target, propertyKey); args.unshift(new models_1.VariadicArg(name, parameterIndex)); }; } exports.variadicArg = variadicArg; //# sourceMappingURL=arg.decorator.js.map /***/ }), /***/ 71196: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.args = void 0; const commander = __webpack_require__(133); function args() { return (target, propertyKey, parameterIndex) => { commander .option(propertyKey) .action(target[propertyKey]); }; } exports.args = args; //# sourceMappingURL=arguments.decorator.js.map /***/ }), /***/ 69904: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.commandOption = void 0; const metadata_1 = __webpack_require__(104); const utils_1 = __webpack_require__(66725); function commandOption(...args) { return ((target, propertyKey, descriptor) => { args[0] = args[0] || `--${String(propertyKey)}`; (0, utils_1.decorateIfNot)(metadata_1.CommandOptionsMetadata, [], target, propertyKey); const options = Reflect.getMetadata(metadata_1.CommandOptionsMetadata, target, propertyKey); options.push(args); }); } exports.commandOption = commandOption; //# sourceMappingURL=command-option.decorator.js.map /***/ }), /***/ 1442: /***/ (function(__unused_webpack_module, exports, __webpack_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.command = void 0; const commander = __webpack_require__(133); const helpers_1 = __webpack_require__(69882); const metadata_1 = __webpack_require__(104); function command() { return (target, propertyKey, descriptor) => { try { const cmd = (0, helpers_1.prepareSubcommand)(target, propertyKey); let chain = commander.command(cmd); if (Reflect.hasMetadata(metadata_1.CommandOptionsMetadata, target, propertyKey)) { const options = Reflect.getMetadata(metadata_1.CommandOptionsMetadata, target, propertyKey); chain = options.reduce((prev, opt) => { const [arg1, arg2, arg3, arg4] = opt; return chain.option(arg1, arg2, arg3, arg4); }, chain); } chain.action((...args) => __awaiter(this, void 0, void 0, function* () { const context = args[args.length - 1]; const cmdArgs = args.slice(0, args.length - 1); try { const result = target[propertyKey].apply(context, cmdArgs); if (result instanceof Promise) { yield result; } } catch (_a) { process.exit(1); } finally { process.exit(0); } })); } catch (e) { console.error(e.message); process.exit(1); } }; } exports.command = command; //# sourceMappingURL=command.decorator.js.map /***/ }), /***/ 14432: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.description = void 0; const program = __webpack_require__(133); function description(text) { return (target) => { program.description(text); }; } exports.description = description; //# sourceMappingURL=description.decorator.js.map /***/ }), /***/ 90154: /***/ (function(__unused_webpack_module, exports, __webpack_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 })); __exportStar(__webpack_require__(104), exports); __exportStar(__webpack_require__(17044), exports); __exportStar(__webpack_require__(71303), exports); __exportStar(__webpack_require__(55508), exports); __exportStar(__webpack_require__(71196), exports); __exportStar(__webpack_require__(69904), exports); __exportStar(__webpack_require__(1442), exports); __exportStar(__webpack_require__(14432), exports); __exportStar(__webpack_require__(98166), exports); __exportStar(__webpack_require__(42991), exports); __exportStar(__webpack_require__(3813), exports); __exportStar(__webpack_require__(84768), exports); __exportStar(__webpack_require__(98162), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 98166: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.on = void 0; const commander = __webpack_require__(133); function on(event, handler) { return (target, propertyKey, descriptor) => { commander.on(event, handler); }; } exports.on = on; //# sourceMappingURL=on.decorator.js.map /***/ }), /***/ 42991: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.option = void 0; const metadata_1 = __webpack_require__(104); const models_1 = __webpack_require__(84908); const utils_1 = __webpack_require__(66725); function option(...args) { return ((target, propertyKey) => { args[0] = args[0] || `--${String(propertyKey)}`; (0, utils_1.decorateIfNot)(metadata_1.OptionsMetadata, [], target, propertyKey); const options = Reflect.getMetadata(metadata_1.OptionsMetadata, target, propertyKey); options.push(new models_1.Option(propertyKey, args)); }); } exports.option = option; //# sourceMappingURL=option.decorator.js.map /***/ }), /***/ 3813: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.program = void 0; const commander = __webpack_require__(133); const helpers_1 = __webpack_require__(69882); const metadata_1 = __webpack_require__(104); let instances = 0; function program() { instances += 1; if (instances > 1) { throw new Error('Only one instance of @program is permitted.'); } return function (constructor) { const mixin = class extends constructor { constructor(...args) { super(...args); if (!this.run) { console.error('Program class must define a run() method.'); process.exit(1); } const cmd = (0, helpers_1.prepareCommand)(this, 'run'); if (cmd) { commander.command(cmd); } const options = Object.keys(this).reduce((list, prop) => { if (Reflect.hasMetadata(metadata_1.OptionsMetadata, this, prop)) { const metadata = Reflect.getMetadata(metadata_1.OptionsMetadata, this, prop); list.push(metadata); } return list; }, []); const chainAfterOptions = options .reduce((prev, option) => { return prev.option.apply(prev, option[0].args); }, commander); commander.parse(process.argv); if (this.run) { this.run.apply(commander, (0, helpers_1.injectArgs)(commander, this, 'run')); } } }; (0, helpers_1.initCommander)(constructor); return mixin; }; } exports.program = program; function prepareProgram(target) { let argList = ''; if (Reflect.hasMetadata(metadata_1.OptionsMetadata, target)) { const args = Reflect.getMetadata(metadata_1.OptionsMetadata, target); argList = args .map((arg) => { return arg.toString(); }) .join(' ') .replace(/^(.)/, ' $1'); } return `${argList}`; } //# sourceMappingURL=program.decorator.js.map /***/ }), /***/ 84768: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.usage = void 0; const commander = __webpack_require__(133); function usage(text) { return (target) => { commander.usage(text); }; } exports.usage = usage; //# sourceMappingURL=usage.decorator.js.map /***/ }), /***/ 98162: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.version = void 0; const helpers_1 = __webpack_require__(69882); const metadata_1 = __webpack_require__(104); function version(text) { return (target) => { (0, helpers_1.initCommander)(target); const program = Reflect.getMetadata(metadata_1.ProgramMetadata, target); program.version(text); }; } exports.version = version; //# sourceMappingURL=version.decorator.js.map /***/ }), /***/ 69882: /***/ (function(__unused_webpack_module, exports, __webpack_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 })); __exportStar(__webpack_require__(65339), exports); __exportStar(__webpack_require__(70), exports); __exportStar(__webpack_require__(11413), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 65339: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.initCommander = void 0; const commander = __webpack_require__(133); const metadata_1 = __webpack_require__(104); function initCommander(target) { if (!Reflect.hasMetadata(metadata_1.ProgramMetadata, target)) { const decorator = Reflect.metadata(metadata_1.ProgramMetadata, commander); Reflect.decorate([decorator], target); } } exports.initCommander = initCommander; //# sourceMappingURL=init-commander.js.map /***/ }), /***/ 70: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.injectArgs = void 0; const metadata_1 = __webpack_require__(104); const index_1 = __webpack_require__(84908); function injectArgs(program, target, propertyKey) { if (Reflect.hasMetadata(metadata_1.ArgsMetadata, target, propertyKey)) { const args = Reflect.getMetadata(metadata_1.ArgsMetadata, target, propertyKey); const predicate = (arg) => arg instanceof index_1.VariadicArg; const variadic = args.find(predicate); if (variadic && (args.findIndex(predicate) !== (args.length - 1))) { throw new TypeError(`Variadic argument must be specified last the argument list of the ${String(propertyKey)}() function.`); } const argv = []; let index = 0; for (let i = 0; i < args.length; i += 1) { if (args.find(arg => arg.index === i)) { argv.push(program.args[index]); index += 1; } else { argv.push(undefined); } } return argv; } } exports.injectArgs = injectArgs; //# sourceMappingURL=inject-args.js.map /***/ }), /***/ 11413: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareSubcommand = exports.prepareCommand = void 0; const metadata_1 = __webpack_require__(104); const index_1 = __webpack_require__(84908); function prepareCommand(target, propertyKey) { let argList = ''; if (Reflect.hasMetadata(metadata_1.ArgsMetadata, target, propertyKey)) { const args = Reflect.getMetadata(metadata_1.ArgsMetadata, target, propertyKey); const predicate = (arg) => arg instanceof index_1.VariadicArg; const variadic = args.find(predicate); if (variadic && (args.findIndex(predicate) !== (args.length - 1))) { throw new TypeError(`Variadic argument must be specified last the argument list of the ${String(propertyKey)}() function.`); } argList = args .map((arg) => { return arg.toString(); }) .join(' ') .replace(/^(.)/, '$1'); } return `${argList}`; } exports.prepareCommand = prepareCommand; function prepareSubcommand(target, propertyKey) { const argList = prepareCommand(target, propertyKey); return `${String(propertyKey)} ${argList}`; } exports.prepareSubcommand = prepareSubcommand; //# sourceMappingURL=prepare-command.js.map /***/ }), /***/ 40451: /***/ (function(__unused_webpack_module, exports, __webpack_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.Option = exports.Command = void 0; __webpack_require__(29977); var commander_1 = __webpack_require__(133); Object.defineProperty(exports, "Command", ({ enumerable: true, get: function () { return commander_1.Command; } })); Object.defineProperty(exports, "Option", ({ enumerable: true, get: function () { return commander_1.Option; } })); __exportStar(__webpack_require__(90154), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 104: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SubcommandMetadata = exports.ProgramMetadata = exports.OptionsMetadata = exports.CommandOptionsMetadata = exports.ArgsMetadata = void 0; exports.ArgsMetadata = Symbol('ArgsMetadata'); exports.CommandOptionsMetadata = Symbol('CommandOptionsMetadata'); exports.OptionsMetadata = Symbol('OptionsMetadata'); exports.ProgramMetadata = Symbol('ProgramMetadata'); exports.SubcommandMetadata = Symbol('SubcommandMetadata'); //# sourceMappingURL=metadata.js.map /***/ }), /***/ 6312: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VariadicArg = exports.RequiredArg = exports.OptionalArg = exports.CommandArg = void 0; class CommandArg { constructor(name, index) { this.name = name; this.index = index; if (typeof name === 'symbol') { throw new TypeError('Symbols are not supported as argument names.'); } } } exports.CommandArg = CommandArg; class OptionalArg extends CommandArg { toString() { return `[${String(this.name)}]`; } } exports.OptionalArg = OptionalArg; class RequiredArg extends CommandArg { toString() { return `<${String(this.name)}>`; } } exports.RequiredArg = RequiredArg; class VariadicArg extends CommandArg { toString() { return `[${String(this.name)}...]`; } } exports.VariadicArg = VariadicArg; //# sourceMappingURL=arg.model.js.map /***/ }), /***/ 84908: /***/ (function(__unused_webpack_module, exports, __webpack_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 })); __exportStar(__webpack_require__(6312), exports); __exportStar(__webpack_require__(4860), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 4860: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Option = void 0; class Option { constructor(name, args) { this.name = name; this.args = args; } } exports.Option = Option; //# sourceMappingURL=option.model.js.map /***/ }), /***/ 65058: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.decorateIfNot = void 0; function decorateIfNot(metadataKey, value, target, propertyKey) { if (!Reflect.hasMetadata(metadataKey, target, propertyKey)) { const decorator = Reflect.metadata(metadataKey, value); Reflect.decorate([decorator], target, propertyKey); } return Reflect.getMetadata(metadataKey, target, propertyKey); } exports.decorateIfNot = decorateIfNot; //# sourceMappingURL=decorateIfNot.js.map /***/ }), /***/ 66725: /***/ (function(__unused_webpack_module, exports, __webpack_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 })); __exportStar(__webpack_require__(65058), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 133: /***/ ((module, exports, __webpack_require__) => { /** * Module dependencies. */ const EventEmitter = __webpack_require__(28614).EventEmitter; const childProcess = __webpack_require__(63129); const path = __webpack_require__(85622); const fs = __webpack_require__(35747); // @ts-check // Although this is a class, methods are static in style to allow override using subclass or just functions. class Help { constructor() { this.helpWidth = undefined; this.sortSubcommands = false; this.sortOptions = false; } /** * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. * * @param {Command} cmd * @returns {Command[]} */ visibleCommands(cmd) { const visibleCommands = cmd.commands.filter(cmd => !cmd._hidden); if (cmd._hasImplicitHelpCommand()) { // Create a command matching the implicit help command. const args = cmd._helpCommandnameAndArgs.split(/ +/); const helpCommand = cmd.createCommand(args.shift()) .helpOption(false); helpCommand.description(cmd._helpCommandDescription); helpCommand._parseExpectedArgs(args); visibleCommands.push(helpCommand); } if (this.sortSubcommands) { visibleCommands.sort((a, b) => { return a.name().localeCompare(b.name()); }); } return visibleCommands; } /** * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. * * @param {Command} cmd * @returns {Option[]} */ visibleOptions(cmd) { const visibleOptions = cmd.options.filter((option) => !option.hidden); // Implicit help const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag); const showLongHelpFlag = cmd._hasHelpOption && !cmd._findOption(cmd._helpLongFlag); if (showShortHelpFlag || showLongHelpFlag) { let helpOption; if (!showShortHelpFlag) { helpOption = cmd.createOption(cmd._helpLongFlag, cmd._helpDescription); } else if (!showLongHelpFlag) { helpOption = cmd.createOption(cmd._helpShortFlag, cmd._helpDescription); } else { helpOption = cmd.createOption(cmd._helpFlags, cmd._helpDescription); } visibleOptions.push(helpOption); } if (this.sortOptions) { const getSortKey = (option) => { // WYSIWYG for order displayed in help with short before long, no special handling for negated. return option.short ? option.short.replace(/^-/, '') : option.long.replace(/^--/, ''); }; visibleOptions.sort((a, b) => { return getSortKey(a).localeCompare(getSortKey(b)); }); } return visibleOptions; } /** * Get an array of the arguments which have descriptions. * * @param {Command} cmd * @returns {{ term: string, description:string }[]} */ visibleArguments(cmd) { if (cmd._argsDescription && cmd._args.length) { return cmd._args.map((argument) => { return { term: argument.name, description: cmd._argsDescription[argument.name] || '' }; }, 0); } return []; } /** * Get the command term to show in the list of subcommands. * * @param {Command} cmd * @returns {string} */ subcommandTerm(cmd) { // Legacy. Ignores custom usage string, and nested commands. const args = cmd._args.map(arg => humanReadableArgName(arg)).join(' '); return cmd._name + (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') + (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option (args ? ' ' + args : ''); } /** * Get the option term to show in the list of options. * * @param {Option} option * @returns {string} */ optionTerm(option) { return option.flags; } /** * Get the longest command term length. * * @param {Command} cmd * @param {Help} helper * @returns {number} */ longestSubcommandTermLength(cmd, helper) { return helper.visibleCommands(cmd).reduce((max, command) => { return Math.max(max, helper.subcommandTerm(command).length); }, 0); }; /** * Get the longest option term length. * * @param {Command} cmd * @param {Help} helper * @returns {number} */ longestOptionTermLength(cmd, helper) { return helper.visibleOptions(cmd).reduce((max, option) => { return Math.max(max, helper.optionTerm(option).length); }, 0); }; /** * Get the longest argument term length. * * @param {Command} cmd * @param {Help} helper * @returns {number} */ longestArgumentTermLength(cmd, helper) { return helper.visibleArguments(cmd).reduce((max, argument) => { return Math.max(max, argument.term.length); }, 0); }; /** * Get the command usage to be displayed at the top of the built-in help. * * @param {Command} cmd * @returns {string} */ commandUsage(cmd) { // Usage let cmdName = cmd._name; if (cmd._aliases[0]) { cmdName = cmdName + '|' + cmd._aliases[0]; } let parentCmdNames = ''; for (let parentCmd = cmd.parent; parentCmd; parentCmd = parentCmd.parent) { parentCmdNames = parentCmd.name() + ' ' + parentCmdNames; } return parentCmdNames + cmdName + ' ' + cmd.usage(); } /** * Get the description for the command. * * @param {Command} cmd * @returns {string} */ commandDescription(cmd) { // @ts-ignore: overloaded return type return cmd.description(); } /** * Get the command description to show in the list of subcommands. * * @param {Command} cmd * @returns {string} */ subcommandDescription(cmd) { // @ts-ignore: overloaded return type return cmd.description(); } /** * Get the option description to show in the list of options. * * @param {Option} option * @return {string} */ optionDescription(option) { if (option.negate) { return option.description; } const extraInfo = []; if (option.argChoices) { extraInfo.push( // use stringify to match the display of the default value `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`); } if (option.defaultValue !== undefined) { extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`); } if (extraInfo.length > 0) { return `${option.description} (${extraInfo.join(', ')})`; } return option.description; }; /** * Generate the built-in help text. * * @param {Command} cmd * @param {Help} helper * @returns {string} */ formatHelp(cmd, helper) { const termWidth = helper.padWidth(cmd, helper); const helpWidth = helper.helpWidth || 80; const itemIndentWidth = 2; const itemSeparatorWidth = 2; // between term and description function formatItem(term, description) { if (description) { const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`; return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth); } return term; }; function formatList(textArray) { return textArray.join('\n').replace(/^/gm, ' '.repeat(itemIndentWidth)); } // Usage let output = [`Usage: ${helper.commandUsage(cmd)}`, '']; // Description const commandDescription = helper.commandDescription(cmd); if (commandDescription.length > 0) { output = output.concat([commandDescription, '']); } // Arguments const argumentList = helper.visibleArguments(cmd).map((argument) => { return formatItem(argument.term, argument.description); }); if (argumentList.length > 0) { output = output.concat(['Arguments:', formatList(argumentList), '']); } // Options const optionList = helper.visibleOptions(cmd).map((option) => { return formatItem(helper.optionTerm(option), helper.optionDescription(option)); }); if (optionList.length > 0) { output = output.concat(['Options:', formatList(optionList), '']); } // Commands const commandList = helper.visibleCommands(cmd).map((cmd) => { return formatItem(helper.subcommandTerm(cmd), helper.subcommandDescription(cmd)); }); if (commandList.length > 0) { output = output.concat(['Commands:', formatList(commandList), '']); } return output.join('\n'); } /** * Calculate the pad width from the maximum term length. * * @param {Command} cmd * @param {Help} helper * @returns {number} */ padWidth(cmd, helper) { return Math.max( helper.longestOptionTermLength(cmd, helper), helper.longestSubcommandTermLength(cmd, helper), helper.longestArgumentTermLength(cmd, helper) ); }; /** * Wrap the given string to width characters per line, with lines after the first indented. * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted. * * @param {string} str * @param {number} width * @param {number} indent * @param {number} [minColumnWidth=40] * @return {string} * */ wrap(str, width, indent, minColumnWidth = 40) { // Detect manually wrapped and indented strings by searching for line breaks // followed by multiple spaces/tabs. if (str.match(/[\n]\s+/)) return str; // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line). const columnWidth = width - indent; if (columnWidth < minColumnWidth) return str; const leadingStr = str.substr(0, indent); const columnText = str.substr(indent); const indentString = ' '.repeat(indent); const regex = new RegExp('.{1,' + (columnWidth - 1) + '}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)', 'g'); const lines = columnText.match(regex) || []; return leadingStr + lines.map((line, i) => { if (line.slice(-1) === '\n') { line = line.slice(0, line.length - 1); } return ((i > 0) ? indentString : '') + line.trimRight(); }).join('\n'); } } class Option { /** * Initialize a new `Option` with the given `flags` and `description`. * * @param {string} flags * @param {string} [description] */ constructor(flags, description) { this.flags = flags; this.description = description || ''; this.required = flags.includes('<'); // A value must be supplied when the option is specified. this.optional = flags.includes('['); // A value is optional when the option is specified. // variadic test ignores et al which might be used to describe custom splitting of single argument this.variadic = /\w\.\.\.[>\]]$/.test(flags); // The option can take multiple values. this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line. const optionFlags = _parseOptionFlags(flags); this.short = optionFlags.shortFlag; this.long = optionFlags.longFlag; this.negate = false; if (this.long) { this.negate = this.long.startsWith('--no-'); } this.defaultValue = undefined; this.defaultValueDescription = undefined; this.parseArg = undefined; this.hidden = false; this.argChoices = undefined; } /** * Set the default value, and optionally supply the description to be displayed in the help. * * @param {any} value * @param {string} [description] * @return {Option} */ default(value, description) { this.defaultValue = value; this.defaultValueDescription = description; return this; }; /** * Set the custom handler for processing CLI option arguments into option values. * * @param {Function} [fn] * @return {Option} */ argParser(fn) { this.parseArg = fn; return this; }; /** * Whether the option is mandatory and must have a value after parsing. * * @param {boolean} [mandatory=true] * @return {Option} */ makeOptionMandatory(mandatory = true) { this.mandatory = !!mandatory; return this; }; /** * Hide option in help. * * @param {boolean} [hide=true] * @return {Option} */ hideHelp(hide = true) { this.hidden = !!hide; return this; }; /** * @api private */ _concatValue(value, previous) { if (previous === this.defaultValue || !Array.isArray(previous)) { return [value]; } return previous.concat(value); } /** * Only allow option value to be one of choices. * * @param {string[]} values * @return {Option} */ choices(values) { this.argChoices = values; this.parseArg = (arg, previous) => { if (!values.includes(arg)) { throw new InvalidOptionArgumentError(`Allowed choices are ${values.join(', ')}.`); } if (this.variadic) { return this._concatValue(arg, previous); } return arg; }; return this; }; /** * Return option name. * * @return {string} */ name() { if (this.long) { return this.long.replace(/^--/, ''); } return this.short.replace(/^-/, ''); }; /** * Return option name, in a camelcase format that can be used * as a object attribute key. * * @return {string} * @api private */ attributeName() { return camelcase(this.name().replace(/^no-/, '')); }; /** * Check if `arg` matches the short or long flag. * * @param {string} arg * @return {boolean} * @api private */ is(arg) { return this.short === arg || this.long === arg; }; } /** * CommanderError class * @class */ class CommanderError extends Error { /** * Constructs the CommanderError class * @param {number} exitCode suggested exit code which could be used with process.exit * @param {string} code an id string representing the error * @param {string} message human-readable description of the error * @constructor */ constructor(exitCode, code, message) { super(message); // properly capture stack trace in Node.js Error.captureStackTrace(this, this.constructor); this.name = this.constructor.name; this.code = code; this.exitCode = exitCode; this.nestedError = undefined; } } /** * InvalidOptionArgumentError class * @class */ class InvalidOptionArgumentError extends CommanderError { /** * Constructs the InvalidOptionArgumentError class * @param {string} [message] explanation of why argument is invalid * @constructor */ constructor(message) { super(1, 'commander.invalidOptionArgument', message); // properly capture stack trace in Node.js Error.captureStackTrace(this, this.constructor); this.name = this.constructor.name; } } class Command extends EventEmitter { /** * Initialize a new `Command`. * * @param {string} [name] */ constructor(name) { super(); this.commands = []; this.options = []; this.parent = null; this._allowUnknownOption = false; this._allowExcessArguments = true; this._args = []; this.rawArgs = null; this._scriptPath = null; this._name = name || ''; this._optionValues = {}; this._storeOptionsAsProperties = false; this._actionResults = []; this._actionHandler = null; this._executableHandler = false; this._executableFile = null; // custom name for executable this._defaultCommandName = null; this._exitCallback = null; this._aliases = []; this._combineFlagAndOptionalValue = true; this._description = ''; this._argsDescription = undefined; this._enablePositionalOptions = false; this._passThroughOptions = false; // see .configureOutput() for docs this._outputConfiguration = { writeOut: (str) => process.stdout.write(str), writeErr: (str) => process.stderr.write(str), getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : undefined, getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : undefined, outputError: (str, write) => write(str) }; this._hidden = false; this._hasHelpOption = true; this._helpFlags = '-h, --help'; this._helpDescription = 'display help for command'; this._helpShortFlag = '-h'; this._helpLongFlag = '--help'; this._addImplicitHelpCommand = undefined; // Deliberately undefined, not decided whether true or false this._helpCommandName = 'help'; this._helpCommandnameAndArgs = 'help [command]'; this._helpCommandDescription = 'display help for command'; this._helpConfiguration = {}; } /** * Define a command. * * There are two styles of command: pay attention to where to put the description. * * Examples: * * // Command implemented using action handler (description is supplied separately to `.command`) * program * .command('clone [destination]') * .description('clone a repository into a newly created directory') * .action((source, destination) => { * console.log('clone command called'); * }); * * // Command implemented using separate executable file (description is second parameter to `.command`) * program * .command('start ', 'start named service') * .command('stop [service]', 'stop named service, or all if no name supplied'); * * @param {string} nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable) * @param {Object} [execOpts] - configuration options (for executable) * @return {Command} returns new command for action handler, or `this` for executable command */ command(nameAndArgs, actionOptsOrExecDesc, execOpts) { let desc = actionOptsOrExecDesc; let opts = execOpts; if (typeof desc === 'object' && desc !== null) { opts = desc; desc = null; } opts = opts || {}; const args = nameAndArgs.split(/ +/); const cmd = this.createCommand(args.shift()); if (desc) { cmd.description(desc); cmd._executableHandler = true; } if (opts.isDefault) this._defaultCommandName = cmd._name; cmd._outputConfiguration = this._outputConfiguration; cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden cmd._hasHelpOption = this._hasHelpOption; cmd._helpFlags = this._helpFlags; cmd._helpDescription = this._helpDescription; cmd._helpShortFlag = this._helpShortFlag; cmd._helpLongFlag = this._helpLongFlag; cmd._helpCommandName = this._helpCommandName; cmd._helpCommandnameAndArgs = this._helpCommandnameAndArgs; cmd._helpCommandDescription = this._helpCommandDescription; cmd._helpConfiguration = this._helpConfiguration; cmd._exitCallback = this._exitCallback; cmd._storeOptionsAsProperties = this._storeOptionsAsProperties; cmd._combineFlagAndOptionalValue = this._combineFlagAndOptionalValue; cmd._allowExcessArguments = this._allowExcessArguments; cmd._enablePositionalOptions = this._enablePositionalOptions; cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor this.commands.push(cmd); cmd._parseExpectedArgs(args); cmd.parent = this; if (desc) return this; return cmd; }; /** * Factory routine to create a new unattached command. * * See .command() for creating an attached subcommand, which uses this routine to * create the command. You can override createCommand to customise subcommands. * * @param {string} [name] * @return {Command} new command */ createCommand(name) { return new Command(name); }; /** * You can customise the help with a subclass of Help by overriding createHelp, * or by overriding Help properties using configureHelp(). * * @return {Help} */ createHelp() { return Object.assign(new Help(), this.configureHelp()); }; /** * You can customise the help by overriding Help properties using configureHelp(), * or with a subclass of Help by overriding createHelp(). * * @param {Object} [configuration] - configuration options * @return {Command|Object} `this` command for chaining, or stored configuration */ configureHelp(configuration) { if (configuration === undefined) return this._helpConfiguration; this._helpConfiguration = configuration; return this; } /** * The default output goes to stdout and stderr. You can customise this for special * applications. You can also customise the display of errors by overriding outputError. * * The configuration properties are all functions: * * // functions to change where being written, stdout and stderr * writeOut(str) * writeErr(str) * // matching functions to specify width for wrapping help * getOutHelpWidth() * getErrHelpWidth() * // functions based on what is being written out * outputError(str, write) // used for displaying errors, and not used for displaying help * * @param {Object} [configuration] - configuration options * @return {Command|Object} `this` command for chaining, or stored configuration */ configureOutput(configuration) { if (configuration === undefined) return this._outputConfiguration; Object.assign(this._outputConfiguration, configuration); return this; } /** * Add a prepared subcommand. * * See .command() for creating an attached subcommand which inherits settings from its parent. * * @param {Command} cmd - new subcommand * @param {Object} [opts] - configuration options * @return {Command} `this` command for chaining */ addCommand(cmd, opts) { if (!cmd._name) throw new Error('Command passed to .addCommand() must have a name'); // To keep things simple, block automatic name generation for deeply nested executables. // Fail fast and detect when adding rather than later when parsing. function checkExplicitNames(commandArray) { commandArray.forEach((cmd) => { if (cmd._executableHandler && !cmd._executableFile) { throw new Error(`Must specify executableFile for deeply nested executable: ${cmd.name()}`); } checkExplicitNames(cmd.commands); }); } checkExplicitNames(cmd.commands); opts = opts || {}; if (opts.isDefault) this._defaultCommandName = cmd._name; if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation this.commands.push(cmd); cmd.parent = this; return this; }; /** * Define argument syntax for the command. */ arguments(desc) { return this._parseExpectedArgs(desc.split(/ +/)); }; /** * Override default decision whether to add implicit help command. * * addHelpCommand() // force on * addHelpCommand(false); // force off * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details * * @return {Command} `this` command for chaining */ addHelpCommand(enableOrNameAndArgs, description) { if (enableOrNameAndArgs === false) { this._addImplicitHelpCommand = false; } else { this._addImplicitHelpCommand = true; if (typeof enableOrNameAndArgs === 'string') { this._helpCommandName = enableOrNameAndArgs.split(' ')[0]; this._helpCommandnameAndArgs = enableOrNameAndArgs; } this._helpCommandDescription = description || this._helpCommandDescription; } return this; }; /** * @return {boolean} * @api private */ _hasImplicitHelpCommand() { if (this._addImplicitHelpCommand === undefined) { return this.commands.length && !this._actionHandler && !this._findCommand('help'); } return this._addImplicitHelpCommand; }; /** * Parse expected `args`. * * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. * * @param {Array} args * @return {Command} `this` command for chaining * @api private */ _parseExpectedArgs(args) { if (!args.length) return; args.forEach((arg) => { const argDetails = { required: false, name: '', variadic: false }; switch (arg[0]) { case '<': argDetails.required = true; argDetails.name = arg.slice(1, -1); break; case '[': argDetails.name = arg.slice(1, -1); break; } if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { argDetails.variadic = true; argDetails.name = argDetails.name.slice(0, -3); } if (argDetails.name) { this._args.push(argDetails); } }); this._args.forEach((arg, i) => { if (arg.variadic && i < this._args.length - 1) { throw new Error(`only the last argument can be variadic '${arg.name}'`); } }); return this; }; /** * Register callback to use as replacement for calling process.exit. * * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing * @return {Command} `this` command for chaining */ exitOverride(fn) { if (fn) { this._exitCallback = fn; } else { this._exitCallback = (err) => { if (err.code !== 'commander.executeSubCommandAsync') { throw err; } else { // Async callback from spawn events, not useful to throw. } }; } return this; }; /** * Call process.exit, and _exitCallback if defined. * * @param {number} exitCode exit code for using with process.exit * @param {string} code an id string representing the error * @param {string} message human-readable description of the error * @return never * @api private */ _exit(exitCode, code, message) { if (this._exitCallback) { this._exitCallback(new CommanderError(exitCode, code, message)); // Expecting this line is not reached. } process.exit(exitCode); }; /** * Register callback `fn` for the command. * * Examples: * * program * .command('help') * .description('display verbose help') * .action(function() { * // output help here * }); * * @param {Function} fn * @return {Command} `this` command for chaining */ action(fn) { const listener = (args) => { // The .action callback takes an extra parameter which is the command or options. const expectedArgsCount = this._args.length; const actionArgs = args.slice(0, expectedArgsCount); if (this._storeOptionsAsProperties) { actionArgs[expectedArgsCount] = this; // backwards compatible "options" } else { actionArgs[expectedArgsCount] = this.opts(); } actionArgs.push(this); const actionResult = fn.apply(this, actionArgs); // Remember result in case it is async. Assume parseAsync getting called on root. let rootCommand = this; while (rootCommand.parent) { rootCommand = rootCommand.parent; } rootCommand._actionResults.push(actionResult); }; this._actionHandler = listener; return this; }; /** * Factory routine to create a new unattached option. * * See .option() for creating an attached option, which uses this routine to * create the option. You can override createOption to return a custom option. * * @param {string} flags * @param {string} [description] * @return {Option} new option */ createOption(flags, description) { return new Option(flags, description); }; /** * Add an option. * * @param {Option} option * @return {Command} `this` command for chaining */ addOption(option) { const oname = option.name(); const name = option.attributeName(); let defaultValue = option.defaultValue; // preassign default value for --no-*, [optional], , or plain flag if boolean value if (option.negate || option.optional || option.required || typeof defaultValue === 'boolean') { // when --no-foo we make sure default is true, unless a --foo option is already defined if (option.negate) { const positiveLongFlag = option.long.replace(/^--no-/, '--'); defaultValue = this._findOption(positiveLongFlag) ? this._getOptionValue(name) : true; } // preassign only if we have a default if (defaultValue !== undefined) { this._setOptionValue(name, defaultValue); } } // register the option this.options.push(option); // when it's passed assign the value // and conditionally invoke the callback this.on('option:' + oname, (val) => { const oldValue = this._getOptionValue(name); // custom processing if (val !== null && option.parseArg) { try { val = option.parseArg(val, oldValue === undefined ? defaultValue : oldValue); } catch (err) { if (err.code === 'commander.invalidOptionArgument') { const message = `error: option '${option.flags}' argument '${val}' is invalid. ${err.message}`; this._displayError(err.exitCode, err.code, message); } throw err; } } else if (val !== null && option.variadic) { val = option._concatValue(val, oldValue); } // unassigned or boolean value if (typeof oldValue === 'boolean' || typeof oldValue === 'undefined') { // if no value, negate false, and we have a default, then use it! if (val == null) { this._setOptionValue(name, option.negate ? false : defaultValue || true); } else { this._setOptionValue(name, val); } } else if (val !== null) { // reassign this._setOptionValue(name, option.negate ? false : val); } }); return this; } /** * Internal implementation shared by .option() and .requiredOption() * * @api private */ _optionEx(config, flags, description, fn, defaultValue) { const option = this.createOption(flags, description); option.makeOptionMandatory(!!config.mandatory); if (typeof fn === 'function') { option.default(defaultValue).argParser(fn); } else if (fn instanceof RegExp) { // deprecated const regex = fn; fn = (val, def) => { const m = regex.exec(val); return m ? m[0] : def; }; option.default(defaultValue).argParser(fn); } else { option.default(fn); } return this.addOption(option); } /** * Define option with `flags`, `description` and optional * coercion `fn`. * * The `flags` string contains the short and/or long flags, * separated by comma, a pipe or space. The following are all valid * all will output this way when `--help` is used. * * "-p, --pepper" * "-p|--pepper" * "-p --pepper" * * Examples: * * // simple boolean defaulting to undefined * program.option('-p, --pepper', 'add pepper'); * * program.pepper * // => undefined * * --pepper * program.pepper * // => true * * // simple boolean defaulting to true (unless non-negated option is also defined) * program.option('-C, --no-cheese', 'remove cheese'); * * program.cheese * // => true * * --no-cheese * program.cheese * // => false * * // required argument * program.option('-C, --chdir ', 'change the working directory'); * * --chdir /tmp * program.chdir * // => "/tmp" * * // optional argument * program.option('-c, --cheese [type]', 'add cheese [marble]'); * * @param {string} flags * @param {string} [description] * @param {Function|*} [fn] - custom option processing function or default value * @param {*} [defaultValue] * @return {Command} `this` command for chaining */ option(flags, description, fn, defaultValue) { return this._optionEx({}, flags, description, fn, defaultValue); }; /** * Add a required option which must have a value after parsing. This usually means * the option must be specified on the command line. (Otherwise the same as .option().) * * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. * * @param {string} flags * @param {string} [description] * @param {Function|*} [fn] - custom option processing function or default value * @param {*} [defaultValue] * @return {Command} `this` command for chaining */ requiredOption(flags, description, fn, defaultValue) { return this._optionEx({ mandatory: true }, flags, description, fn, defaultValue); }; /** * Alter parsing of short flags with optional values. * * Examples: * * // for `.option('-f,--flag [value]'): * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` * * @param {Boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag. */ combineFlagAndOptionalValue(combine = true) { this._combineFlagAndOptionalValue = !!combine; return this; }; /** * Allow unknown options on the command line. * * @param {Boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown * for unknown options. */ allowUnknownOption(allowUnknown = true) { this._allowUnknownOption = !!allowUnknown; return this; }; /** * Allow excess command-arguments on the command line. Pass false to make excess arguments an error. * * @param {Boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown * for excess arguments. */ allowExcessArguments(allowExcess = true) { this._allowExcessArguments = !!allowExcess; return this; }; /** * Enable positional options. Positional means global options are specified before subcommands which lets * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions. * The default behaviour is non-positional and global options may appear anywhere on the command line. * * @param {Boolean} [positional=true] */ enablePositionalOptions(positional = true) { this._enablePositionalOptions = !!positional; return this; }; /** * Pass through options that come after command-arguments rather than treat them as command-options, * so actual command-options come before command-arguments. Turning this on for a subcommand requires * positional options to have been enabled on the program (parent commands). * The default behaviour is non-positional and options may appear before or after command-arguments. * * @param {Boolean} [passThrough=true] * for unknown options. */ passThroughOptions(passThrough = true) { this._passThroughOptions = !!passThrough; if (!!this.parent && passThrough && !this.parent._enablePositionalOptions) { throw new Error('passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)'); } return this; }; /** * Whether to store option values as properties on command object, * or store separately (specify false). In both cases the option values can be accessed using .opts(). * * @param {boolean} [storeAsProperties=true] * @return {Command} `this` command for chaining */ storeOptionsAsProperties(storeAsProperties = true) { this._storeOptionsAsProperties = !!storeAsProperties; if (this.options.length) { throw new Error('call .storeOptionsAsProperties() before adding options'); } return this; }; /** * Store option value * * @param {string} key * @param {Object} value * @api private */ _setOptionValue(key, value) { if (this._storeOptionsAsProperties) { this[key] = value; } else { this._optionValues[key] = value; } }; /** * Retrieve option value * * @param {string} key * @return {Object} value * @api private */ _getOptionValue(key) { if (this._storeOptionsAsProperties) { return this[key]; } return this._optionValues[key]; }; /** * Parse `argv`, setting options and invoking commands when defined. * * The default expectation is that the arguments are from node and have the application as argv[0] * and the script being run in argv[1], with user parameters after that. * * Examples: * * program.parse(process.argv); * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] * * @param {string[]} [argv] - optional, defaults to process.argv * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron' * @return {Command} `this` command for chaining */ parse(argv, parseOptions) { if (argv !== undefined && !Array.isArray(argv)) { throw new Error('first parameter to parse must be array or undefined'); } parseOptions = parseOptions || {}; // Default to using process.argv if (argv === undefined) { argv = process.argv; // @ts-ignore: unknown property if (process.versions && process.versions.electron) { parseOptions.from = 'electron'; } } this.rawArgs = argv.slice(); // make it a little easier for callers by supporting various argv conventions let userArgs; switch (parseOptions.from) { case undefined: case 'node': this._scriptPath = argv[1]; userArgs = argv.slice(2); break; case 'electron': // @ts-ignore: unknown property if (process.defaultApp) { this._scriptPath = argv[1]; userArgs = argv.slice(2); } else { userArgs = argv.slice(1); } break; case 'user': userArgs = argv.slice(0); break; default: throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`); } if (!this._scriptPath && require.main) { this._scriptPath = require.main.filename; } // Guess name, used in usage in help. this._name = this._name || (this._scriptPath && path.basename(this._scriptPath, path.extname(this._scriptPath))); // Let's go! this._parseCommand([], userArgs); return this; }; /** * Parse `argv`, setting options and invoking commands when defined. * * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise. * * The default expectation is that the arguments are from node and have the application as argv[0] * and the script being run in argv[1], with user parameters after that. * * Examples: * * program.parseAsync(process.argv); * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] * * @param {string[]} [argv] * @param {Object} [parseOptions] * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron' * @return {Promise} */ parseAsync(argv, parseOptions) { this.parse(argv, parseOptions); return Promise.all(this._actionResults).then(() => this); }; /** * Execute a sub-command executable. * * @api private */ _executeSubCommand(subcommand, args) { args = args.slice(); let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows. const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs']; // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command. this._checkForMissingMandatoryOptions(); // Want the entry script as the reference for command name and directory for searching for other files. let scriptPath = this._scriptPath; // Fallback in case not set, due to how Command created or called. if (!scriptPath && require.main) { scriptPath = require.main.filename; } let baseDir; try { const resolvedLink = fs.realpathSync(scriptPath); baseDir = path.dirname(resolvedLink); } catch (e) { baseDir = '.'; // dummy, probably not going to find executable! } // name of the subcommand, like `pm-install` let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name; if (subcommand._executableFile) { bin = subcommand._executableFile; } const localBin = path.join(baseDir, bin); if (fs.existsSync(localBin)) { // prefer local `./` to bin in the $PATH bin = localBin; } else { // Look for source files. sourceExt.forEach((ext) => { if (fs.existsSync(`${localBin}${ext}`)) { bin = `${localBin}${ext}`; } }); } launchWithNode = sourceExt.includes(path.extname(bin)); let proc; if (process.platform !== 'win32') { if (launchWithNode) { args.unshift(bin); // add executable arguments to spawn args = incrementNodeInspectorPort(process.execArgv).concat(args); proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' }); } else { proc = childProcess.spawn(bin, args, { stdio: 'inherit' }); } } else { args.unshift(bin); // add executable arguments to spawn args = incrementNodeInspectorPort(process.execArgv).concat(args); proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' }); } const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; signals.forEach((signal) => { // @ts-ignore process.on(signal, () => { if (proc.killed === false && proc.exitCode === null) { proc.kill(signal); } }); }); // By default terminate process when spawned process terminates. // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running! const exitCallback = this._exitCallback; if (!exitCallback) { proc.on('close', process.exit.bind(process)); } else { proc.on('close', () => { exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)')); }); } proc.on('error', (err) => { // @ts-ignore if (err.code === 'ENOENT') { const executableMissing = `'${bin}' does not exist - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - if the default executable name is not suitable, use the executableFile option to supply a custom name`; throw new Error(executableMissing); // @ts-ignore } else if (err.code === 'EACCES') { throw new Error(`'${bin}' not executable`); } if (!exitCallback) { process.exit(1); } else { const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)'); wrappedError.nestedError = err; exitCallback(wrappedError); } }); // Store the reference to the child process this.runningCommand = proc; }; /** * @api private */ _dispatchSubcommand(commandName, operands, unknown) { const subCommand = this._findCommand(commandName); if (!subCommand) this.help({ error: true }); if (subCommand._executableHandler) { this._executeSubCommand(subCommand, operands.concat(unknown)); } else { subCommand._parseCommand(operands, unknown); } }; /** * Process arguments in context of this command. * * @api private */ _parseCommand(operands, unknown) { const parsed = this.parseOptions(unknown); operands = operands.concat(parsed.operands); unknown = parsed.unknown; this.args = operands.concat(unknown); if (operands && this._findCommand(operands[0])) { this._dispatchSubcommand(operands[0], operands.slice(1), unknown); } else if (this._hasImplicitHelpCommand() && operands[0] === this._helpCommandName) { if (operands.length === 1) { this.help(); } else { this._dispatchSubcommand(operands[1], [], [this._helpLongFlag]); } } else if (this._defaultCommandName) { outputHelpIfRequested(this, unknown); // Run the help for default command from parent rather than passing to default command this._dispatchSubcommand(this._defaultCommandName, operands, unknown); } else { if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) { // probably missing subcommand and no handler, user needs help this.help({ error: true }); } outputHelpIfRequested(this, parsed.unknown); this._checkForMissingMandatoryOptions(); // We do not always call this check to avoid masking a "better" error, like unknown command. const checkForUnknownOptions = () => { if (parsed.unknown.length > 0) { this.unknownOption(parsed.unknown[0]); } }; const commandEvent = `command:${this.name()}`; if (this._actionHandler) { checkForUnknownOptions(); // Check expected arguments and collect variadic together. const args = this.args.slice(); this._args.forEach((arg, i) => { if (arg.required && args[i] == null) { this.missingArgument(arg.name); } else if (arg.variadic) { args[i] = args.splice(i); args.length = Math.min(i + 1, args.length); } }); if (args.length > this._args.length) { this._excessArguments(args); } this._actionHandler(args); if (this.parent) this.parent.emit(commandEvent, operands, unknown); // legacy } else if (this.parent && this.parent.listenerCount(commandEvent)) { checkForUnknownOptions(); this.parent.emit(commandEvent, operands, unknown); // legacy } else if (operands.length) { if (this._findCommand('*')) { // legacy default command this._dispatchSubcommand('*', operands, unknown); } else if (this.listenerCount('command:*')) { // skip option check, emit event for possible misspelling suggestion this.emit('command:*', operands, unknown); } else if (this.commands.length) { this.unknownCommand(); } else { checkForUnknownOptions(); } } else if (this.commands.length) { // This command has subcommands and nothing hooked up at this level, so display help. this.help({ error: true }); } else { checkForUnknownOptions(); // fall through for caller to handle after calling .parse() } } }; /** * Find matching command. * * @api private */ _findCommand(name) { if (!name) return undefined; return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name)); }; /** * Return an option matching `arg` if any. * * @param {string} arg * @return {Option} * @api private */ _findOption(arg) { return this.options.find(option => option.is(arg)); }; /** * Display an error message if a mandatory option does not have a value. * Lazy calling after checking for help flags from leaf subcommand. * * @api private */ _checkForMissingMandatoryOptions() { // Walk up hierarchy so can call in subcommand after checking for displaying help. for (let cmd = this; cmd; cmd = cmd.parent) { cmd.options.forEach((anOption) => { if (anOption.mandatory && (cmd._getOptionValue(anOption.attributeName()) === undefined)) { cmd.missingMandatoryOptionValue(anOption); } }); } }; /** * Parse options from `argv` removing known options, * and return argv split into operands and unknown arguments. * * Examples: * * argv => operands, unknown * --known kkk op => [op], [] * op --known kkk => [op], [] * sub --unknown uuu op => [sub], [--unknown uuu op] * sub -- --unknown uuu op => [sub --unknown uuu op], [] * * @param {String[]} argv * @return {{operands: String[], unknown: String[]}} */ parseOptions(argv) { const operands = []; // operands, not options or values const unknown = []; // first unknown option and remaining unknown args let dest = operands; const args = argv.slice(); function maybeOption(arg) { return arg.length > 1 && arg[0] === '-'; } // parse options let activeVariadicOption = null; while (args.length) { const arg = args.shift(); // literal if (arg === '--') { if (dest === unknown) dest.push(arg); dest.push(...args); break; } if (activeVariadicOption && !maybeOption(arg)) { this.emit(`option:${activeVariadicOption.name()}`, arg); continue; } activeVariadicOption = null; if (maybeOption(arg)) { const option = this._findOption(arg); // recognised option, call listener to assign value with possible custom processing if (option) { if (option.required) { const value = args.shift(); if (value === undefined) this.optionMissingArgument(option); this.emit(`option:${option.name()}`, value); } else if (option.optional) { let value = null; // historical behaviour is optional value is following arg unless an option if (args.length > 0 && !maybeOption(args[0])) { value = args.shift(); } this.emit(`option:${option.name()}`, value); } else { // boolean flag this.emit(`option:${option.name()}`); } activeVariadicOption = option.variadic ? option : null; continue; } } // Look for combo options following single dash, eat first one if known. if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') { const option = this._findOption(`-${arg[1]}`); if (option) { if (option.required || (option.optional && this._combineFlagAndOptionalValue)) { // option with value following in same argument this.emit(`option:${option.name()}`, arg.slice(2)); } else { // boolean option, emit and put back remainder of arg for further processing this.emit(`option:${option.name()}`); args.unshift(`-${arg.slice(2)}`); } continue; } } // Look for known long flag with value, like --foo=bar if (/^--[^=]+=/.test(arg)) { const index = arg.indexOf('='); const option = this._findOption(arg.slice(0, index)); if (option && (option.required || option.optional)) { this.emit(`option:${option.name()}`, arg.slice(index + 1)); continue; } } // Not a recognised option by this command. // Might be a command-argument, or subcommand option, or unknown option, or help command or option. // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands. if (maybeOption(arg)) { dest = unknown; } // If using positionalOptions, stop processing our options at subcommand. if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) { if (this._findCommand(arg)) { operands.push(arg); if (args.length > 0) unknown.push(...args); break; } else if (arg === this._helpCommandName && this._hasImplicitHelpCommand()) { operands.push(arg); if (args.length > 0) operands.push(...args); break; } else if (this._defaultCommandName) { unknown.push(arg); if (args.length > 0) unknown.push(...args); break; } } // If using passThroughOptions, stop processing options at first command-argument. if (this._passThroughOptions) { dest.push(arg); if (args.length > 0) dest.push(...args); break; } // add arg dest.push(arg); } return { operands, unknown }; }; /** * Return an object containing options as key-value pairs * * @return {Object} */ opts() { if (this._storeOptionsAsProperties) { // Preserve original behaviour so backwards compatible when still using properties const result = {}; const len = this.options.length; for (let i = 0; i < len; i++) { const key = this.options[i].attributeName(); result[key] = key === this._versionOptionName ? this._version : this[key]; } return result; } return this._optionValues; }; /** * Internal bottleneck for handling of parsing errors. * * @api private */ _displayError(exitCode, code, message) { this._outputConfiguration.outputError(`${message}\n`, this._outputConfiguration.writeErr); this._exit(exitCode, code, message); } /** * Argument `name` is missing. * * @param {string} name * @api private */ missingArgument(name) { const message = `error: missing required argument '${name}'`; this._displayError(1, 'commander.missingArgument', message); }; /** * `Option` is missing an argument. * * @param {Option} option * @api private */ optionMissingArgument(option) { const message = `error: option '${option.flags}' argument missing`; this._displayError(1, 'commander.optionMissingArgument', message); }; /** * `Option` does not have a value, and is a mandatory option. * * @param {Option} option * @api private */ missingMandatoryOptionValue(option) { const message = `error: required option '${option.flags}' not specified`; this._displayError(1, 'commander.missingMandatoryOptionValue', message); }; /** * Unknown option `flag`. * * @param {string} flag * @api private */ unknownOption(flag) { if (this._allowUnknownOption) return; const message = `error: unknown option '${flag}'`; this._displayError(1, 'commander.unknownOption', message); }; /** * Excess arguments, more than expected. * * @param {string[]} receivedArgs * @api private */ _excessArguments(receivedArgs) { if (this._allowExcessArguments) return; const expected = this._args.length; const s = (expected === 1) ? '' : 's'; const forSubcommand = this.parent ? ` for '${this.name()}'` : ''; const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`; this._displayError(1, 'commander.excessArguments', message); }; /** * Unknown command. * * @api private */ unknownCommand() { const partCommands = [this.name()]; for (let parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) { partCommands.unshift(parentCmd.name()); } const fullCommand = partCommands.join(' '); const message = `error: unknown command '${this.args[0]}'.` + (this._hasHelpOption ? ` See '${fullCommand} ${this._helpLongFlag}'.` : ''); this._displayError(1, 'commander.unknownCommand', message); }; /** * Set the program version to `str`. * * This method auto-registers the "-V, --version" flag * which will print the version number when passed. * * You can optionally supply the flags and description to override the defaults. * * @param {string} str * @param {string} [flags] * @param {string} [description] * @return {this | string} `this` command for chaining, or version string if no arguments */ version(str, flags, description) { if (str === undefined) return this._version; this._version = str; flags = flags || '-V, --version'; description = description || 'output the version number'; const versionOption = this.createOption(flags, description); this._versionOptionName = versionOption.attributeName(); this.options.push(versionOption); this.on('option:' + versionOption.name(), () => { this._outputConfiguration.writeOut(`${str}\n`); this._exit(0, 'commander.version', str); }); return this; }; /** * Set the description to `str`. * * @param {string} [str] * @param {Object} [argsDescription] * @return {string|Command} */ description(str, argsDescription) { if (str === undefined && argsDescription === undefined) return this._description; this._description = str; this._argsDescription = argsDescription; return this; }; /** * Set an alias for the command. * * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help. * * @param {string} [alias] * @return {string|Command} */ alias(alias) { if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility let command = this; if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) { // assume adding alias for last added executable subcommand, rather than this command = this.commands[this.commands.length - 1]; } if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); command._aliases.push(alias); return this; }; /** * Set aliases for the command. * * Only the first alias is shown in the auto-generated help. * * @param {string[]} [aliases] * @return {string[]|Command} */ aliases(aliases) { // Getter for the array of aliases is the main reason for having aliases() in addition to alias(). if (aliases === undefined) return this._aliases; aliases.forEach((alias) => this.alias(alias)); return this; }; /** * Set / get the command usage `str`. * * @param {string} [str] * @return {String|Command} */ usage(str) { if (str === undefined) { if (this._usage) return this._usage; const args = this._args.map((arg) => { return humanReadableArgName(arg); }); return [].concat( (this.options.length || this._hasHelpOption ? '[options]' : []), (this.commands.length ? '[command]' : []), (this._args.length ? args : []) ).join(' '); } this._usage = str; return this; }; /** * Get or set the name of the command * * @param {string} [str] * @return {string|Command} */ name(str) { if (str === undefined) return this._name; this._name = str; return this; }; /** * Return program help documentation. * * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout * @return {string} */ helpInformation(contextOptions) { const helper = this.createHelp(); if (helper.helpWidth === undefined) { helper.helpWidth = (contextOptions && contextOptions.error) ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth(); } return helper.formatHelp(this, helper); }; /** * @api private */ _getHelpContext(contextOptions) { contextOptions = contextOptions || {}; const context = { error: !!contextOptions.error }; let write; if (context.error) { write = (arg) => this._outputConfiguration.writeErr(arg); } else { write = (arg) => this._outputConfiguration.writeOut(arg); } context.write = contextOptions.write || write; context.command = this; return context; } /** * Output help information for this command. * * Outputs built-in help, and custom text added using `.addHelpText()`. * * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout */ outputHelp(contextOptions) { let deprecatedCallback; if (typeof contextOptions === 'function') { deprecatedCallback = contextOptions; contextOptions = undefined; } const context = this._getHelpContext(contextOptions); const groupListeners = []; let command = this; while (command) { groupListeners.push(command); // ordered from current command to root command = command.parent; } groupListeners.slice().reverse().forEach(command => command.emit('beforeAllHelp', context)); this.emit('beforeHelp', context); let helpInformation = this.helpInformation(context); if (deprecatedCallback) { helpInformation = deprecatedCallback(helpInformation); if (typeof helpInformation !== 'string' && !Buffer.isBuffer(helpInformation)) { throw new Error('outputHelp callback must return a string or a Buffer'); } } context.write(helpInformation); this.emit(this._helpLongFlag); // deprecated this.emit('afterHelp', context); groupListeners.forEach(command => command.emit('afterAllHelp', context)); }; /** * You can pass in flags and a description to override the help * flags and help description for your command. Pass in false to * disable the built-in help option. * * @param {string | boolean} [flags] * @param {string} [description] * @return {Command} `this` command for chaining */ helpOption(flags, description) { if (typeof flags === 'boolean') { this._hasHelpOption = flags; return this; } this._helpFlags = flags || this._helpFlags; this._helpDescription = description || this._helpDescription; const helpFlags = _parseOptionFlags(this._helpFlags); this._helpShortFlag = helpFlags.shortFlag; this._helpLongFlag = helpFlags.longFlag; return this; }; /** * Output help information and exit. * * Outputs built-in help, and custom text added using `.addHelpText()`. * * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout */ help(contextOptions) { this.outputHelp(contextOptions); let exitCode = process.exitCode || 0; if (exitCode === 0 && contextOptions && typeof contextOptions !== 'function' && contextOptions.error) { exitCode = 1; } // message: do not have all displayed text available so only passing placeholder. this._exit(exitCode, 'commander.help', '(outputHelp)'); }; /** * Add additional text to be displayed with the built-in help. * * Position is 'before' or 'after' to affect just this command, * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands. * * @param {string} position - before or after built-in help * @param {string | Function} text - string to add, or a function returning a string * @return {Command} `this` command for chaining */ addHelpText(position, text) { const allowedValues = ['beforeAll', 'before', 'after', 'afterAll']; if (!allowedValues.includes(position)) { throw new Error(`Unexpected value for position to addHelpText. Expecting one of '${allowedValues.join("', '")}'`); } const helpEvent = `${position}Help`; this.on(helpEvent, (context) => { let helpStr; if (typeof text === 'function') { helpStr = text({ error: context.error, command: context.command }); } else { helpStr = text; } // Ignore falsy value when nothing to output. if (helpStr) { context.write(`${helpStr}\n`); } }); return this; } }; /** * Expose the root command. */ exports = module.exports = new Command(); exports.program = exports; // More explicit access to global command. /** * Expose classes */ exports.Command = Command; exports.Option = Option; exports.CommanderError = CommanderError; exports.InvalidOptionArgumentError = InvalidOptionArgumentError; exports.Help = Help; /** * Camel-case the given `flag` * * @param {string} flag * @return {string} * @api private */ function camelcase(flag) { return flag.split('-').reduce((str, word) => { return str + word[0].toUpperCase() + word.slice(1); }); } /** * Output help information if help flags specified * * @param {Command} cmd - command to output help for * @param {Array} args - array of options to search for help flags * @api private */ function outputHelpIfRequested(cmd, args) { const helpOption = cmd._hasHelpOption && args.find(arg => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag); if (helpOption) { cmd.outputHelp(); // (Do not have all displayed text available so only passing placeholder.) cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)'); } } /** * Takes an argument and returns its human readable equivalent for help usage. * * @param {Object} arg * @return {string} * @api private */ function humanReadableArgName(arg) { const nameOutput = arg.name + (arg.variadic === true ? '...' : ''); return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']'; } /** * Parse the short and long flag out of something like '-m,--mixed ' * * @api private */ function _parseOptionFlags(flags) { let shortFlag; let longFlag; // Use original very loose parsing to maintain backwards compatibility for now, // which allowed for example unintended `-sw, --short-word` [sic]. const flagParts = flags.split(/[ |,]+/); if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) shortFlag = flagParts.shift(); longFlag = flagParts.shift(); // Add support for lone short flag without significantly changing parsing! if (!shortFlag && /^-[^-]$/.test(longFlag)) { shortFlag = longFlag; longFlag = undefined; } return { shortFlag, longFlag }; } /** * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command). * * @param {string[]} args - array of arguments from node.execArgv * @returns {string[]} * @api private */ function incrementNodeInspectorPort(args) { // Testing for these options: // --inspect[=[host:]port] // --inspect-brk[=[host:]port] // --inspect-port=[host:]port return args.map((arg) => { if (!arg.startsWith('--inspect')) { return arg; } let debugOption; let debugHost = '127.0.0.1'; let debugPort = '9229'; let match; if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) { // e.g. --inspect debugOption = match[1]; } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) { debugOption = match[1]; if (/^\d+$/.test(match[3])) { // e.g. --inspect=1234 debugPort = match[3]; } else { // e.g. --inspect=localhost debugHost = match[3]; } } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) { // e.g. --inspect=localhost:1234 debugOption = match[1]; debugHost = match[3]; debugPort = match[4]; } if (debugOption && debugPort !== '0') { return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`; } return arg; }); } /***/ }), /***/ 86891: /***/ ((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]'; }; /***/ }), /***/ 95898: /***/ ((__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); } /***/ }), /***/ 27455: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule, MatcherList: __webpack_require__(25458).MatcherList }; ///CommonJS /** * @constructor * @see https://developer.mozilla.org/en/CSS/@-moz-document */ CSSOM.CSSDocumentRule = function CSSDocumentRule() { CSSOM.CSSRule.call(this); this.matcher = new CSSOM.MatcherList(); this.cssRules = []; }; CSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule; CSSOM.CSSDocumentRule.prototype.type = 10; //FIXME //CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSDocumentRule = CSSOM.CSSDocumentRule; ///CommonJS /***/ }), /***/ 33046: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSStyleDeclaration: __webpack_require__(45131).CSSStyleDeclaration, CSSRule: __webpack_require__(23364).CSSRule }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule */ CSSOM.CSSFontFaceRule = function CSSFontFaceRule() { CSSOM.CSSRule.call(this); this.style = new CSSOM.CSSStyleDeclaration(); this.style.parentRule = this; }; CSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule; CSSOM.CSSFontFaceRule.prototype.type = 5; //FIXME //CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", { get: function() { return "@font-face {" + this.style.cssText + "}"; } }); //.CommonJS exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule; ///CommonJS /***/ }), /***/ 57986: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/shadow-dom/#host-at-rule */ CSSOM.CSSHostRule = function CSSHostRule() { CSSOM.CSSRule.call(this); this.cssRules = []; }; CSSOM.CSSHostRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule; CSSOM.CSSHostRule.prototype.type = 1001; //FIXME //CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@host {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSHostRule = CSSOM.CSSHostRule; ///CommonJS /***/ }), /***/ 49776: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule, CSSStyleSheet: __webpack_require__(62486).CSSStyleSheet, MediaList: __webpack_require__(63849).MediaList }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#cssimportrule * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule */ CSSOM.CSSImportRule = function CSSImportRule() { CSSOM.CSSRule.call(this); this.href = ""; this.media = new CSSOM.MediaList(); this.styleSheet = new CSSOM.CSSStyleSheet(); }; CSSOM.CSSImportRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule; CSSOM.CSSImportRule.prototype.type = 3; Object.defineProperty(CSSOM.CSSImportRule.prototype, "cssText", { get: function() { var mediaText = this.media.mediaText; return "@import url(" + this.href + ")" + (mediaText ? " " + mediaText : "") + ";"; }, set: function(cssText) { var i = 0; /** * @import url(partial.css) screen, handheld; * || | * after-import media * | * url */ var state = ''; var buffer = ''; var index; for (var character; (character = cssText.charAt(i)); i++) { switch (character) { case ' ': case '\t': case '\r': case '\n': case '\f': if (state === 'after-import') { state = 'url'; } else { buffer += character; } break; case '@': if (!state && cssText.indexOf('@import', i) === i) { state = 'after-import'; i += 'import'.length; buffer = ''; } break; case 'u': if (state === 'url' && cssText.indexOf('url(', i) === i) { index = cssText.indexOf(')', i + 1); if (index === -1) { throw i + ': ")" not found'; } i += 'url('.length; var url = cssText.slice(i, index); if (url[0] === url[url.length - 1]) { if (url[0] === '"' || url[0] === "'") { url = url.slice(1, -1); } } this.href = url; i = index; state = 'media'; } break; case '"': if (state === 'url') { index = cssText.indexOf('"', i + 1); if (!index) { throw i + ": '\"' not found"; } this.href = cssText.slice(i + 1, index); i = index; state = 'media'; } break; case "'": if (state === 'url') { index = cssText.indexOf("'", i + 1); if (!index) { throw i + ': "\'" not found'; } this.href = cssText.slice(i + 1, index); i = index; state = 'media'; } break; case ';': if (state === 'media') { if (buffer) { this.media.mediaText = buffer.trim(); } } break; default: if (state === 'media') { buffer += character; } break; } } } }); //.CommonJS exports.CSSImportRule = CSSOM.CSSImportRule; ///CommonJS /***/ }), /***/ 97254: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule, CSSStyleDeclaration: __webpack_require__(45131).CSSStyleDeclaration }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule */ CSSOM.CSSKeyframeRule = function CSSKeyframeRule() { CSSOM.CSSRule.call(this); this.keyText = ''; this.style = new CSSOM.CSSStyleDeclaration(); this.style.parentRule = this; }; CSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule; CSSOM.CSSKeyframeRule.prototype.type = 8; //FIXME //CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp Object.defineProperty(CSSOM.CSSKeyframeRule.prototype, "cssText", { get: function() { return this.keyText + " {" + this.style.cssText + "} "; } }); //.CommonJS exports.CSSKeyframeRule = CSSOM.CSSKeyframeRule; ///CommonJS /***/ }), /***/ 16005: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule */ CSSOM.CSSKeyframesRule = function CSSKeyframesRule() { CSSOM.CSSRule.call(this); this.name = ''; this.cssRules = []; }; CSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule; CSSOM.CSSKeyframesRule.prototype.type = 7; //FIXME //CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp Object.defineProperty(CSSOM.CSSKeyframesRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(" " + this.cssRules[i].cssText); } return "@" + (this._vendorPrefix || '') + "keyframes " + this.name + " { \n" + cssTexts.join("\n") + "\n}"; } }); //.CommonJS exports.CSSKeyframesRule = CSSOM.CSSKeyframesRule; ///CommonJS /***/ }), /***/ 96791: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule, MediaList: __webpack_require__(63849).MediaList }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#cssmediarule * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule */ CSSOM.CSSMediaRule = function CSSMediaRule() { CSSOM.CSSRule.call(this); this.media = new CSSOM.MediaList(); this.cssRules = []; }; CSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule; CSSOM.CSSMediaRule.prototype.type = 4; //FIXME //CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp Object.defineProperty(CSSOM.CSSMediaRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSMediaRule = CSSOM.CSSMediaRule; ///CommonJS /***/ }), /***/ 23364: /***/ ((__unused_webpack_module, exports) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule */ CSSOM.CSSRule = function CSSRule() { this.parentRule = null; this.parentStyleSheet = null; }; CSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete CSSOM.CSSRule.STYLE_RULE = 1; CSSOM.CSSRule.CHARSET_RULE = 2; // obsolete CSSOM.CSSRule.IMPORT_RULE = 3; CSSOM.CSSRule.MEDIA_RULE = 4; CSSOM.CSSRule.FONT_FACE_RULE = 5; CSSOM.CSSRule.PAGE_RULE = 6; CSSOM.CSSRule.KEYFRAMES_RULE = 7; CSSOM.CSSRule.KEYFRAME_RULE = 8; CSSOM.CSSRule.MARGIN_RULE = 9; CSSOM.CSSRule.NAMESPACE_RULE = 10; CSSOM.CSSRule.COUNTER_STYLE_RULE = 11; CSSOM.CSSRule.SUPPORTS_RULE = 12; CSSOM.CSSRule.DOCUMENT_RULE = 13; CSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14; CSSOM.CSSRule.VIEWPORT_RULE = 15; CSSOM.CSSRule.REGION_STYLE_RULE = 16; CSSOM.CSSRule.prototype = { constructor: CSSOM.CSSRule //FIXME }; //.CommonJS exports.CSSRule = CSSOM.CSSRule; ///CommonJS /***/ }), /***/ 45131: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration */ CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){ this.length = 0; this.parentRule = null; // NON-STANDARD this._importants = {}; }; CSSOM.CSSStyleDeclaration.prototype = { constructor: CSSOM.CSSStyleDeclaration, /** * * @param {string} name * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue * @return {string} the value of the property if it has been explicitly set for this declaration block. * Returns the empty string if the property has not been set. */ getPropertyValue: function(name) { return this[name] || ""; }, /** * * @param {string} name * @param {string} value * @param {string} [priority=null] "important" or null * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty */ setProperty: function(name, value, priority) { if (this[name]) { // Property already exist. Overwrite it. var index = Array.prototype.indexOf.call(this, name); if (index < 0) { this[this.length] = name; this.length++; } } else { // New property. this[this.length] = name; this.length++; } this[name] = value + ""; this._importants[name] = priority; }, /** * * @param {string} name * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty * @return {string} the value of the property if it has been explicitly set for this declaration block. * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. */ removeProperty: function(name) { if (!(name in this)) { return ""; } var index = Array.prototype.indexOf.call(this, name); if (index < 0) { return ""; } var prevValue = this[name]; this[name] = ""; // That's what WebKit and Opera do Array.prototype.splice.call(this, index, 1); // That's what Firefox does //this[index] = "" return prevValue; }, getPropertyCSSValue: function() { //FIXME }, /** * * @param {String} name */ getPropertyPriority: function(name) { return this._importants[name] || ""; }, /** * element.style.overflow = "auto" * element.style.getPropertyShorthand("overflow-x") * -> "overflow" */ getPropertyShorthand: function() { //FIXME }, isPropertyImplicit: function() { //FIXME }, // Doesn't work in IE < 9 get cssText(){ var properties = []; for (var i=0, length=this.length; i < length; ++i) { var name = this[i]; var value = this.getPropertyValue(name); var priority = this.getPropertyPriority(name); if (priority) { priority = " !" + priority; } properties[i] = name + ": " + value + priority + ";"; } return properties.join(" "); }, set cssText(text){ var i, name; for (i = this.length; i--;) { name = this[i]; this[name] = ""; } Array.prototype.splice.call(this, 0, this.length); this._importants = {}; var dummyRule = CSSOM.parse('#bogus{' + text + '}').cssRules[0].style; var length = dummyRule.length; for (i = 0; i < length; ++i) { name = dummyRule[i]; this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name)); } } }; //.CommonJS exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration; CSSOM.parse = __webpack_require__(18025).parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js ///CommonJS /***/ }), /***/ 4608: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSStyleDeclaration: __webpack_require__(45131).CSSStyleDeclaration, CSSRule: __webpack_require__(23364).CSSRule }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#cssstylerule * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule */ CSSOM.CSSStyleRule = function CSSStyleRule() { CSSOM.CSSRule.call(this); this.selectorText = ""; this.style = new CSSOM.CSSStyleDeclaration(); this.style.parentRule = this; }; CSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule; CSSOM.CSSStyleRule.prototype.type = 1; Object.defineProperty(CSSOM.CSSStyleRule.prototype, "cssText", { get: function() { var text; if (this.selectorText) { text = this.selectorText + " {" + this.style.cssText + "}"; } else { text = ""; } return text; }, set: function(cssText) { var rule = CSSOM.CSSStyleRule.parse(cssText); this.style = rule.style; this.selectorText = rule.selectorText; } }); /** * NON-STANDARD * lightweight version of parse.js. * @param {string} ruleText * @return CSSStyleRule */ CSSOM.CSSStyleRule.parse = function(ruleText) { var i = 0; var state = "selector"; var index; var j = i; var buffer = ""; var SIGNIFICANT_WHITESPACE = { "selector": true, "value": true }; var styleRule = new CSSOM.CSSStyleRule(); var name, priority=""; for (var character; (character = ruleText.charAt(i)); i++) { switch (character) { case " ": case "\t": case "\r": case "\n": case "\f": if (SIGNIFICANT_WHITESPACE[state]) { // Squash 2 or more white-spaces in the row into 1 switch (ruleText.charAt(i - 1)) { case " ": case "\t": case "\r": case "\n": case "\f": break; default: buffer += " "; break; } } break; // String case '"': j = i + 1; index = ruleText.indexOf('"', j) + 1; if (!index) { throw '" is missing'; } buffer += ruleText.slice(i, index); i = index - 1; break; case "'": j = i + 1; index = ruleText.indexOf("'", j) + 1; if (!index) { throw "' is missing"; } buffer += ruleText.slice(i, index); i = index - 1; break; // Comment case "/": if (ruleText.charAt(i + 1) === "*") { i += 2; index = ruleText.indexOf("*/", i); if (index === -1) { throw new SyntaxError("Missing */"); } else { i = index + 1; } } else { buffer += character; } break; case "{": if (state === "selector") { styleRule.selectorText = buffer.trim(); buffer = ""; state = "name"; } break; case ":": if (state === "name") { name = buffer.trim(); buffer = ""; state = "value"; } else { buffer += character; } break; case "!": if (state === "value" && ruleText.indexOf("!important", i) === i) { priority = "important"; i += "important".length; } else { buffer += character; } break; case ";": if (state === "value") { styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; buffer = ""; state = "name"; } else { buffer += character; } break; case "}": if (state === "value") { styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; buffer = ""; } else if (state === "name") { break; } else { buffer += character; } state = "selector"; break; default: buffer += character; break; } } return styleRule; }; //.CommonJS exports.CSSStyleRule = CSSOM.CSSStyleRule; ///CommonJS /***/ }), /***/ 62486: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { StyleSheet: __webpack_require__(96785).StyleSheet, CSSStyleRule: __webpack_require__(4608).CSSStyleRule }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet */ CSSOM.CSSStyleSheet = function CSSStyleSheet() { CSSOM.StyleSheet.call(this); this.cssRules = []; }; CSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet(); CSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet; /** * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade. * * sheet = new Sheet("body {margin: 0}") * sheet.toString() * -> "body{margin:0;}" * sheet.insertRule("img {border: none}", 0) * -> 0 * sheet.toString() * -> "img{border:none;}body{margin:0;}" * * @param {string} rule * @param {number} index * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule * @return {number} The index within the style sheet's rule collection of the newly inserted rule. */ CSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) { if (index < 0 || index > this.cssRules.length) { throw new RangeError("INDEX_SIZE_ERR"); } var cssRule = CSSOM.parse(rule).cssRules[0]; cssRule.parentStyleSheet = this; this.cssRules.splice(index, 0, cssRule); return index; }; /** * Used to delete a rule from the style sheet. * * sheet = new Sheet("img{border:none} body{margin:0}") * sheet.toString() * -> "img{border:none;}body{margin:0;}" * sheet.deleteRule(0) * sheet.toString() * -> "body{margin:0;}" * * @param {number} index within the style sheet's rule list of the rule to remove. * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule */ CSSOM.CSSStyleSheet.prototype.deleteRule = function(index) { if (index < 0 || index >= this.cssRules.length) { throw new RangeError("INDEX_SIZE_ERR"); } this.cssRules.splice(index, 1); }; /** * NON-STANDARD * @return {string} serialize stylesheet */ CSSOM.CSSStyleSheet.prototype.toString = function() { var result = ""; var rules = this.cssRules; for (var i=0; i { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(23364).CSSRule, }; ///CommonJS /** * @constructor * @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface */ CSSOM.CSSSupportsRule = function CSSSupportsRule() { CSSOM.CSSRule.call(this); this.conditionText = ''; this.cssRules = []; }; CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule; CSSOM.CSSSupportsRule.prototype.type = 12; Object.defineProperty(CSSOM.CSSSupportsRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i = 0, length = this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@supports " + this.conditionText + " {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSSupportsRule = CSSOM.CSSSupportsRule; ///CommonJS /***/ }), /***/ 99957: /***/ ((__unused_webpack_module, exports) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue * * TODO: add if needed */ CSSOM.CSSValue = function CSSValue() { }; CSSOM.CSSValue.prototype = { constructor: CSSOM.CSSValue, // @see: http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue set cssText(text) { var name = this._getConstructorName(); throw new Error('DOMException: property "cssText" of "' + name + '" is readonly and can not be replaced with "' + text + '"!'); }, get cssText() { var name = this._getConstructorName(); throw new Error('getter "cssText" of "' + name + '" is not implemented!'); }, _getConstructorName: function() { var s = this.constructor.toString(), c = s.match(/function\s([^\(]+)/), name = c[1]; return name; } }; //.CommonJS exports.CSSValue = CSSOM.CSSValue; ///CommonJS /***/ }), /***/ 75996: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSValue: __webpack_require__(99957).CSSValue }; ///CommonJS /** * @constructor * @see http://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx * */ CSSOM.CSSValueExpression = function CSSValueExpression(token, idx) { this._token = token; this._idx = idx; }; CSSOM.CSSValueExpression.prototype = new CSSOM.CSSValue(); CSSOM.CSSValueExpression.prototype.constructor = CSSOM.CSSValueExpression; /** * parse css expression() value * * @return {Object} * - error: * or * - idx: * - expression: * * Example: * * .selector { * zoom: expression(documentElement.clientWidth > 1000 ? '1000px' : 'auto'); * } */ CSSOM.CSSValueExpression.prototype.parse = function() { var token = this._token, idx = this._idx; var character = '', expression = '', error = '', info, paren = []; for (; ; ++idx) { character = token.charAt(idx); // end of token if (character === '') { error = 'css expression error: unfinished expression!'; break; } switch(character) { case '(': paren.push(character); expression += character; break; case ')': paren.pop(character); expression += character; break; case '/': if ((info = this._parseJSComment(token, idx))) { // comment? if (info.error) { error = 'css expression error: unfinished comment in expression!'; } else { idx = info.idx; // ignore the comment } } else if ((info = this._parseJSRexExp(token, idx))) { // regexp idx = info.idx; expression += info.text; } else { // other expression += character; } break; case "'": case '"': info = this._parseJSString(token, idx, character); if (info) { // string idx = info.idx; expression += info.text; } else { expression += character; } break; default: expression += character; break; } if (error) { break; } // end of expression if (paren.length === 0) { break; } } var ret; if (error) { ret = { error: error }; } else { ret = { idx: idx, expression: expression }; } return ret; }; /** * * @return {Object|false} * - idx: * - text: * or * - error: * or * false * */ CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) { var nextChar = token.charAt(idx + 1), text; if (nextChar === '/' || nextChar === '*') { var startIdx = idx, endIdx, commentEndChar; if (nextChar === '/') { // line comment commentEndChar = '\n'; } else if (nextChar === '*') { // block comment commentEndChar = '*/'; } endIdx = token.indexOf(commentEndChar, startIdx + 1 + 1); if (endIdx !== -1) { endIdx = endIdx + commentEndChar.length - 1; text = token.substring(idx, endIdx + 1); return { idx: endIdx, text: text }; } else { var error = 'css expression error: unfinished comment in expression!'; return { error: error }; } } else { return false; } }; /** * * @return {Object|false} * - idx: * - text: * or * false * */ CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) { var endIdx = this._findMatchedIdx(token, idx, sep), text; if (endIdx === -1) { return false; } else { text = token.substring(idx, endIdx + sep.length); return { idx: endIdx, text: text }; } }; /** * parse regexp in css expression * * @return {Object|false} * - idx: * - regExp: * or * false */ /* all legal RegExp /a/ (/a/) [/a/] [12, /a/] !/a/ +/a/ -/a/ * /a/ / /a/ %/a/ ===/a/ !==/a/ ==/a/ !=/a/ >/a/ >=/a/ >/a/ >>>/a/ &&/a/ ||/a/ ?/a/ =/a/ ,/a/ delete /a/ in /a/ instanceof /a/ new /a/ typeof /a/ void /a/ */ CSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) { var before = token.substring(0, idx).replace(/\s+$/, ""), legalRegx = [ /^$/, /\($/, /\[$/, /\!$/, /\+$/, /\-$/, /\*$/, /\/\s+/, /\%$/, /\=$/, /\>$/, /<$/, /\&$/, /\|$/, /\^$/, /\~$/, /\?$/, /\,$/, /delete$/, /in$/, /instanceof$/, /new$/, /typeof$/, /void$/ ]; var isLegal = legalRegx.some(function(reg) { return reg.test(before); }); if (!isLegal) { return false; } else { var sep = '/'; // same logic as string return this._parseJSString(token, idx, sep); } }; /** * * find next sep(same line) index in `token` * * @return {Number} * */ CSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) { var startIdx = idx, endIdx; var NOT_FOUND = -1; while(true) { endIdx = token.indexOf(sep, startIdx + 1); if (endIdx === -1) { // not found endIdx = NOT_FOUND; break; } else { var text = token.substring(idx + 1, endIdx), matched = text.match(/\\+$/); if (!matched || matched[0] % 2 === 0) { // not escaped break; } else { startIdx = endIdx; } } } // boundary must be in the same line(js sting or regexp) var nextNewLineIdx = token.indexOf('\n', idx + 1); if (nextNewLineIdx < endIdx) { endIdx = NOT_FOUND; } return endIdx; }; //.CommonJS exports.CSSValueExpression = CSSOM.CSSValueExpression; ///CommonJS /***/ }), /***/ 25458: /***/ ((__unused_webpack_module, exports) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see https://developer.mozilla.org/en/CSS/@-moz-document */ CSSOM.MatcherList = function MatcherList(){ this.length = 0; }; CSSOM.MatcherList.prototype = { constructor: CSSOM.MatcherList, /** * @return {string} */ get matcherText() { return Array.prototype.join.call(this, ", "); }, /** * @param {string} value */ set matcherText(value) { // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','. var values = value.split(","); var length = this.length = values.length; for (var i=0; i { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#the-medialist-interface */ CSSOM.MediaList = function MediaList(){ this.length = 0; }; CSSOM.MediaList.prototype = { constructor: CSSOM.MediaList, /** * @return {string} */ get mediaText() { return Array.prototype.join.call(this, ", "); }, /** * @param {string} value */ set mediaText(value) { var values = value.split(","); var length = this.length = values.length; for (var i=0; i { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#the-stylesheet-interface */ CSSOM.StyleSheet = function StyleSheet() { this.parentStyleSheet = null; }; //.CommonJS exports.StyleSheet = CSSOM.StyleSheet; ///CommonJS /***/ }), /***/ 98257: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSStyleSheet: __webpack_require__(62486).CSSStyleSheet, CSSStyleRule: __webpack_require__(4608).CSSStyleRule, CSSMediaRule: __webpack_require__(96791).CSSMediaRule, CSSSupportsRule: __webpack_require__(27967).CSSSupportsRule, CSSStyleDeclaration: __webpack_require__(45131).CSSStyleDeclaration, CSSKeyframeRule: __webpack_require__(97254).CSSKeyframeRule, CSSKeyframesRule: __webpack_require__(16005).CSSKeyframesRule }; ///CommonJS /** * Produces a deep copy of stylesheet — the instance variables of stylesheet are copied recursively. * @param {CSSStyleSheet|CSSOM.CSSStyleSheet} stylesheet * @nosideeffects * @return {CSSOM.CSSStyleSheet} */ CSSOM.clone = function clone(stylesheet) { var cloned = new CSSOM.CSSStyleSheet(); var rules = stylesheet.cssRules; if (!rules) { return cloned; } for (var i = 0, rulesLength = rules.length; i < rulesLength; i++) { var rule = rules[i]; var ruleClone = cloned.cssRules[i] = new rule.constructor(); var style = rule.style; if (style) { var styleClone = ruleClone.style = new CSSOM.CSSStyleDeclaration(); for (var j = 0, styleLength = style.length; j < styleLength; j++) { var name = styleClone[j] = style[j]; styleClone[name] = style[name]; styleClone._importants[name] = style.getPropertyPriority(name); } styleClone.length = style.length; } if (rule.hasOwnProperty('keyText')) { ruleClone.keyText = rule.keyText; } if (rule.hasOwnProperty('selectorText')) { ruleClone.selectorText = rule.selectorText; } if (rule.hasOwnProperty('mediaText')) { ruleClone.mediaText = rule.mediaText; } if (rule.hasOwnProperty('conditionText')) { ruleClone.conditionText = rule.conditionText; } if (rule.hasOwnProperty('cssRules')) { ruleClone.cssRules = clone(rule).cssRules; } } return cloned; }; //.CommonJS exports.clone = CSSOM.clone; ///CommonJS /***/ }), /***/ 1295: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; exports.CSSStyleDeclaration = __webpack_require__(45131).CSSStyleDeclaration; exports.CSSRule = __webpack_require__(23364).CSSRule; exports.CSSStyleRule = __webpack_require__(4608).CSSStyleRule; exports.MediaList = __webpack_require__(63849).MediaList; exports.CSSMediaRule = __webpack_require__(96791).CSSMediaRule; exports.CSSSupportsRule = __webpack_require__(27967).CSSSupportsRule; exports.CSSImportRule = __webpack_require__(49776).CSSImportRule; exports.CSSFontFaceRule = __webpack_require__(33046).CSSFontFaceRule; exports.CSSHostRule = __webpack_require__(57986).CSSHostRule; exports.StyleSheet = __webpack_require__(96785).StyleSheet; exports.CSSStyleSheet = __webpack_require__(62486).CSSStyleSheet; exports.CSSKeyframesRule = __webpack_require__(16005).CSSKeyframesRule; exports.CSSKeyframeRule = __webpack_require__(97254).CSSKeyframeRule; exports.MatcherList = __webpack_require__(25458).MatcherList; exports.CSSDocumentRule = __webpack_require__(27455).CSSDocumentRule; exports.CSSValue = __webpack_require__(99957).CSSValue; exports.CSSValueExpression = __webpack_require__(75996).CSSValueExpression; exports.parse = __webpack_require__(18025).parse; exports.clone = __webpack_require__(98257).clone; /***/ }), /***/ 18025: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @param {string} token */ CSSOM.parse = function parse(token) { var i = 0; /** "before-selector" or "selector" or "atRule" or "atBlock" or "conditionBlock" or "before-name" or "name" or "before-value" or "value" */ var state = "before-selector"; var index; var buffer = ""; var valueParenthesisDepth = 0; var SIGNIFICANT_WHITESPACE = { "selector": true, "value": true, "value-parenthesis": true, "atRule": true, "importRule-begin": true, "importRule": true, "atBlock": true, "conditionBlock": true, 'documentRule-begin': true }; var styleSheet = new CSSOM.CSSStyleSheet(); // @type CSSStyleSheet|CSSMediaRule|CSSSupportsRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule var currentScope = styleSheet; // @type CSSMediaRule|CSSSupportsRule|CSSKeyframesRule|CSSDocumentRule var parentRule; var ancestorRules = []; var hasAncestors = false; var prevScope; var name, priority="", styleRule, mediaRule, supportsRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule; var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g; var parseError = function(message) { var lines = token.substring(0, i).split('\n'); var lineCount = lines.length; var charCount = lines.pop().length + 1; var error = new Error(message + ' (line ' + lineCount + ', char ' + charCount + ')'); error.line = lineCount; /* jshint sub : true */ error['char'] = charCount; error.styleSheet = styleSheet; throw error; }; for (var character; (character = token.charAt(i)); i++) { switch (character) { case " ": case "\t": case "\r": case "\n": case "\f": if (SIGNIFICANT_WHITESPACE[state]) { buffer += character; } break; // String case '"': index = i + 1; do { index = token.indexOf('"', index) + 1; if (!index) { parseError('Unmatched "'); } } while (token[index - 2] === '\\'); buffer += token.slice(i, index); i = index - 1; switch (state) { case 'before-value': state = 'value'; break; case 'importRule-begin': state = 'importRule'; break; } break; case "'": index = i + 1; do { index = token.indexOf("'", index) + 1; if (!index) { parseError("Unmatched '"); } } while (token[index - 2] === '\\'); buffer += token.slice(i, index); i = index - 1; switch (state) { case 'before-value': state = 'value'; break; case 'importRule-begin': state = 'importRule'; break; } break; // Comment case "/": if (token.charAt(i + 1) === "*") { i += 2; index = token.indexOf("*/", i); if (index === -1) { parseError("Missing */"); } else { i = index + 1; } } else { buffer += character; } if (state === "importRule-begin") { buffer += " "; state = "importRule"; } break; // At-rule case "@": if (token.indexOf("@-moz-document", i) === i) { state = "documentRule-begin"; documentRule = new CSSOM.CSSDocumentRule(); documentRule.__starts = i; i += "-moz-document".length; buffer = ""; break; } else if (token.indexOf("@media", i) === i) { state = "atBlock"; mediaRule = new CSSOM.CSSMediaRule(); mediaRule.__starts = i; i += "media".length; buffer = ""; break; } else if (token.indexOf("@supports", i) === i) { state = "conditionBlock"; supportsRule = new CSSOM.CSSSupportsRule(); supportsRule.__starts = i; i += "supports".length; buffer = ""; break; } else if (token.indexOf("@host", i) === i) { state = "hostRule-begin"; i += "host".length; hostRule = new CSSOM.CSSHostRule(); hostRule.__starts = i; buffer = ""; break; } else if (token.indexOf("@import", i) === i) { state = "importRule-begin"; i += "import".length; buffer += "@import"; break; } else if (token.indexOf("@font-face", i) === i) { state = "fontFaceRule-begin"; i += "font-face".length; fontFaceRule = new CSSOM.CSSFontFaceRule(); fontFaceRule.__starts = i; buffer = ""; break; } else { atKeyframesRegExp.lastIndex = i; var matchKeyframes = atKeyframesRegExp.exec(token); if (matchKeyframes && matchKeyframes.index === i) { state = "keyframesRule-begin"; keyframesRule = new CSSOM.CSSKeyframesRule(); keyframesRule.__starts = i; keyframesRule._vendorPrefix = matchKeyframes[1]; // Will come out as undefined if no prefix was found i += matchKeyframes[0].length - 1; buffer = ""; break; } else if (state === "selector") { state = "atRule"; } } buffer += character; break; case "{": if (state === "selector" || state === "atRule") { styleRule.selectorText = buffer.trim(); styleRule.style.__starts = i; buffer = ""; state = "before-name"; } else if (state === "atBlock") { mediaRule.media.mediaText = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); } currentScope = parentRule = mediaRule; mediaRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "conditionBlock") { supportsRule.conditionText = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); } currentScope = parentRule = supportsRule; supportsRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "hostRule-begin") { if (parentRule) { ancestorRules.push(parentRule); } currentScope = parentRule = hostRule; hostRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "fontFaceRule-begin") { if (parentRule) { fontFaceRule.parentRule = parentRule; } fontFaceRule.parentStyleSheet = styleSheet; styleRule = fontFaceRule; buffer = ""; state = "before-name"; } else if (state === "keyframesRule-begin") { keyframesRule.name = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); keyframesRule.parentRule = parentRule; } keyframesRule.parentStyleSheet = styleSheet; currentScope = parentRule = keyframesRule; buffer = ""; state = "keyframeRule-begin"; } else if (state === "keyframeRule-begin") { styleRule = new CSSOM.CSSKeyframeRule(); styleRule.keyText = buffer.trim(); styleRule.__starts = i; buffer = ""; state = "before-name"; } else if (state === "documentRule-begin") { // FIXME: what if this '{' is in the url text of the match function? documentRule.matcher.matcherText = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); documentRule.parentRule = parentRule; } currentScope = parentRule = documentRule; documentRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } break; case ":": if (state === "name") { name = buffer.trim(); buffer = ""; state = "before-value"; } else { buffer += character; } break; case "(": if (state === 'value') { // ie css expression mode if (buffer.trim() === 'expression') { var info = (new CSSOM.CSSValueExpression(token, i)).parse(); if (info.error) { parseError(info.error); } else { buffer += info.expression; i = info.idx; } } else { state = 'value-parenthesis'; //always ensure this is reset to 1 on transition //from value to value-parenthesis valueParenthesisDepth = 1; buffer += character; } } else if (state === 'value-parenthesis') { valueParenthesisDepth++; buffer += character; } else { buffer += character; } break; case ")": if (state === 'value-parenthesis') { valueParenthesisDepth--; if (valueParenthesisDepth === 0) state = 'value'; } buffer += character; break; case "!": if (state === "value" && token.indexOf("!important", i) === i) { priority = "important"; i += "important".length; } else { buffer += character; } break; case ";": switch (state) { case "value": styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; buffer = ""; state = "before-name"; break; case "atRule": buffer = ""; state = "before-selector"; break; case "importRule": importRule = new CSSOM.CSSImportRule(); importRule.parentStyleSheet = importRule.styleSheet.parentStyleSheet = styleSheet; importRule.cssText = buffer + character; styleSheet.cssRules.push(importRule); buffer = ""; state = "before-selector"; break; default: buffer += character; break; } break; case "}": switch (state) { case "value": styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; /* falls through */ case "before-name": case "name": styleRule.__ends = i + 1; if (parentRule) { styleRule.parentRule = parentRule; } styleRule.parentStyleSheet = styleSheet; currentScope.cssRules.push(styleRule); buffer = ""; if (currentScope.constructor === CSSOM.CSSKeyframesRule) { state = "keyframeRule-begin"; } else { state = "before-selector"; } break; case "keyframeRule-begin": case "before-selector": case "selector": // End of media/supports/document rule. if (!parentRule) { parseError("Unexpected }"); } // Handle rules nested in @media or @supports hasAncestors = ancestorRules.length > 0; while (ancestorRules.length > 0) { parentRule = ancestorRules.pop(); if ( parentRule.constructor.name === "CSSMediaRule" || parentRule.constructor.name === "CSSSupportsRule" ) { prevScope = currentScope; currentScope = parentRule; currentScope.cssRules.push(prevScope); break; } if (ancestorRules.length === 0) { hasAncestors = false; } } if (!hasAncestors) { currentScope.__ends = i + 1; styleSheet.cssRules.push(currentScope); currentScope = styleSheet; parentRule = null; } buffer = ""; state = "before-selector"; break; } break; default: switch (state) { case "before-selector": state = "selector"; styleRule = new CSSOM.CSSStyleRule(); styleRule.__starts = i; break; case "before-name": state = "name"; break; case "before-value": state = "value"; break; case "importRule-begin": state = "importRule"; break; } buffer += character; break; } } return styleSheet; }; //.CommonJS exports.parse = CSSOM.parse; // The following modules cannot be included sooner due to the mutual dependency with parse.js CSSOM.CSSStyleSheet = __webpack_require__(62486).CSSStyleSheet; CSSOM.CSSStyleRule = __webpack_require__(4608).CSSStyleRule; CSSOM.CSSImportRule = __webpack_require__(49776).CSSImportRule; CSSOM.CSSMediaRule = __webpack_require__(96791).CSSMediaRule; CSSOM.CSSSupportsRule = __webpack_require__(27967).CSSSupportsRule; CSSOM.CSSFontFaceRule = __webpack_require__(33046).CSSFontFaceRule; CSSOM.CSSHostRule = __webpack_require__(57986).CSSHostRule; CSSOM.CSSStyleDeclaration = __webpack_require__(45131).CSSStyleDeclaration; CSSOM.CSSKeyframeRule = __webpack_require__(97254).CSSKeyframeRule; CSSOM.CSSKeyframesRule = __webpack_require__(16005).CSSKeyframesRule; CSSOM.CSSValueExpression = __webpack_require__(75996).CSSValueExpression; CSSOM.CSSDocumentRule = __webpack_require__(27455).CSSDocumentRule; ///CommonJS /***/ }), /***/ 15674: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /********************************************************************* * This is a fork from the CSS Style Declaration part of * https://github.com/NV/CSSOM ********************************************************************/ var CSSOM = __webpack_require__(8331); var allProperties = __webpack_require__(36685); var allExtraProperties = __webpack_require__(92461); var implementedProperties = __webpack_require__(93398); var { dashedToCamelCase } = __webpack_require__(37032); var getBasicPropertyDescriptor = __webpack_require__(95721); /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration */ var CSSStyleDeclaration = function CSSStyleDeclaration(onChangeCallback) { this._values = {}; this._importants = {}; this._length = 0; this._onChange = onChangeCallback || function() { return; }; }; CSSStyleDeclaration.prototype = { constructor: CSSStyleDeclaration, /** * * @param {string} name * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue * @return {string} the value of the property if it has been explicitly set for this declaration block. * Returns the empty string if the property has not been set. */ getPropertyValue: function(name) { if (!this._values.hasOwnProperty(name)) { return ''; } return this._values[name].toString(); }, /** * * @param {string} name * @param {string} value * @param {string} [priority=null] "important" or null * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty */ setProperty: function(name, value, priority) { if (value === undefined) { return; } if (value === null || value === '') { this.removeProperty(name); return; } var isCustomProperty = name.indexOf('--') === 0; if (isCustomProperty) { this._setProperty(name, value, priority); return; } var lowercaseName = name.toLowerCase(); if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) { return; } this[lowercaseName] = value; this._importants[lowercaseName] = priority; }, _setProperty: function(name, value, priority) { if (value === undefined) { return; } if (value === null || value === '') { this.removeProperty(name); return; } if (this._values[name]) { // Property already exist. Overwrite it. var index = Array.prototype.indexOf.call(this, name); if (index < 0) { this[this._length] = name; this._length++; } } else { // New property. this[this._length] = name; this._length++; } this._values[name] = value; this._importants[name] = priority; this._onChange(this.cssText); }, /** * * @param {string} name * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty * @return {string} the value of the property if it has been explicitly set for this declaration block. * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. */ removeProperty: function(name) { if (!this._values.hasOwnProperty(name)) { return ''; } var prevValue = this._values[name]; delete this._values[name]; delete this._importants[name]; var index = Array.prototype.indexOf.call(this, name); if (index < 0) { return prevValue; } // That's what WebKit and Opera do Array.prototype.splice.call(this, index, 1); // That's what Firefox does //this[index] = "" this._onChange(this.cssText); return prevValue; }, /** * * @param {String} name */ getPropertyPriority: function(name) { return this._importants[name] || ''; }, getPropertyCSSValue: function() { //FIXME return; }, /** * element.style.overflow = "auto" * element.style.getPropertyShorthand("overflow-x") * -> "overflow" */ getPropertyShorthand: function() { //FIXME return; }, isPropertyImplicit: function() { //FIXME return; }, /** * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item */ item: function(index) { index = parseInt(index, 10); if (index < 0 || index >= this._length) { return ''; } return this[index]; }, }; Object.defineProperties(CSSStyleDeclaration.prototype, { cssText: { get: function() { var properties = []; var i; var name; var value; var priority; for (i = 0; i < this._length; i++) { name = this[i]; value = this.getPropertyValue(name); priority = this.getPropertyPriority(name); if (priority !== '') { priority = ' !' + priority; } properties.push([name, ': ', value, priority, ';'].join('')); } return properties.join(' '); }, set: function(value) { var i; this._values = {}; Array.prototype.splice.call(this, 0, this._length); this._importants = {}; var dummyRule; try { dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style; } catch (err) { // malformed css, just return return; } var rule_length = dummyRule.length; var name; for (i = 0; i < rule_length; ++i) { name = dummyRule[i]; this.setProperty( dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name) ); } this._onChange(this.cssText); }, enumerable: true, configurable: true, }, parentRule: { get: function() { return null; }, enumerable: true, configurable: true, }, length: { get: function() { return this._length; }, /** * This deletes indices if the new length is less then the current * length. If the new length is more, it does nothing, the new indices * will be undefined until set. **/ set: function(value) { var i; for (i = value; i < this._length; i++) { delete this[i]; } this._length = value; }, enumerable: true, configurable: true, }, }); __webpack_require__(13480)(CSSStyleDeclaration.prototype); allProperties.forEach(function(property) { if (!implementedProperties.has(property)) { var declaration = getBasicPropertyDescriptor(property); Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration); Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration); } }); allExtraProperties.forEach(function(property) { if (!implementedProperties.has(property)) { var declaration = getBasicPropertyDescriptor(property); Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration); Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration); } }); exports.CSSStyleDeclaration = CSSStyleDeclaration; /***/ }), /***/ 92461: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * This file contains all implemented properties that are not a part of any * current specifications or drafts, but are handled by browsers nevertheless. */ var allWebkitProperties = __webpack_require__(39483); module.exports = new Set( [ 'background-position-x', 'background-position-y', 'background-repeat-x', 'background-repeat-y', 'color-interpolation', 'color-profile', 'color-rendering', 'css-float', 'enable-background', 'fill', 'fill-opacity', 'fill-rule', 'glyph-orientation-horizontal', 'image-rendering', 'kerning', 'marker', 'marker-end', 'marker-mid', 'marker-offset', 'marker-start', 'marks', 'pointer-events', 'shape-rendering', 'size', 'src', 'stop-color', 'stop-opacity', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-line-through', 'text-line-through-color', 'text-line-through-mode', 'text-line-through-style', 'text-line-through-width', 'text-overline', 'text-overline-color', 'text-overline-mode', 'text-overline-style', 'text-overline-width', 'text-rendering', 'text-underline', 'text-underline-color', 'text-underline-mode', 'text-underline-style', 'text-underline-width', 'unicode-range', 'vector-effect', ].concat(allWebkitProperties) ); /***/ }), /***/ 36685: /***/ ((module) => { "use strict"; // autogenerated - 4/29/2020 /* * * https://www.w3.org/Style/CSS/all-properties.en.html */ module.exports = new Set([ 'align-content', 'align-items', 'align-self', 'alignment-baseline', 'all', 'animation', 'animation-delay', 'animation-direction', 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', 'animation-name', 'animation-play-state', 'animation-timing-function', 'appearance', 'azimuth', 'background', 'background-attachment', 'background-blend-mode', 'background-clip', 'background-color', 'background-image', 'background-origin', 'background-position', 'background-repeat', 'background-size', 'baseline-shift', 'block-overflow', 'block-size', 'bookmark-label', 'bookmark-level', 'bookmark-state', 'border', 'border-block', 'border-block-color', 'border-block-end', 'border-block-end-color', 'border-block-end-style', 'border-block-end-width', 'border-block-start', 'border-block-start-color', 'border-block-start-style', 'border-block-start-width', 'border-block-style', 'border-block-width', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-style', 'border-bottom-width', 'border-boundary', 'border-collapse', 'border-color', 'border-end-end-radius', 'border-end-start-radius', 'border-image', 'border-image-outset', 'border-image-repeat', 'border-image-slice', 'border-image-source', 'border-image-width', 'border-inline', 'border-inline-color', 'border-inline-end', 'border-inline-end-color', 'border-inline-end-style', 'border-inline-end-width', 'border-inline-start', 'border-inline-start-color', 'border-inline-start-style', 'border-inline-start-width', 'border-inline-style', 'border-inline-width', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-spacing', 'border-start-end-radius', 'border-start-start-radius', 'border-style', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', 'border-top-width', 'border-width', 'bottom', 'box-decoration-break', 'box-shadow', 'box-sizing', 'box-snap', 'break-after', 'break-before', 'break-inside', 'caption-side', 'caret', 'caret-color', 'caret-shape', 'chains', 'clear', 'clip', 'clip-path', 'clip-rule', 'color', 'color-adjust', 'color-interpolation-filters', 'color-scheme', 'column-count', 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', 'columns', 'contain', 'content', 'continue', 'counter-increment', 'counter-reset', 'counter-set', 'cue', 'cue-after', 'cue-before', 'cursor', 'direction', 'display', 'dominant-baseline', 'elevation', 'empty-cells', 'filter', 'flex', 'flex-basis', 'flex-direction', 'flex-flow', 'flex-grow', 'flex-shrink', 'flex-wrap', 'float', 'flood-color', 'flood-opacity', 'flow', 'flow-from', 'flow-into', 'font', 'font-family', 'font-feature-settings', 'font-kerning', 'font-language-override', 'font-optical-sizing', 'font-palette', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-synthesis', 'font-synthesis-small-caps', 'font-synthesis-style', 'font-synthesis-weight', 'font-variant', 'font-variant-alternates', 'font-variant-caps', 'font-variant-east-asian', 'font-variant-emoji', 'font-variant-ligatures', 'font-variant-numeric', 'font-variant-position', 'font-variation-settings', 'font-weight', 'footnote-display', 'footnote-policy', 'forced-color-adjust', 'gap', 'glyph-orientation-vertical', 'grid', 'grid-area', 'grid-auto-columns', 'grid-auto-flow', 'grid-auto-rows', 'grid-column', 'grid-column-end', 'grid-column-start', 'grid-row', 'grid-row-end', 'grid-row-start', 'grid-template', 'grid-template-areas', 'grid-template-columns', 'grid-template-rows', 'hanging-punctuation', 'height', 'hyphenate-character', 'hyphenate-limit-chars', 'hyphenate-limit-last', 'hyphenate-limit-lines', 'hyphenate-limit-zone', 'hyphens', 'image-orientation', 'image-rendering', 'image-resolution', 'initial-letters', 'initial-letters-align', 'initial-letters-wrap', 'inline-size', 'inline-sizing', 'inset', 'inset-block', 'inset-block-end', 'inset-block-start', 'inset-inline', 'inset-inline-end', 'inset-inline-start', 'isolation', 'justify-content', 'justify-items', 'justify-self', 'left', 'letter-spacing', 'lighting-color', 'line-break', 'line-clamp', 'line-grid', 'line-height', 'line-padding', 'line-snap', 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 'margin', 'margin-block', 'margin-block-end', 'margin-block-start', 'margin-bottom', 'margin-inline', 'margin-inline-end', 'margin-inline-start', 'margin-left', 'margin-right', 'margin-top', 'marker-side', 'mask', 'mask-border', 'mask-border-mode', 'mask-border-outset', 'mask-border-repeat', 'mask-border-slice', 'mask-border-source', 'mask-border-width', 'mask-clip', 'mask-composite', 'mask-image', 'mask-mode', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', 'mask-type', 'max-block-size', 'max-height', 'max-inline-size', 'max-lines', 'max-width', 'min-block-size', 'min-height', 'min-inline-size', 'min-width', 'mix-blend-mode', 'nav-down', 'nav-left', 'nav-right', 'nav-up', 'object-fit', 'object-position', 'offset', 'offset-after', 'offset-anchor', 'offset-before', 'offset-distance', 'offset-end', 'offset-path', 'offset-position', 'offset-rotate', 'offset-start', 'opacity', 'order', 'orphans', 'outline', 'outline-color', 'outline-offset', 'outline-style', 'outline-width', 'overflow', 'overflow-block', 'overflow-inline', 'overflow-wrap', 'overflow-x', 'overflow-y', 'padding', 'padding-block', 'padding-block-end', 'padding-block-start', 'padding-bottom', 'padding-inline', 'padding-inline-end', 'padding-inline-start', 'padding-left', 'padding-right', 'padding-top', 'page', 'page-break-after', 'page-break-before', 'page-break-inside', 'pause', 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'place-content', 'place-items', 'place-self', 'play-during', 'position', 'quotes', 'region-fragment', 'resize', 'rest', 'rest-after', 'rest-before', 'richness', 'right', 'row-gap', 'ruby-align', 'ruby-merge', 'ruby-position', 'running', 'scroll-behavior', 'scroll-margin', 'scroll-margin-block', 'scroll-margin-block-end', 'scroll-margin-block-start', 'scroll-margin-bottom', 'scroll-margin-inline', 'scroll-margin-inline-end', 'scroll-margin-inline-start', 'scroll-margin-left', 'scroll-margin-right', 'scroll-margin-top', 'scroll-padding', 'scroll-padding-block', 'scroll-padding-block-end', 'scroll-padding-block-start', 'scroll-padding-bottom', 'scroll-padding-inline', 'scroll-padding-inline-end', 'scroll-padding-inline-start', 'scroll-padding-left', 'scroll-padding-right', 'scroll-padding-top', 'scroll-snap-align', 'scroll-snap-stop', 'scroll-snap-type', 'shape-image-threshold', 'shape-inside', 'shape-margin', 'shape-outside', 'spatial-navigation-action', 'spatial-navigation-contain', 'spatial-navigation-function', 'speak', 'speak-as', 'speak-header', 'speak-numeral', 'speak-punctuation', 'speech-rate', 'stress', 'string-set', 'tab-size', 'table-layout', 'text-align', 'text-align-all', 'text-align-last', 'text-combine-upright', 'text-decoration', 'text-decoration-color', 'text-decoration-line', 'text-decoration-style', 'text-emphasis', 'text-emphasis-color', 'text-emphasis-position', 'text-emphasis-style', 'text-group-align', 'text-indent', 'text-justify', 'text-orientation', 'text-overflow', 'text-shadow', 'text-space-collapse', 'text-space-trim', 'text-spacing', 'text-transform', 'text-underline-position', 'text-wrap', 'top', 'transform', 'transform-box', 'transform-origin', 'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function', 'unicode-bidi', 'user-select', 'vertical-align', 'visibility', 'voice-balance', 'voice-duration', 'voice-family', 'voice-pitch', 'voice-range', 'voice-rate', 'voice-stress', 'voice-volume', 'volume', 'white-space', 'widows', 'width', 'will-change', 'word-boundary-detection', 'word-boundary-expansion', 'word-break', 'word-spacing', 'word-wrap', 'wrap-after', 'wrap-before', 'wrap-flow', 'wrap-inside', 'wrap-through', 'writing-mode', 'z-index', ]); /***/ }), /***/ 39483: /***/ ((module) => { "use strict"; /** * This file contains all implemented properties that are not a part of any * current specifications or drafts, but are handled by browsers nevertheless. */ module.exports = [ 'animation', 'animation-delay', 'animation-direction', 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', 'animation-name', 'animation-play-state', 'animation-timing-function', 'appearance', 'aspect-ratio', 'backface-visibility', 'background-clip', 'background-composite', 'background-origin', 'background-size', 'border-after', 'border-after-color', 'border-after-style', 'border-after-width', 'border-before', 'border-before-color', 'border-before-style', 'border-before-width', 'border-end', 'border-end-color', 'border-end-style', 'border-end-width', 'border-fit', 'border-horizontal-spacing', 'border-image', 'border-radius', 'border-start', 'border-start-color', 'border-start-style', 'border-start-width', 'border-vertical-spacing', 'box-align', 'box-direction', 'box-flex', 'box-flex-group', 'box-lines', 'box-ordinal-group', 'box-orient', 'box-pack', 'box-reflect', 'box-shadow', 'color-correction', 'column-axis', 'column-break-after', 'column-break-before', 'column-break-inside', 'column-count', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'columns', 'column-span', 'column-width', 'filter', 'flex-align', 'flex-direction', 'flex-flow', 'flex-item-align', 'flex-line-pack', 'flex-order', 'flex-pack', 'flex-wrap', 'flow-from', 'flow-into', 'font-feature-settings', 'font-kerning', 'font-size-delta', 'font-smoothing', 'font-variant-ligatures', 'highlight', 'hyphenate-character', 'hyphenate-limit-after', 'hyphenate-limit-before', 'hyphenate-limit-lines', 'hyphens', 'line-align', 'line-box-contain', 'line-break', 'line-clamp', 'line-grid', 'line-snap', 'locale', 'logical-height', 'logical-width', 'margin-after', 'margin-after-collapse', 'margin-before', 'margin-before-collapse', 'margin-bottom-collapse', 'margin-collapse', 'margin-end', 'margin-start', 'margin-top-collapse', 'marquee', 'marquee-direction', 'marquee-increment', 'marquee-repetition', 'marquee-speed', 'marquee-style', 'mask', 'mask-attachment', 'mask-box-image', 'mask-box-image-outset', 'mask-box-image-repeat', 'mask-box-image-slice', 'mask-box-image-source', 'mask-box-image-width', 'mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-position', 'mask-position-x', 'mask-position-y', 'mask-repeat', 'mask-repeat-x', 'mask-repeat-y', 'mask-size', 'match-nearest-mail-blockquote-color', 'max-logical-height', 'max-logical-width', 'min-logical-height', 'min-logical-width', 'nbsp-mode', 'overflow-scrolling', 'padding-after', 'padding-before', 'padding-end', 'padding-start', 'perspective', 'perspective-origin', 'perspective-origin-x', 'perspective-origin-y', 'print-color-adjust', 'region-break-after', 'region-break-before', 'region-break-inside', 'region-overflow', 'rtl-ordering', 'svg-shadow', 'tap-highlight-color', 'text-combine', 'text-decorations-in-effect', 'text-emphasis', 'text-emphasis-color', 'text-emphasis-position', 'text-emphasis-style', 'text-fill-color', 'text-orientation', 'text-security', 'text-size-adjust', 'text-stroke', 'text-stroke-color', 'text-stroke-width', 'transform', 'transform-origin', 'transform-origin-x', 'transform-origin-y', 'transform-origin-z', 'transform-style', 'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function', 'user-drag', 'user-modify', 'user-select', 'wrap', 'wrap-flow', 'wrap-margin', 'wrap-padding', 'wrap-shape-inside', 'wrap-shape-outside', 'wrap-through', 'writing-mode', 'zoom', ].map(prop => 'webkit-' + prop); /***/ }), /***/ 39139: /***/ ((module) => { "use strict"; module.exports.POSITION_AT_SHORTHAND = { first: 0, second: 1, }; /***/ }), /***/ 93398: /***/ ((module) => { "use strict"; // autogenerated - 4/29/2020 /* * * https://www.w3.org/Style/CSS/all-properties.en.html */ var implementedProperties = new Set(); implementedProperties.add("azimuth"); implementedProperties.add("background"); implementedProperties.add("background-attachment"); implementedProperties.add("background-color"); implementedProperties.add("background-image"); implementedProperties.add("background-position"); implementedProperties.add("background-repeat"); implementedProperties.add("border"); implementedProperties.add("border-bottom"); implementedProperties.add("border-bottom-color"); implementedProperties.add("border-bottom-style"); implementedProperties.add("border-bottom-width"); implementedProperties.add("border-collapse"); implementedProperties.add("border-color"); implementedProperties.add("border-left"); implementedProperties.add("border-left-color"); implementedProperties.add("border-left-style"); implementedProperties.add("border-left-width"); implementedProperties.add("border-right"); implementedProperties.add("border-right-color"); implementedProperties.add("border-right-style"); implementedProperties.add("border-right-width"); implementedProperties.add("border-spacing"); implementedProperties.add("border-style"); implementedProperties.add("border-top"); implementedProperties.add("border-top-color"); implementedProperties.add("border-top-style"); implementedProperties.add("border-top-width"); implementedProperties.add("border-width"); implementedProperties.add("bottom"); implementedProperties.add("clear"); implementedProperties.add("clip"); implementedProperties.add("color"); implementedProperties.add("css-float"); implementedProperties.add("flex"); implementedProperties.add("flex-basis"); implementedProperties.add("flex-grow"); implementedProperties.add("flex-shrink"); implementedProperties.add("float"); implementedProperties.add("flood-color"); implementedProperties.add("font"); implementedProperties.add("font-family"); implementedProperties.add("font-size"); implementedProperties.add("font-style"); implementedProperties.add("font-variant"); implementedProperties.add("font-weight"); implementedProperties.add("height"); implementedProperties.add("left"); implementedProperties.add("lighting-color"); implementedProperties.add("line-height"); implementedProperties.add("margin"); implementedProperties.add("margin-bottom"); implementedProperties.add("margin-left"); implementedProperties.add("margin-right"); implementedProperties.add("margin-top"); implementedProperties.add("opacity"); implementedProperties.add("outline-color"); implementedProperties.add("padding"); implementedProperties.add("padding-bottom"); implementedProperties.add("padding-left"); implementedProperties.add("padding-right"); implementedProperties.add("padding-top"); implementedProperties.add("right"); implementedProperties.add("stop-color"); implementedProperties.add("text-line-through-color"); implementedProperties.add("text-overline-color"); implementedProperties.add("text-underline-color"); implementedProperties.add("top"); implementedProperties.add("webkit-border-after-color"); implementedProperties.add("webkit-border-before-color"); implementedProperties.add("webkit-border-end-color"); implementedProperties.add("webkit-border-start-color"); implementedProperties.add("webkit-column-rule-color"); implementedProperties.add("webkit-match-nearest-mail-blockquote-color"); implementedProperties.add("webkit-tap-highlight-color"); implementedProperties.add("webkit-text-emphasis-color"); implementedProperties.add("webkit-text-fill-color"); implementedProperties.add("webkit-text-stroke-color"); implementedProperties.add("width"); module.exports = implementedProperties; /***/ }), /***/ 37032: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /********************************************************************* * These are commonly used parsers for CSS Values they take a string * * to parse and return a string after it's been converted, if needed * ********************************************************************/ const namedColors = __webpack_require__(14947); const { hslToRgb } = __webpack_require__(90515); exports.TYPES = { INTEGER: 1, NUMBER: 2, LENGTH: 3, PERCENT: 4, URL: 5, COLOR: 6, STRING: 7, ANGLE: 8, KEYWORD: 9, NULL_OR_EMPTY_STR: 10, CALC: 11, }; // rough regular expressions var integerRegEx = /^[-+]?[0-9]+$/; var numberRegEx = /^[-+]?[0-9]*\.?[0-9]+$/; var lengthRegEx = /^(0|[-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw|ch))$/; var percentRegEx = /^[-+]?[0-9]*\.?[0-9]+%$/; var urlRegEx = /^url\(\s*([^)]*)\s*\)$/; var stringRegEx = /^("[^"]*"|'[^']*')$/; var colorRegEx1 = /^#([0-9a-fA-F]{3,4}){1,2}$/; var colorRegEx2 = /^rgb\(([^)]*)\)$/; var colorRegEx3 = /^rgba\(([^)]*)\)$/; var calcRegEx = /^calc\(([^)]*)\)$/; var colorRegEx4 = /^hsla?\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*(,\s*(-?\d+|-?\d*.\d+)\s*)?\)/; var angleRegEx = /^([-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/; // This will return one of the above types based on the passed in string exports.valueType = function valueType(val) { if (val === '' || val === null) { return exports.TYPES.NULL_OR_EMPTY_STR; } if (typeof val === 'number') { val = val.toString(); } if (typeof val !== 'string') { return undefined; } if (integerRegEx.test(val)) { return exports.TYPES.INTEGER; } if (numberRegEx.test(val)) { return exports.TYPES.NUMBER; } if (lengthRegEx.test(val)) { return exports.TYPES.LENGTH; } if (percentRegEx.test(val)) { return exports.TYPES.PERCENT; } if (urlRegEx.test(val)) { return exports.TYPES.URL; } if (calcRegEx.test(val)) { return exports.TYPES.CALC; } if (stringRegEx.test(val)) { return exports.TYPES.STRING; } if (angleRegEx.test(val)) { return exports.TYPES.ANGLE; } if (colorRegEx1.test(val)) { return exports.TYPES.COLOR; } var res = colorRegEx2.exec(val); var parts; if (res !== null) { parts = res[1].split(/\s*,\s*/); if (parts.length !== 3) { return undefined; } if ( parts.every(percentRegEx.test.bind(percentRegEx)) || parts.every(integerRegEx.test.bind(integerRegEx)) ) { return exports.TYPES.COLOR; } return undefined; } res = colorRegEx3.exec(val); if (res !== null) { parts = res[1].split(/\s*,\s*/); if (parts.length !== 4) { return undefined; } if ( parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx)) || parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx)) ) { if (numberRegEx.test(parts[3])) { return exports.TYPES.COLOR; } } return undefined; } if (colorRegEx4.test(val)) { return exports.TYPES.COLOR; } // could still be a color, one of the standard keyword colors val = val.toLowerCase(); if (namedColors.includes(val)) { return exports.TYPES.COLOR; } switch (val) { // the following are deprecated in CSS3 case 'activeborder': case 'activecaption': case 'appworkspace': case 'background': case 'buttonface': case 'buttonhighlight': case 'buttonshadow': case 'buttontext': case 'captiontext': case 'graytext': case 'highlight': case 'highlighttext': case 'inactiveborder': case 'inactivecaption': case 'inactivecaptiontext': case 'infobackground': case 'infotext': case 'menu': case 'menutext': case 'scrollbar': case 'threeddarkshadow': case 'threedface': case 'threedhighlight': case 'threedlightshadow': case 'threedshadow': case 'window': case 'windowframe': case 'windowtext': return exports.TYPES.COLOR; default: return exports.TYPES.KEYWORD; } }; exports.parseInteger = function parseInteger(val) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.INTEGER) { return undefined; } return String(parseInt(val, 10)); }; exports.parseNumber = function parseNumber(val) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.NUMBER && type !== exports.TYPES.INTEGER) { return undefined; } return String(parseFloat(val)); }; exports.parseLength = function parseLength(val) { if (val === 0 || val === '0') { return '0px'; } var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.LENGTH) { return undefined; } return val; }; exports.parsePercent = function parsePercent(val) { if (val === 0 || val === '0') { return '0%'; } var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.PERCENT) { return undefined; } return val; }; // either a length or a percent exports.parseMeasurement = function parseMeasurement(val) { var type = exports.valueType(val); if (type === exports.TYPES.CALC) { return val; } var length = exports.parseLength(val); if (length !== undefined) { return length; } return exports.parsePercent(val); }; exports.parseUrl = function parseUrl(val) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } var res = urlRegEx.exec(val); // does it match the regex? if (!res) { return undefined; } var str = res[1]; // if it starts with single or double quotes, does it end with the same? if ((str[0] === '"' || str[0] === "'") && str[0] !== str[str.length - 1]) { return undefined; } if (str[0] === '"' || str[0] === "'") { str = str.substr(1, str.length - 2); } var i; for (i = 0; i < str.length; i++) { switch (str[i]) { case '(': case ')': case ' ': case '\t': case '\n': case "'": case '"': return undefined; case '\\': i++; break; } } return 'url(' + str + ')'; }; exports.parseString = function parseString(val) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.STRING) { return undefined; } var i; for (i = 1; i < val.length - 1; i++) { switch (val[i]) { case val[0]: return undefined; case '\\': i++; while (i < val.length - 1 && /[0-9A-Fa-f]/.test(val[i])) { i++; } break; } } if (i >= val.length) { return undefined; } return val; }; exports.parseColor = function parseColor(val) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } var red, green, blue, hue, saturation, lightness, alpha = 1; var parts; var res = colorRegEx1.exec(val); // is it #aaa, #ababab, #aaaa, #abababaa if (res) { var defaultHex = val.substr(1); var hex = val.substr(1); if (hex.length === 3 || hex.length === 4) { hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; if (defaultHex.length === 4) { hex = hex + defaultHex[3] + defaultHex[3]; } } red = parseInt(hex.substr(0, 2), 16); green = parseInt(hex.substr(2, 2), 16); blue = parseInt(hex.substr(4, 2), 16); if (hex.length === 8) { var hexAlpha = hex.substr(6, 2); var hexAlphaToRgbaAlpha = Number((parseInt(hexAlpha, 16) / 255).toFixed(3)); return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + hexAlphaToRgbaAlpha + ')'; } return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; } res = colorRegEx2.exec(val); if (res) { parts = res[1].split(/\s*,\s*/); if (parts.length !== 3) { return undefined; } if (parts.every(percentRegEx.test.bind(percentRegEx))) { red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100); green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100); blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100); } else if (parts.every(integerRegEx.test.bind(integerRegEx))) { red = parseInt(parts[0], 10); green = parseInt(parts[1], 10); blue = parseInt(parts[2], 10); } else { return undefined; } red = Math.min(255, Math.max(0, red)); green = Math.min(255, Math.max(0, green)); blue = Math.min(255, Math.max(0, blue)); return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; } res = colorRegEx3.exec(val); if (res) { parts = res[1].split(/\s*,\s*/); if (parts.length !== 4) { return undefined; } if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx))) { red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100); green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100); blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100); alpha = parseFloat(parts[3]); } else if (parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))) { red = parseInt(parts[0], 10); green = parseInt(parts[1], 10); blue = parseInt(parts[2], 10); alpha = parseFloat(parts[3]); } else { return undefined; } if (isNaN(alpha)) { alpha = 1; } red = Math.min(255, Math.max(0, red)); green = Math.min(255, Math.max(0, green)); blue = Math.min(255, Math.max(0, blue)); alpha = Math.min(1, Math.max(0, alpha)); if (alpha === 1) { return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; } return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + alpha + ')'; } res = colorRegEx4.exec(val); if (res) { const [, _hue, _saturation, _lightness, _alphaString = ''] = res; const _alpha = parseFloat(_alphaString.replace(',', '').trim()); if (!_hue || !_saturation || !_lightness) { return undefined; } hue = parseFloat(_hue); saturation = parseInt(_saturation, 10); lightness = parseInt(_lightness, 10); if (_alpha && numberRegEx.test(_alpha)) { alpha = parseFloat(_alpha); } const [r, g, b] = hslToRgb(hue, saturation / 100, lightness / 100); if (!_alphaString || alpha === 1) { return 'rgb(' + r + ', ' + g + ', ' + b + ')'; } return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'; } if (type === exports.TYPES.COLOR) { return val; } return undefined; }; exports.parseAngle = function parseAngle(val) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.ANGLE) { return undefined; } var res = angleRegEx.exec(val); var flt = parseFloat(res[1]); if (res[2] === 'rad') { flt *= 180 / Math.PI; } else if (res[2] === 'grad') { flt *= 360 / 400; } while (flt < 0) { flt += 360; } while (flt > 360) { flt -= 360; } return flt + 'deg'; }; exports.parseKeyword = function parseKeyword(val, valid_keywords) { var type = exports.valueType(val); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; } if (type !== exports.TYPES.KEYWORD) { return undefined; } val = val.toString().toLowerCase(); var i; for (i = 0; i < valid_keywords.length; i++) { if (valid_keywords[i].toLowerCase() === val) { return valid_keywords[i]; } } return undefined; }; // utility to translate from border-width to borderWidth var dashedToCamelCase = function(dashed) { var i; var camel = ''; var nextCap = false; for (i = 0; i < dashed.length; i++) { if (dashed[i] !== '-') { camel += nextCap ? dashed[i].toUpperCase() : dashed[i]; nextCap = false; } else { nextCap = true; } } return camel; }; exports.dashedToCamelCase = dashedToCamelCase; var is_space = /\s/; var opening_deliminators = ['"', "'", '(']; var closing_deliminators = ['"', "'", ')']; // this splits on whitespace, but keeps quoted and parened parts together var getParts = function(str) { var deliminator_stack = []; var length = str.length; var i; var parts = []; var current_part = ''; var opening_index; var closing_index; for (i = 0; i < length; i++) { opening_index = opening_deliminators.indexOf(str[i]); closing_index = closing_deliminators.indexOf(str[i]); if (is_space.test(str[i])) { if (deliminator_stack.length === 0) { if (current_part !== '') { parts.push(current_part); } current_part = ''; } else { current_part += str[i]; } } else { if (str[i] === '\\') { i++; current_part += str[i]; } else { current_part += str[i]; if ( closing_index !== -1 && closing_index === deliminator_stack[deliminator_stack.length - 1] ) { deliminator_stack.pop(); } else if (opening_index !== -1) { deliminator_stack.push(opening_index); } } } } if (current_part !== '') { parts.push(current_part); } return parts; }; /* * this either returns undefined meaning that it isn't valid * or returns an object where the keys are dashed short * hand properties and the values are the values to set * on them */ exports.shorthandParser = function parse(v, shorthand_for) { var obj = {}; var type = exports.valueType(v); if (type === exports.TYPES.NULL_OR_EMPTY_STR) { Object.keys(shorthand_for).forEach(function(property) { obj[property] = ''; }); return obj; } if (typeof v === 'number') { v = v.toString(); } if (typeof v !== 'string') { return undefined; } if (v.toLowerCase() === 'inherit') { return {}; } var parts = getParts(v); var valid = true; parts.forEach(function(part, i) { var part_valid = false; Object.keys(shorthand_for).forEach(function(property) { if (shorthand_for[property].isValid(part, i)) { part_valid = true; obj[property] = part; } }); valid = valid && part_valid; }); if (!valid) { return undefined; } return obj; }; exports.shorthandSetter = function(property, shorthand_for) { return function(v) { var obj = exports.shorthandParser(v, shorthand_for); if (obj === undefined) { return; } //console.log('shorthandSetter for:', property, 'obj:', obj); Object.keys(obj).forEach(function(subprop) { // in case subprop is an implicit property, this will clear // *its* subpropertiesX var camel = dashedToCamelCase(subprop); this[camel] = obj[subprop]; // in case it gets translated into something else (0 -> 0px) obj[subprop] = this[camel]; this.removeProperty(subprop); // don't add in empty properties if (obj[subprop] !== '') { this._values[subprop] = obj[subprop]; } }, this); Object.keys(shorthand_for).forEach(function(subprop) { if (!obj.hasOwnProperty(subprop)) { this.removeProperty(subprop); delete this._values[subprop]; } }, this); // in case the value is something like 'none' that removes all values, // check that the generated one is not empty, first remove the property // if it already exists, then call the shorthandGetter, if it's an empty // string, don't set the property this.removeProperty(property); var calculated = exports.shorthandGetter(property, shorthand_for).call(this); if (calculated !== '') { this._setProperty(property, calculated); } }; }; exports.shorthandGetter = function(property, shorthand_for) { return function() { if (this._values[property] !== undefined) { return this.getPropertyValue(property); } return Object.keys(shorthand_for) .map(function(subprop) { return this.getPropertyValue(subprop); }, this) .filter(function(value) { return value !== ''; }) .join(' '); }; }; // isValid(){1,4} | inherit // if one, it applies to all // if two, the first applies to the top and bottom, and the second to left and right // if three, the first applies to the top, the second to left and right, the third bottom // if four, top, right, bottom, left exports.implicitSetter = function(property_before, property_after, isValid, parser) { property_after = property_after || ''; if (property_after !== '') { property_after = '-' + property_after; } var part_names = ['top', 'right', 'bottom', 'left']; return function(v) { if (typeof v === 'number') { v = v.toString(); } if (typeof v !== 'string') { return undefined; } var parts; if (v.toLowerCase() === 'inherit' || v === '') { parts = [v]; } else { parts = getParts(v); } if (parts.length < 1 || parts.length > 4) { return undefined; } if (!parts.every(isValid)) { return undefined; } parts = parts.map(function(part) { return parser(part); }); this._setProperty(property_before + property_after, parts.join(' ')); if (parts.length === 1) { parts[1] = parts[0]; } if (parts.length === 2) { parts[2] = parts[0]; } if (parts.length === 3) { parts[3] = parts[1]; } for (var i = 0; i < 4; i++) { var property = property_before + '-' + part_names[i] + property_after; this.removeProperty(property); if (parts[i] !== '') { this._values[property] = parts[i]; } } return v; }; }; // // Companion to implicitSetter, but for the individual parts. // This sets the individual value, and checks to see if all four // sub-parts are set. If so, it sets the shorthand version and removes // the individual parts from the cssText. // exports.subImplicitSetter = function(prefix, part, isValid, parser) { var property = prefix + '-' + part; var subparts = [prefix + '-top', prefix + '-right', prefix + '-bottom', prefix + '-left']; return function(v) { if (typeof v === 'number') { v = v.toString(); } if (typeof v !== 'string') { return undefined; } if (!isValid(v)) { return undefined; } v = parser(v); this._setProperty(property, v); var parts = []; for (var i = 0; i < 4; i++) { if (this._values[subparts[i]] == null || this._values[subparts[i]] === '') { break; } parts.push(this._values[subparts[i]]); } if (parts.length === 4) { for (i = 0; i < 4; i++) { this.removeProperty(subparts[i]); this._values[subparts[i]] = parts[i]; } this._setProperty(prefix, parts.join(' ')); } return v; }; }; var camel_to_dashed = /[A-Z]/g; var first_segment = /^\([^-]\)-/; var vendor_prefixes = ['o', 'moz', 'ms', 'webkit']; exports.camelToDashed = function(camel_case) { var match; var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase(); match = dashed.match(first_segment); if (match && vendor_prefixes.indexOf(match[1]) !== -1) { dashed = '-' + dashed; } return dashed; }; /***/ }), /***/ 13480: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // autogenerated - 4/29/2020 /* * * https://www.w3.org/Style/CSS/all-properties.en.html */ var external_dependency_parsers_0 = __webpack_require__(37032); var external_dependency_constants_1 = __webpack_require__(39139); var azimuth_export_definition; azimuth_export_definition = { set: function (v) { var valueType = external_dependency_parsers_0.valueType(v); if (valueType === external_dependency_parsers_0.TYPES.ANGLE) { return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v)); } if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) { var keywords = v.toLowerCase().trim().split(/\s+/); var hasBehind = false; if (keywords.length > 2) { return; } var behindIndex = keywords.indexOf('behind'); hasBehind = behindIndex !== -1; if (keywords.length === 2) { if (!hasBehind) { return; } keywords.splice(behindIndex, 1); } if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') { if (hasBehind) { return; } return this._setProperty('azimuth', keywords[0]); } if (keywords[0] === 'behind') { return this._setProperty('azimuth', '180deg'); } switch (keywords[0]) { case 'left-side': return this._setProperty('azimuth', '270deg'); case 'far-left': return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg'); case 'left': return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg'); case 'center-left': return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg'); case 'center': return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg'); case 'center-right': return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg'); case 'right': return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg'); case 'far-right': return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg'); case 'right-side': return this._setProperty('azimuth', '90deg'); default: return; } } }, get: function () { return this.getPropertyValue('azimuth'); }, enumerable: true, configurable: true }; var backgroundColor_export_isValid, backgroundColor_export_definition; var backgroundColor_local_var_parse = function parse(v) { var parsed = external_dependency_parsers_0.parseColor(v); if (parsed !== undefined) { return parsed; } if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) { return v; } return undefined; }; backgroundColor_export_isValid = function isValid(v) { return backgroundColor_local_var_parse(v) !== undefined; }; backgroundColor_export_definition = { set: function (v) { var parsed = backgroundColor_local_var_parse(v); if (parsed === undefined) { return; } this._setProperty('background-color', parsed); }, get: function () { return this.getPropertyValue('background-color'); }, enumerable: true, configurable: true }; var backgroundImage_export_isValid, backgroundImage_export_definition; var backgroundImage_local_var_parse = function parse(v) { var parsed = external_dependency_parsers_0.parseUrl(v); if (parsed !== undefined) { return parsed; } if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) { return v; } return undefined; }; backgroundImage_export_isValid = function isValid(v) { return backgroundImage_local_var_parse(v) !== undefined; }; backgroundImage_export_definition = { set: function (v) { this._setProperty('background-image', backgroundImage_local_var_parse(v)); }, get: function () { return this.getPropertyValue('background-image'); }, enumerable: true, configurable: true }; var backgroundRepeat_export_isValid, backgroundRepeat_export_definition; var backgroundRepeat_local_var_parse = function parse(v) { if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) { return v; } return undefined; }; backgroundRepeat_export_isValid = function isValid(v) { return backgroundRepeat_local_var_parse(v) !== undefined; }; backgroundRepeat_export_definition = { set: function (v) { this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v)); }, get: function () { return this.getPropertyValue('background-repeat'); }, enumerable: true, configurable: true }; var backgroundAttachment_export_isValid, backgroundAttachment_export_definition; var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) { return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit'); }; backgroundAttachment_export_definition = { set: function (v) { if (!backgroundAttachment_local_var_isValid(v)) { return; } this._setProperty('background-attachment', v); }, get: function () { return this.getPropertyValue('background-attachment'); }, enumerable: true, configurable: true }; var backgroundPosition_export_isValid, backgroundPosition_export_definition; var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right']; var backgroundPosition_local_var_parse = function parse(v) { if (v === '' || v === null) { return undefined; } var parts = v.split(/\s+/); if (parts.length > 2 || parts.length < 1) { return undefined; } var types = []; parts.forEach(function (part, index) { types[index] = external_dependency_parsers_0.valueType(part); }); if (parts.length === 1) { if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) { return v; } if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) { if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') { return v; } } return undefined; } if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) { return v; } if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) { return undefined; } if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) { return v; } return undefined; }; backgroundPosition_export_isValid = function isValid(v) { return backgroundPosition_local_var_parse(v) !== undefined; }; backgroundPosition_export_definition = { set: function (v) { this._setProperty('background-position', backgroundPosition_local_var_parse(v)); }, get: function () { return this.getPropertyValue('background-position'); }, enumerable: true, configurable: true }; var background_export_definition; var background_local_var_shorthand_for = { 'background-color': { isValid: backgroundColor_export_isValid, definition: backgroundColor_export_definition }, 'background-image': { isValid: backgroundImage_export_isValid, definition: backgroundImage_export_definition }, 'background-repeat': { isValid: backgroundRepeat_export_isValid, definition: backgroundRepeat_export_definition }, 'background-attachment': { isValid: backgroundAttachment_export_isValid, definition: backgroundAttachment_export_definition }, 'background-position': { isValid: backgroundPosition_export_isValid, definition: backgroundPosition_export_definition } }; background_export_definition = { set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for), enumerable: true, configurable: true }; var borderWidth_export_isValid, borderWidth_export_definition; // the valid border-widths: var borderWidth_local_var_widths = ['thin', 'medium', 'thick']; borderWidth_export_isValid = function parse(v) { var length = external_dependency_parsers_0.parseLength(v); if (length !== undefined) { return true; } if (typeof v !== 'string') { return false; } if (v === '') { return true; } v = v.toLowerCase(); if (borderWidth_local_var_widths.indexOf(v) === -1) { return false; } return true; }; var borderWidth_local_var_isValid = borderWidth_export_isValid; var borderWidth_local_var_parser = function (v) { var length = external_dependency_parsers_0.parseLength(v); if (length !== undefined) { return length; } if (borderWidth_local_var_isValid(v)) { return v.toLowerCase(); } return undefined; }; borderWidth_export_definition = { set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser), get: function () { return this.getPropertyValue('border-width'); }, enumerable: true, configurable: true }; var borderStyle_export_isValid, borderStyle_export_definition; // the valid border-styles: var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset']; borderStyle_export_isValid = function parse(v) { return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1); }; var borderStyle_local_var_isValid = borderStyle_export_isValid; var borderStyle_local_var_parser = function (v) { if (borderStyle_local_var_isValid(v)) { return v.toLowerCase(); } return undefined; }; borderStyle_export_definition = { set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser), get: function () { return this.getPropertyValue('border-style'); }, enumerable: true, configurable: true }; var borderColor_export_isValid, borderColor_export_definition; borderColor_export_isValid = function parse(v) { if (typeof v !== 'string') { return false; } return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR; }; var borderColor_local_var_isValid = borderColor_export_isValid; var borderColor_local_var_parser = function (v) { if (borderColor_local_var_isValid(v)) { return v.toLowerCase(); } return undefined; }; borderColor_export_definition = { set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser), get: function () { return this.getPropertyValue('border-color'); }, enumerable: true, configurable: true }; var border_export_definition; var border_local_var_shorthand_for = { 'border-width': { isValid: borderWidth_export_isValid, definition: borderWidth_export_definition }, 'border-style': { isValid: borderStyle_export_isValid, definition: borderStyle_export_definition }, 'border-color': { isValid: borderColor_export_isValid, definition: borderColor_export_definition } }; var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for); var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for); border_export_definition = { set: function (v) { if (v.toString().toLowerCase() === 'none') { v = ''; } border_local_var_myShorthandSetter.call(this, v); this.removeProperty('border-top'); this.removeProperty('border-left'); this.removeProperty('border-right'); this.removeProperty('border-bottom'); this._values['border-top'] = this._values.border; this._values['border-left'] = this._values.border; this._values['border-right'] = this._values.border; this._values['border-bottom'] = this._values.border; }, get: border_local_var_myShorthandGetter, enumerable: true, configurable: true }; var borderBottomWidth_export_isValid, borderBottomWidth_export_definition; var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid; borderBottomWidth_export_definition = { set: function (v) { if (borderBottomWidth_local_var_isValid(v)) { this._setProperty('border-bottom-width', v); } }, get: function () { return this.getPropertyValue('border-bottom-width'); }, enumerable: true, configurable: true }; var borderBottomStyle_export_isValid, borderBottomStyle_export_definition; borderBottomStyle_export_isValid = borderStyle_export_isValid; borderBottomStyle_export_definition = { set: function (v) { if (borderStyle_export_isValid(v)) { if (v.toLowerCase() === 'none') { v = ''; this.removeProperty('border-bottom-width'); } this._setProperty('border-bottom-style', v); } }, get: function () { return this.getPropertyValue('border-bottom-style'); }, enumerable: true, configurable: true }; var borderBottomColor_export_isValid, borderBottomColor_export_definition; var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid; borderBottomColor_export_definition = { set: function (v) { if (borderBottomColor_local_var_isValid(v)) { this._setProperty('border-bottom-color', v); } }, get: function () { return this.getPropertyValue('border-bottom-color'); }, enumerable: true, configurable: true }; var borderBottom_export_definition; var borderBottom_local_var_shorthand_for = { 'border-bottom-width': { isValid: borderBottomWidth_export_isValid, definition: borderBottomWidth_export_definition }, 'border-bottom-style': { isValid: borderBottomStyle_export_isValid, definition: borderBottomStyle_export_definition }, 'border-bottom-color': { isValid: borderBottomColor_export_isValid, definition: borderBottomColor_export_definition } }; borderBottom_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for), enumerable: true, configurable: true }; var borderCollapse_export_definition; var borderCollapse_local_var_parse = function parse(v) { if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) { return v; } return undefined; }; borderCollapse_export_definition = { set: function (v) { this._setProperty('border-collapse', borderCollapse_local_var_parse(v)); }, get: function () { return this.getPropertyValue('border-collapse'); }, enumerable: true, configurable: true }; var borderLeftWidth_export_isValid, borderLeftWidth_export_definition; var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid; borderLeftWidth_export_definition = { set: function (v) { if (borderLeftWidth_local_var_isValid(v)) { this._setProperty('border-left-width', v); } }, get: function () { return this.getPropertyValue('border-left-width'); }, enumerable: true, configurable: true }; var borderLeftStyle_export_isValid, borderLeftStyle_export_definition; borderLeftStyle_export_isValid = borderStyle_export_isValid; borderLeftStyle_export_definition = { set: function (v) { if (borderStyle_export_isValid(v)) { if (v.toLowerCase() === 'none') { v = ''; this.removeProperty('border-left-width'); } this._setProperty('border-left-style', v); } }, get: function () { return this.getPropertyValue('border-left-style'); }, enumerable: true, configurable: true }; var borderLeftColor_export_isValid, borderLeftColor_export_definition; var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid; borderLeftColor_export_definition = { set: function (v) { if (borderLeftColor_local_var_isValid(v)) { this._setProperty('border-left-color', v); } }, get: function () { return this.getPropertyValue('border-left-color'); }, enumerable: true, configurable: true }; var borderLeft_export_definition; var borderLeft_local_var_shorthand_for = { 'border-left-width': { isValid: borderLeftWidth_export_isValid, definition: borderLeftWidth_export_definition }, 'border-left-style': { isValid: borderLeftStyle_export_isValid, definition: borderLeftStyle_export_definition }, 'border-left-color': { isValid: borderLeftColor_export_isValid, definition: borderLeftColor_export_definition } }; borderLeft_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for), enumerable: true, configurable: true }; var borderRightWidth_export_isValid, borderRightWidth_export_definition; var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid; borderRightWidth_export_definition = { set: function (v) { if (borderRightWidth_local_var_isValid(v)) { this._setProperty('border-right-width', v); } }, get: function () { return this.getPropertyValue('border-right-width'); }, enumerable: true, configurable: true }; var borderRightStyle_export_isValid, borderRightStyle_export_definition; borderRightStyle_export_isValid = borderStyle_export_isValid; borderRightStyle_export_definition = { set: function (v) { if (borderStyle_export_isValid(v)) { if (v.toLowerCase() === 'none') { v = ''; this.removeProperty('border-right-width'); } this._setProperty('border-right-style', v); } }, get: function () { return this.getPropertyValue('border-right-style'); }, enumerable: true, configurable: true }; var borderRightColor_export_isValid, borderRightColor_export_definition; var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid; borderRightColor_export_definition = { set: function (v) { if (borderRightColor_local_var_isValid(v)) { this._setProperty('border-right-color', v); } }, get: function () { return this.getPropertyValue('border-right-color'); }, enumerable: true, configurable: true }; var borderRight_export_definition; var borderRight_local_var_shorthand_for = { 'border-right-width': { isValid: borderRightWidth_export_isValid, definition: borderRightWidth_export_definition }, 'border-right-style': { isValid: borderRightStyle_export_isValid, definition: borderRightStyle_export_definition }, 'border-right-color': { isValid: borderRightColor_export_isValid, definition: borderRightColor_export_definition } }; borderRight_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for), enumerable: true, configurable: true }; var borderSpacing_export_definition; // ? | inherit // if one, it applies to both horizontal and verical spacing // if two, the first applies to the horizontal and the second applies to vertical spacing var borderSpacing_local_var_parse = function parse(v) { if (v === '' || v === null) { return undefined; } if (v === 0) { return '0px'; } if (v.toLowerCase() === 'inherit') { return v; } var parts = v.split(/\s+/); if (parts.length !== 1 && parts.length !== 2) { return undefined; } parts.forEach(function (part) { if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) { return undefined; } }); return v; }; borderSpacing_export_definition = { set: function (v) { this._setProperty('border-spacing', borderSpacing_local_var_parse(v)); }, get: function () { return this.getPropertyValue('border-spacing'); }, enumerable: true, configurable: true }; var borderTopWidth_export_isValid, borderTopWidth_export_definition; borderTopWidth_export_isValid = borderWidth_export_isValid; borderTopWidth_export_definition = { set: function (v) { if (borderWidth_export_isValid(v)) { this._setProperty('border-top-width', v); } }, get: function () { return this.getPropertyValue('border-top-width'); }, enumerable: true, configurable: true }; var borderTopStyle_export_isValid, borderTopStyle_export_definition; borderTopStyle_export_isValid = borderStyle_export_isValid; borderTopStyle_export_definition = { set: function (v) { if (borderStyle_export_isValid(v)) { if (v.toLowerCase() === 'none') { v = ''; this.removeProperty('border-top-width'); } this._setProperty('border-top-style', v); } }, get: function () { return this.getPropertyValue('border-top-style'); }, enumerable: true, configurable: true }; var borderTopColor_export_isValid, borderTopColor_export_definition; var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid; borderTopColor_export_definition = { set: function (v) { if (borderTopColor_local_var_isValid(v)) { this._setProperty('border-top-color', v); } }, get: function () { return this.getPropertyValue('border-top-color'); }, enumerable: true, configurable: true }; var borderTop_export_definition; var borderTop_local_var_shorthand_for = { 'border-top-width': { isValid: borderTopWidth_export_isValid, definition: borderTopWidth_export_definition }, 'border-top-style': { isValid: borderTopStyle_export_isValid, definition: borderTopStyle_export_definition }, 'border-top-color': { isValid: borderTopColor_export_isValid, definition: borderTopColor_export_definition } }; borderTop_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for), enumerable: true, configurable: true }; var bottom_export_definition; bottom_export_definition = { set: function (v) { this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v)); }, get: function () { return this.getPropertyValue('bottom'); }, enumerable: true, configurable: true }; var clear_export_definition; var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit']; clear_export_definition = { set: function (v) { this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords)); }, get: function () { return this.getPropertyValue('clear'); }, enumerable: true, configurable: true }; var clip_export_definition; var clip_local_var_shape_regex = /^rect\((.*)\)$/i; var clip_local_var_parse = function (val) { if (val === '' || val === null) { return val; } if (typeof val !== 'string') { return undefined; } val = val.toLowerCase(); if (val === 'auto' || val === 'inherit') { return val; } var matches = val.match(clip_local_var_shape_regex); if (!matches) { return undefined; } var parts = matches[1].split(/\s*,\s*/); if (parts.length !== 4) { return undefined; } var valid = parts.every(function (part, index) { var measurement = external_dependency_parsers_0.parseMeasurement(part); parts[index] = measurement; return measurement !== undefined; }); if (!valid) { return undefined; } parts = parts.join(', '); return val.replace(matches[1], parts); }; clip_export_definition = { set: function (v) { this._setProperty('clip', clip_local_var_parse(v)); }, get: function () { return this.getPropertyValue('clip'); }, enumerable: true, configurable: true }; var color_export_definition; color_export_definition = { set: function (v) { this._setProperty('color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('color'); }, enumerable: true, configurable: true }; var cssFloat_export_definition; cssFloat_export_definition = { set: function (v) { this._setProperty('float', v); }, get: function () { return this.getPropertyValue('float'); }, enumerable: true, configurable: true }; var flexGrow_export_isValid, flexGrow_export_definition; flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) { return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first; }; flexGrow_export_definition = { set: function (v) { this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v)); }, get: function () { return this.getPropertyValue('flex-grow'); }, enumerable: true, configurable: true }; var flexShrink_export_isValid, flexShrink_export_definition; flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) { return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second; }; flexShrink_export_definition = { set: function (v) { this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v)); }, get: function () { return this.getPropertyValue('flex-shrink'); }, enumerable: true, configurable: true }; var flexBasis_export_isValid, flexBasis_export_definition; function flexBasis_local_fn_parse(v) { if (String(v).toLowerCase() === 'auto') { return 'auto'; } if (String(v).toLowerCase() === 'inherit') { return 'inherit'; } return external_dependency_parsers_0.parseMeasurement(v); } flexBasis_export_isValid = function isValid(v) { return flexBasis_local_fn_parse(v) !== undefined; }; flexBasis_export_definition = { set: function (v) { this._setProperty('flex-basis', flexBasis_local_fn_parse(v)); }, get: function () { return this.getPropertyValue('flex-basis'); }, enumerable: true, configurable: true }; var flex_export_isValid, flex_export_definition; var flex_local_var_shorthand_for = { 'flex-grow': { isValid: flexGrow_export_isValid, definition: flexGrow_export_definition }, 'flex-shrink': { isValid: flexShrink_export_isValid, definition: flexShrink_export_definition }, 'flex-basis': { isValid: flexBasis_export_isValid, definition: flexBasis_export_definition } }; var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for); flex_export_isValid = function isValid(v) { return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined; }; flex_export_definition = { set: function (v) { var normalizedValue = String(v).trim().toLowerCase(); if (normalizedValue === 'none') { flex_local_var_myShorthandSetter.call(this, '0 0 auto'); return; } if (normalizedValue === 'initial') { flex_local_var_myShorthandSetter.call(this, '0 1 auto'); return; } if (normalizedValue === 'auto') { this.removeProperty('flex-grow'); this.removeProperty('flex-shrink'); this.setProperty('flex-basis', normalizedValue); return; } flex_local_var_myShorthandSetter.call(this, v); }, get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for), enumerable: true, configurable: true }; var float_export_definition; float_export_definition = { set: function (v) { this._setProperty('float', v); }, get: function () { return this.getPropertyValue('float'); }, enumerable: true, configurable: true }; var floodColor_export_definition; floodColor_export_definition = { set: function (v) { this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('flood-color'); }, enumerable: true, configurable: true }; var fontFamily_export_isValid, fontFamily_export_definition; var fontFamily_local_var_partsRegEx = /\s*,\s*/; fontFamily_export_isValid = function isValid(v) { if (v === '' || v === null) { return true; } var parts = v.split(fontFamily_local_var_partsRegEx); var len = parts.length; var i; var type; for (i = 0; i < len; i++) { type = external_dependency_parsers_0.valueType(parts[i]); if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) { return true; } } return false; }; fontFamily_export_definition = { set: function (v) { this._setProperty('font-family', v); }, get: function () { return this.getPropertyValue('font-family'); }, enumerable: true, configurable: true }; var fontSize_export_isValid, fontSize_export_definition; var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; var fontSize_local_var_relativeSizes = ['larger', 'smaller']; fontSize_export_isValid = function (v) { var type = external_dependency_parsers_0.valueType(v.toLowerCase()); return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1; }; function fontSize_local_fn_parse(v) { const valueAsString = String(v).toLowerCase(); const optionalArguments = fontSize_local_var_absoluteSizes.concat(fontSize_local_var_relativeSizes); const isOptionalArgument = optionalArguments.some(stringValue => stringValue.toLowerCase() === valueAsString); return isOptionalArgument ? valueAsString : external_dependency_parsers_0.parseMeasurement(v); } fontSize_export_definition = { set: function (v) { this._setProperty('font-size', fontSize_local_fn_parse(v)); }, get: function () { return this.getPropertyValue('font-size'); }, enumerable: true, configurable: true }; var fontStyle_export_isValid, fontStyle_export_definition; var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit']; fontStyle_export_isValid = function (v) { return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1; }; fontStyle_export_definition = { set: function (v) { this._setProperty('font-style', v); }, get: function () { return this.getPropertyValue('font-style'); }, enumerable: true, configurable: true }; var fontVariant_export_isValid, fontVariant_export_definition; var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit']; fontVariant_export_isValid = function isValid(v) { return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1; }; fontVariant_export_definition = { set: function (v) { this._setProperty('font-variant', v); }, get: function () { return this.getPropertyValue('font-variant'); }, enumerable: true, configurable: true }; var fontWeight_export_isValid, fontWeight_export_definition; var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit']; fontWeight_export_isValid = function isValid(v) { return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1; }; fontWeight_export_definition = { set: function (v) { this._setProperty('font-weight', v); }, get: function () { return this.getPropertyValue('font-weight'); }, enumerable: true, configurable: true }; var lineHeight_export_isValid, lineHeight_export_definition; lineHeight_export_isValid = function isValid(v) { var type = external_dependency_parsers_0.valueType(v); return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT; }; lineHeight_export_definition = { set: function (v) { this._setProperty('line-height', v); }, get: function () { return this.getPropertyValue('line-height'); }, enumerable: true, configurable: true }; var font_export_definition; var font_local_var_shorthand_for = { 'font-family': { isValid: fontFamily_export_isValid, definition: fontFamily_export_definition }, 'font-size': { isValid: fontSize_export_isValid, definition: fontSize_export_definition }, 'font-style': { isValid: fontStyle_export_isValid, definition: fontStyle_export_definition }, 'font-variant': { isValid: fontVariant_export_isValid, definition: fontVariant_export_definition }, 'font-weight': { isValid: fontWeight_export_isValid, definition: fontWeight_export_definition }, 'line-height': { isValid: lineHeight_export_isValid, definition: lineHeight_export_definition } }; var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit']; var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for); font_export_definition = { set: function (v) { var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for); if (short !== undefined) { return font_local_var_setter.call(this, v); } if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) { this._setProperty('font', v); } }, get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for), enumerable: true, configurable: true }; var height_export_definition; function height_local_fn_parse(v) { if (String(v).toLowerCase() === 'auto') { return 'auto'; } if (String(v).toLowerCase() === 'inherit') { return 'inherit'; } return external_dependency_parsers_0.parseMeasurement(v); } height_export_definition = { set: function (v) { this._setProperty('height', height_local_fn_parse(v)); }, get: function () { return this.getPropertyValue('height'); }, enumerable: true, configurable: true }; var left_export_definition; left_export_definition = { set: function (v) { this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v)); }, get: function () { return this.getPropertyValue('left'); }, enumerable: true, configurable: true }; var lightingColor_export_definition; lightingColor_export_definition = { set: function (v) { this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('lighting-color'); }, enumerable: true, configurable: true }; var margin_export_definition, margin_export_isValid, margin_export_parser; var margin_local_var_TYPES = external_dependency_parsers_0.TYPES; var margin_local_var_isValid = function (v) { if (v.toLowerCase() === 'auto') { return true; } var type = external_dependency_parsers_0.valueType(v); return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0); }; var margin_local_var_parser = function (v) { var V = v.toLowerCase(); if (V === 'auto') { return V; } return external_dependency_parsers_0.parseMeasurement(v); }; var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser); var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () { return true; }, function (v) { return v; }); margin_export_definition = { set: function (v) { if (typeof v === 'number') { v = String(v); } if (typeof v !== 'string') { return; } var V = v.toLowerCase(); switch (V) { case 'inherit': case 'initial': case 'unset': case '': margin_local_var_myGlobal.call(this, V); break; default: margin_local_var_mySetter.call(this, v); break; } }, get: function () { return this.getPropertyValue('margin'); }, enumerable: true, configurable: true }; margin_export_isValid = margin_local_var_isValid; margin_export_parser = margin_local_var_parser; var marginBottom_export_definition; marginBottom_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.isValid, { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.parser), get: function () { return this.getPropertyValue('margin-bottom'); }, enumerable: true, configurable: true }; var marginLeft_export_definition; marginLeft_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.isValid, { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.parser), get: function () { return this.getPropertyValue('margin-left'); }, enumerable: true, configurable: true }; var marginRight_export_definition; marginRight_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.isValid, { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.parser), get: function () { return this.getPropertyValue('margin-right'); }, enumerable: true, configurable: true }; var marginTop_export_definition; marginTop_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.isValid, { definition: margin_export_definition, isValid: margin_export_isValid, parser: margin_export_parser }.parser), get: function () { return this.getPropertyValue('margin-top'); }, enumerable: true, configurable: true }; var opacity_export_definition; opacity_export_definition = { set: function (v) { this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v)); }, get: function () { return this.getPropertyValue('opacity'); }, enumerable: true, configurable: true }; var outlineColor_export_definition; outlineColor_export_definition = { set: function (v) { this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('outline-color'); }, enumerable: true, configurable: true }; var padding_export_definition, padding_export_isValid, padding_export_parser; var padding_local_var_TYPES = external_dependency_parsers_0.TYPES; var padding_local_var_isValid = function (v) { var type = external_dependency_parsers_0.valueType(v); return type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0); }; var padding_local_var_parser = function (v) { return external_dependency_parsers_0.parseMeasurement(v); }; var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser); var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () { return true; }, function (v) { return v; }); padding_export_definition = { set: function (v) { if (typeof v === 'number') { v = String(v); } if (typeof v !== 'string') { return; } var V = v.toLowerCase(); switch (V) { case 'inherit': case 'initial': case 'unset': case '': padding_local_var_myGlobal.call(this, V); break; default: padding_local_var_mySetter.call(this, v); break; } }, get: function () { return this.getPropertyValue('padding'); }, enumerable: true, configurable: true }; padding_export_isValid = padding_local_var_isValid; padding_export_parser = padding_local_var_parser; var paddingBottom_export_definition; paddingBottom_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.isValid, { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.parser), get: function () { return this.getPropertyValue('padding-bottom'); }, enumerable: true, configurable: true }; var paddingLeft_export_definition; paddingLeft_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.isValid, { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.parser), get: function () { return this.getPropertyValue('padding-left'); }, enumerable: true, configurable: true }; var paddingRight_export_definition; paddingRight_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.isValid, { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.parser), get: function () { return this.getPropertyValue('padding-right'); }, enumerable: true, configurable: true }; var paddingTop_export_definition; paddingTop_export_definition = { set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.isValid, { definition: padding_export_definition, isValid: padding_export_isValid, parser: padding_export_parser }.parser), get: function () { return this.getPropertyValue('padding-top'); }, enumerable: true, configurable: true }; var right_export_definition; right_export_definition = { set: function (v) { this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v)); }, get: function () { return this.getPropertyValue('right'); }, enumerable: true, configurable: true }; var stopColor_export_definition; stopColor_export_definition = { set: function (v) { this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('stop-color'); }, enumerable: true, configurable: true }; var textLineThroughColor_export_definition; textLineThroughColor_export_definition = { set: function (v) { this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('text-line-through-color'); }, enumerable: true, configurable: true }; var textOverlineColor_export_definition; textOverlineColor_export_definition = { set: function (v) { this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('text-overline-color'); }, enumerable: true, configurable: true }; var textUnderlineColor_export_definition; textUnderlineColor_export_definition = { set: function (v) { this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('text-underline-color'); }, enumerable: true, configurable: true }; var top_export_definition; top_export_definition = { set: function (v) { this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v)); }, get: function () { return this.getPropertyValue('top'); }, enumerable: true, configurable: true }; var webkitBorderAfterColor_export_definition; webkitBorderAfterColor_export_definition = { set: function (v) { this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-border-after-color'); }, enumerable: true, configurable: true }; var webkitBorderBeforeColor_export_definition; webkitBorderBeforeColor_export_definition = { set: function (v) { this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-border-before-color'); }, enumerable: true, configurable: true }; var webkitBorderEndColor_export_definition; webkitBorderEndColor_export_definition = { set: function (v) { this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-border-end-color'); }, enumerable: true, configurable: true }; var webkitBorderStartColor_export_definition; webkitBorderStartColor_export_definition = { set: function (v) { this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-border-start-color'); }, enumerable: true, configurable: true }; var webkitColumnRuleColor_export_definition; webkitColumnRuleColor_export_definition = { set: function (v) { this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-column-rule-color'); }, enumerable: true, configurable: true }; var webkitMatchNearestMailBlockquoteColor_export_definition; webkitMatchNearestMailBlockquoteColor_export_definition = { set: function (v) { this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color'); }, enumerable: true, configurable: true }; var webkitTapHighlightColor_export_definition; webkitTapHighlightColor_export_definition = { set: function (v) { this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-tap-highlight-color'); }, enumerable: true, configurable: true }; var webkitTextEmphasisColor_export_definition; webkitTextEmphasisColor_export_definition = { set: function (v) { this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-text-emphasis-color'); }, enumerable: true, configurable: true }; var webkitTextFillColor_export_definition; webkitTextFillColor_export_definition = { set: function (v) { this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-text-fill-color'); }, enumerable: true, configurable: true }; var webkitTextStrokeColor_export_definition; webkitTextStrokeColor_export_definition = { set: function (v) { this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v)); }, get: function () { return this.getPropertyValue('-webkit-text-stroke-color'); }, enumerable: true, configurable: true }; var width_export_definition; function width_local_fn_parse(v) { if (String(v).toLowerCase() === 'auto') { return 'auto'; } if (String(v).toLowerCase() === 'inherit') { return 'inherit'; } return external_dependency_parsers_0.parseMeasurement(v); } width_export_definition = { set: function (v) { this._setProperty('width', width_local_fn_parse(v)); }, get: function () { return this.getPropertyValue('width'); }, enumerable: true, configurable: true }; module.exports = function (prototype) { Object.defineProperties(prototype, { azimuth: azimuth_export_definition, backgroundColor: backgroundColor_export_definition, "background-color": backgroundColor_export_definition, backgroundImage: backgroundImage_export_definition, "background-image": backgroundImage_export_definition, backgroundRepeat: backgroundRepeat_export_definition, "background-repeat": backgroundRepeat_export_definition, backgroundAttachment: backgroundAttachment_export_definition, "background-attachment": backgroundAttachment_export_definition, backgroundPosition: backgroundPosition_export_definition, "background-position": backgroundPosition_export_definition, background: background_export_definition, borderWidth: borderWidth_export_definition, "border-width": borderWidth_export_definition, borderStyle: borderStyle_export_definition, "border-style": borderStyle_export_definition, borderColor: borderColor_export_definition, "border-color": borderColor_export_definition, border: border_export_definition, borderBottomWidth: borderBottomWidth_export_definition, "border-bottom-width": borderBottomWidth_export_definition, borderBottomStyle: borderBottomStyle_export_definition, "border-bottom-style": borderBottomStyle_export_definition, borderBottomColor: borderBottomColor_export_definition, "border-bottom-color": borderBottomColor_export_definition, borderBottom: borderBottom_export_definition, "border-bottom": borderBottom_export_definition, borderCollapse: borderCollapse_export_definition, "border-collapse": borderCollapse_export_definition, borderLeftWidth: borderLeftWidth_export_definition, "border-left-width": borderLeftWidth_export_definition, borderLeftStyle: borderLeftStyle_export_definition, "border-left-style": borderLeftStyle_export_definition, borderLeftColor: borderLeftColor_export_definition, "border-left-color": borderLeftColor_export_definition, borderLeft: borderLeft_export_definition, "border-left": borderLeft_export_definition, borderRightWidth: borderRightWidth_export_definition, "border-right-width": borderRightWidth_export_definition, borderRightStyle: borderRightStyle_export_definition, "border-right-style": borderRightStyle_export_definition, borderRightColor: borderRightColor_export_definition, "border-right-color": borderRightColor_export_definition, borderRight: borderRight_export_definition, "border-right": borderRight_export_definition, borderSpacing: borderSpacing_export_definition, "border-spacing": borderSpacing_export_definition, borderTopWidth: borderTopWidth_export_definition, "border-top-width": borderTopWidth_export_definition, borderTopStyle: borderTopStyle_export_definition, "border-top-style": borderTopStyle_export_definition, borderTopColor: borderTopColor_export_definition, "border-top-color": borderTopColor_export_definition, borderTop: borderTop_export_definition, "border-top": borderTop_export_definition, bottom: bottom_export_definition, clear: clear_export_definition, clip: clip_export_definition, color: color_export_definition, cssFloat: cssFloat_export_definition, "css-float": cssFloat_export_definition, flexGrow: flexGrow_export_definition, "flex-grow": flexGrow_export_definition, flexShrink: flexShrink_export_definition, "flex-shrink": flexShrink_export_definition, flexBasis: flexBasis_export_definition, "flex-basis": flexBasis_export_definition, flex: flex_export_definition, float: float_export_definition, floodColor: floodColor_export_definition, "flood-color": floodColor_export_definition, fontFamily: fontFamily_export_definition, "font-family": fontFamily_export_definition, fontSize: fontSize_export_definition, "font-size": fontSize_export_definition, fontStyle: fontStyle_export_definition, "font-style": fontStyle_export_definition, fontVariant: fontVariant_export_definition, "font-variant": fontVariant_export_definition, fontWeight: fontWeight_export_definition, "font-weight": fontWeight_export_definition, lineHeight: lineHeight_export_definition, "line-height": lineHeight_export_definition, font: font_export_definition, height: height_export_definition, left: left_export_definition, lightingColor: lightingColor_export_definition, "lighting-color": lightingColor_export_definition, margin: margin_export_definition, marginBottom: marginBottom_export_definition, "margin-bottom": marginBottom_export_definition, marginLeft: marginLeft_export_definition, "margin-left": marginLeft_export_definition, marginRight: marginRight_export_definition, "margin-right": marginRight_export_definition, marginTop: marginTop_export_definition, "margin-top": marginTop_export_definition, opacity: opacity_export_definition, outlineColor: outlineColor_export_definition, "outline-color": outlineColor_export_definition, padding: padding_export_definition, paddingBottom: paddingBottom_export_definition, "padding-bottom": paddingBottom_export_definition, paddingLeft: paddingLeft_export_definition, "padding-left": paddingLeft_export_definition, paddingRight: paddingRight_export_definition, "padding-right": paddingRight_export_definition, paddingTop: paddingTop_export_definition, "padding-top": paddingTop_export_definition, right: right_export_definition, stopColor: stopColor_export_definition, "stop-color": stopColor_export_definition, textLineThroughColor: textLineThroughColor_export_definition, "text-line-through-color": textLineThroughColor_export_definition, textOverlineColor: textOverlineColor_export_definition, "text-overline-color": textOverlineColor_export_definition, textUnderlineColor: textUnderlineColor_export_definition, "text-underline-color": textUnderlineColor_export_definition, top: top_export_definition, webkitBorderAfterColor: webkitBorderAfterColor_export_definition, "webkit-border-after-color": webkitBorderAfterColor_export_definition, webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition, "webkit-border-before-color": webkitBorderBeforeColor_export_definition, webkitBorderEndColor: webkitBorderEndColor_export_definition, "webkit-border-end-color": webkitBorderEndColor_export_definition, webkitBorderStartColor: webkitBorderStartColor_export_definition, "webkit-border-start-color": webkitBorderStartColor_export_definition, webkitColumnRuleColor: webkitColumnRuleColor_export_definition, "webkit-column-rule-color": webkitColumnRuleColor_export_definition, webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition, "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition, webkitTapHighlightColor: webkitTapHighlightColor_export_definition, "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition, webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition, "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition, webkitTextFillColor: webkitTextFillColor_export_definition, "webkit-text-fill-color": webkitTextFillColor_export_definition, webkitTextStrokeColor: webkitTextStrokeColor_export_definition, "webkit-text-stroke-color": webkitTextStrokeColor_export_definition, width: width_export_definition }); }; /***/ }), /***/ 90515: /***/ ((__unused_webpack_module, exports) => { "use strict"; const hueToRgb = (t1, t2, hue) => { if (hue < 0) hue += 6; if (hue >= 6) hue -= 6; if (hue < 1) return (t2 - t1) * hue + t1; else if (hue < 3) return t2; else if (hue < 4) return (t2 - t1) * (4 - hue) + t1; else return t1; }; // https://www.w3.org/TR/css-color-4/#hsl-to-rgb exports.hslToRgb = (hue, sat, light) => { const t2 = light <= 0.5 ? light * (sat + 1) : light + sat - light * sat; const t1 = light * 2 - t2; const r = hueToRgb(t1, t2, hue + 2); const g = hueToRgb(t1, t2, hue); const b = hueToRgb(t1, t2, hue - 2); return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; }; /***/ }), /***/ 95721: /***/ ((module) => { "use strict"; module.exports = function getBasicPropertyDescriptor(name) { return { set: function(v) { this._setProperty(name, v); }, get: function() { return this.getPropertyValue(name); }, enumerable: true, configurable: true, }; }; /***/ }), /***/ 57775: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule, MatcherList: __webpack_require__(81519).MatcherList }; ///CommonJS /** * @constructor * @see https://developer.mozilla.org/en/CSS/@-moz-document */ CSSOM.CSSDocumentRule = function CSSDocumentRule() { CSSOM.CSSRule.call(this); this.matcher = new CSSOM.MatcherList(); this.cssRules = []; }; CSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule; CSSOM.CSSDocumentRule.prototype.type = 10; //FIXME //CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSDocumentRule = CSSOM.CSSDocumentRule; ///CommonJS /***/ }), /***/ 934: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSStyleDeclaration: __webpack_require__(21449).CSSStyleDeclaration, CSSRule: __webpack_require__(24994).CSSRule }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule */ CSSOM.CSSFontFaceRule = function CSSFontFaceRule() { CSSOM.CSSRule.call(this); this.style = new CSSOM.CSSStyleDeclaration(); this.style.parentRule = this; }; CSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule; CSSOM.CSSFontFaceRule.prototype.type = 5; //FIXME //CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", { get: function() { return "@font-face {" + this.style.cssText + "}"; } }); //.CommonJS exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule; ///CommonJS /***/ }), /***/ 80576: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/shadow-dom/#host-at-rule */ CSSOM.CSSHostRule = function CSSHostRule() { CSSOM.CSSRule.call(this); this.cssRules = []; }; CSSOM.CSSHostRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule; CSSOM.CSSHostRule.prototype.type = 1001; //FIXME //CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@host {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSHostRule = CSSOM.CSSHostRule; ///CommonJS /***/ }), /***/ 15339: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule, CSSStyleSheet: __webpack_require__(28050).CSSStyleSheet, MediaList: __webpack_require__(77326).MediaList }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#cssimportrule * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule */ CSSOM.CSSImportRule = function CSSImportRule() { CSSOM.CSSRule.call(this); this.href = ""; this.media = new CSSOM.MediaList(); this.styleSheet = new CSSOM.CSSStyleSheet(); }; CSSOM.CSSImportRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule; CSSOM.CSSImportRule.prototype.type = 3; Object.defineProperty(CSSOM.CSSImportRule.prototype, "cssText", { get: function() { var mediaText = this.media.mediaText; return "@import url(" + this.href + ")" + (mediaText ? " " + mediaText : "") + ";"; }, set: function(cssText) { var i = 0; /** * @import url(partial.css) screen, handheld; * || | * after-import media * | * url */ var state = ''; var buffer = ''; var index; for (var character; (character = cssText.charAt(i)); i++) { switch (character) { case ' ': case '\t': case '\r': case '\n': case '\f': if (state === 'after-import') { state = 'url'; } else { buffer += character; } break; case '@': if (!state && cssText.indexOf('@import', i) === i) { state = 'after-import'; i += 'import'.length; buffer = ''; } break; case 'u': if (state === 'url' && cssText.indexOf('url(', i) === i) { index = cssText.indexOf(')', i + 1); if (index === -1) { throw i + ': ")" not found'; } i += 'url('.length; var url = cssText.slice(i, index); if (url[0] === url[url.length - 1]) { if (url[0] === '"' || url[0] === "'") { url = url.slice(1, -1); } } this.href = url; i = index; state = 'media'; } break; case '"': if (state === 'url') { index = cssText.indexOf('"', i + 1); if (!index) { throw i + ": '\"' not found"; } this.href = cssText.slice(i + 1, index); i = index; state = 'media'; } break; case "'": if (state === 'url') { index = cssText.indexOf("'", i + 1); if (!index) { throw i + ': "\'" not found'; } this.href = cssText.slice(i + 1, index); i = index; state = 'media'; } break; case ';': if (state === 'media') { if (buffer) { this.media.mediaText = buffer.trim(); } } break; default: if (state === 'media') { buffer += character; } break; } } } }); //.CommonJS exports.CSSImportRule = CSSOM.CSSImportRule; ///CommonJS /***/ }), /***/ 8308: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule, CSSStyleDeclaration: __webpack_require__(21449).CSSStyleDeclaration }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule */ CSSOM.CSSKeyframeRule = function CSSKeyframeRule() { CSSOM.CSSRule.call(this); this.keyText = ''; this.style = new CSSOM.CSSStyleDeclaration(); this.style.parentRule = this; }; CSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule; CSSOM.CSSKeyframeRule.prototype.type = 9; //FIXME //CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp Object.defineProperty(CSSOM.CSSKeyframeRule.prototype, "cssText", { get: function() { return this.keyText + " {" + this.style.cssText + "} "; } }); //.CommonJS exports.CSSKeyframeRule = CSSOM.CSSKeyframeRule; ///CommonJS /***/ }), /***/ 53702: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule */ CSSOM.CSSKeyframesRule = function CSSKeyframesRule() { CSSOM.CSSRule.call(this); this.name = ''; this.cssRules = []; }; CSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule; CSSOM.CSSKeyframesRule.prototype.type = 8; //FIXME //CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp Object.defineProperty(CSSOM.CSSKeyframesRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(" " + this.cssRules[i].cssText); } return "@" + (this._vendorPrefix || '') + "keyframes " + this.name + " { \n" + cssTexts.join("\n") + "\n}"; } }); //.CommonJS exports.CSSKeyframesRule = CSSOM.CSSKeyframesRule; ///CommonJS /***/ }), /***/ 60365: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule, MediaList: __webpack_require__(77326).MediaList }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#cssmediarule * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule */ CSSOM.CSSMediaRule = function CSSMediaRule() { CSSOM.CSSRule.call(this); this.media = new CSSOM.MediaList(); this.cssRules = []; }; CSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule; CSSOM.CSSMediaRule.prototype.type = 4; //FIXME //CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; //CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; // http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp Object.defineProperty(CSSOM.CSSMediaRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i=0, length=this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSMediaRule = CSSOM.CSSMediaRule; ///CommonJS /***/ }), /***/ 24994: /***/ ((__unused_webpack_module, exports) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule */ CSSOM.CSSRule = function CSSRule() { this.parentRule = null; this.parentStyleSheet = null; }; CSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete CSSOM.CSSRule.STYLE_RULE = 1; CSSOM.CSSRule.CHARSET_RULE = 2; // obsolete CSSOM.CSSRule.IMPORT_RULE = 3; CSSOM.CSSRule.MEDIA_RULE = 4; CSSOM.CSSRule.FONT_FACE_RULE = 5; CSSOM.CSSRule.PAGE_RULE = 6; CSSOM.CSSRule.KEYFRAMES_RULE = 7; CSSOM.CSSRule.KEYFRAME_RULE = 8; CSSOM.CSSRule.MARGIN_RULE = 9; CSSOM.CSSRule.NAMESPACE_RULE = 10; CSSOM.CSSRule.COUNTER_STYLE_RULE = 11; CSSOM.CSSRule.SUPPORTS_RULE = 12; CSSOM.CSSRule.DOCUMENT_RULE = 13; CSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14; CSSOM.CSSRule.VIEWPORT_RULE = 15; CSSOM.CSSRule.REGION_STYLE_RULE = 16; CSSOM.CSSRule.prototype = { constructor: CSSOM.CSSRule //FIXME }; //.CommonJS exports.CSSRule = CSSOM.CSSRule; ///CommonJS /***/ }), /***/ 21449: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration */ CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){ this.length = 0; this.parentRule = null; // NON-STANDARD this._importants = {}; }; CSSOM.CSSStyleDeclaration.prototype = { constructor: CSSOM.CSSStyleDeclaration, /** * * @param {string} name * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue * @return {string} the value of the property if it has been explicitly set for this declaration block. * Returns the empty string if the property has not been set. */ getPropertyValue: function(name) { return this[name] || ""; }, /** * * @param {string} name * @param {string} value * @param {string} [priority=null] "important" or null * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty */ setProperty: function(name, value, priority) { if (this[name]) { // Property already exist. Overwrite it. var index = Array.prototype.indexOf.call(this, name); if (index < 0) { this[this.length] = name; this.length++; } } else { // New property. this[this.length] = name; this.length++; } this[name] = value + ""; this._importants[name] = priority; }, /** * * @param {string} name * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty * @return {string} the value of the property if it has been explicitly set for this declaration block. * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. */ removeProperty: function(name) { if (!(name in this)) { return ""; } var index = Array.prototype.indexOf.call(this, name); if (index < 0) { return ""; } var prevValue = this[name]; this[name] = ""; // That's what WebKit and Opera do Array.prototype.splice.call(this, index, 1); // That's what Firefox does //this[index] = "" return prevValue; }, getPropertyCSSValue: function() { //FIXME }, /** * * @param {String} name */ getPropertyPriority: function(name) { return this._importants[name] || ""; }, /** * element.style.overflow = "auto" * element.style.getPropertyShorthand("overflow-x") * -> "overflow" */ getPropertyShorthand: function() { //FIXME }, isPropertyImplicit: function() { //FIXME }, // Doesn't work in IE < 9 get cssText(){ var properties = []; for (var i=0, length=this.length; i < length; ++i) { var name = this[i]; var value = this.getPropertyValue(name); var priority = this.getPropertyPriority(name); if (priority) { priority = " !" + priority; } properties[i] = name + ": " + value + priority + ";"; } return properties.join(" "); }, set cssText(text){ var i, name; for (i = this.length; i--;) { name = this[i]; this[name] = ""; } Array.prototype.splice.call(this, 0, this.length); this._importants = {}; var dummyRule = CSSOM.parse('#bogus{' + text + '}').cssRules[0].style; var length = dummyRule.length; for (i = 0; i < length; ++i) { name = dummyRule[i]; this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name)); } } }; //.CommonJS exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration; CSSOM.parse = __webpack_require__(90268).parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js ///CommonJS /***/ }), /***/ 57732: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSStyleDeclaration: __webpack_require__(21449).CSSStyleDeclaration, CSSRule: __webpack_require__(24994).CSSRule }; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#cssstylerule * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule */ CSSOM.CSSStyleRule = function CSSStyleRule() { CSSOM.CSSRule.call(this); this.selectorText = ""; this.style = new CSSOM.CSSStyleDeclaration(); this.style.parentRule = this; }; CSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule; CSSOM.CSSStyleRule.prototype.type = 1; Object.defineProperty(CSSOM.CSSStyleRule.prototype, "cssText", { get: function() { var text; if (this.selectorText) { text = this.selectorText + " {" + this.style.cssText + "}"; } else { text = ""; } return text; }, set: function(cssText) { var rule = CSSOM.CSSStyleRule.parse(cssText); this.style = rule.style; this.selectorText = rule.selectorText; } }); /** * NON-STANDARD * lightweight version of parse.js. * @param {string} ruleText * @return CSSStyleRule */ CSSOM.CSSStyleRule.parse = function(ruleText) { var i = 0; var state = "selector"; var index; var j = i; var buffer = ""; var SIGNIFICANT_WHITESPACE = { "selector": true, "value": true }; var styleRule = new CSSOM.CSSStyleRule(); var name, priority=""; for (var character; (character = ruleText.charAt(i)); i++) { switch (character) { case " ": case "\t": case "\r": case "\n": case "\f": if (SIGNIFICANT_WHITESPACE[state]) { // Squash 2 or more white-spaces in the row into 1 switch (ruleText.charAt(i - 1)) { case " ": case "\t": case "\r": case "\n": case "\f": break; default: buffer += " "; break; } } break; // String case '"': j = i + 1; index = ruleText.indexOf('"', j) + 1; if (!index) { throw '" is missing'; } buffer += ruleText.slice(i, index); i = index - 1; break; case "'": j = i + 1; index = ruleText.indexOf("'", j) + 1; if (!index) { throw "' is missing"; } buffer += ruleText.slice(i, index); i = index - 1; break; // Comment case "/": if (ruleText.charAt(i + 1) === "*") { i += 2; index = ruleText.indexOf("*/", i); if (index === -1) { throw new SyntaxError("Missing */"); } else { i = index + 1; } } else { buffer += character; } break; case "{": if (state === "selector") { styleRule.selectorText = buffer.trim(); buffer = ""; state = "name"; } break; case ":": if (state === "name") { name = buffer.trim(); buffer = ""; state = "value"; } else { buffer += character; } break; case "!": if (state === "value" && ruleText.indexOf("!important", i) === i) { priority = "important"; i += "important".length; } else { buffer += character; } break; case ";": if (state === "value") { styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; buffer = ""; state = "name"; } else { buffer += character; } break; case "}": if (state === "value") { styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; buffer = ""; } else if (state === "name") { break; } else { buffer += character; } state = "selector"; break; default: buffer += character; break; } } return styleRule; }; //.CommonJS exports.CSSStyleRule = CSSOM.CSSStyleRule; ///CommonJS /***/ }), /***/ 28050: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { StyleSheet: __webpack_require__(98847).StyleSheet, CSSStyleRule: __webpack_require__(57732).CSSStyleRule }; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet */ CSSOM.CSSStyleSheet = function CSSStyleSheet() { CSSOM.StyleSheet.call(this); this.cssRules = []; }; CSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet(); CSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet; /** * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade. * * sheet = new Sheet("body {margin: 0}") * sheet.toString() * -> "body{margin:0;}" * sheet.insertRule("img {border: none}", 0) * -> 0 * sheet.toString() * -> "img{border:none;}body{margin:0;}" * * @param {string} rule * @param {number} index * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule * @return {number} The index within the style sheet's rule collection of the newly inserted rule. */ CSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) { if (index < 0 || index > this.cssRules.length) { throw new RangeError("INDEX_SIZE_ERR"); } var cssRule = CSSOM.parse(rule).cssRules[0]; cssRule.parentStyleSheet = this; this.cssRules.splice(index, 0, cssRule); return index; }; /** * Used to delete a rule from the style sheet. * * sheet = new Sheet("img{border:none} body{margin:0}") * sheet.toString() * -> "img{border:none;}body{margin:0;}" * sheet.deleteRule(0) * sheet.toString() * -> "body{margin:0;}" * * @param {number} index within the style sheet's rule list of the rule to remove. * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule */ CSSOM.CSSStyleSheet.prototype.deleteRule = function(index) { if (index < 0 || index >= this.cssRules.length) { throw new RangeError("INDEX_SIZE_ERR"); } this.cssRules.splice(index, 1); }; /** * NON-STANDARD * @return {string} serialize stylesheet */ CSSOM.CSSStyleSheet.prototype.toString = function() { var result = ""; var rules = this.cssRules; for (var i=0; i { //.CommonJS var CSSOM = { CSSRule: __webpack_require__(24994).CSSRule, }; ///CommonJS /** * @constructor * @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface */ CSSOM.CSSSupportsRule = function CSSSupportsRule() { CSSOM.CSSRule.call(this); this.conditionText = ''; this.cssRules = []; }; CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSRule(); CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule; CSSOM.CSSSupportsRule.prototype.type = 12; Object.defineProperty(CSSOM.CSSSupportsRule.prototype, "cssText", { get: function() { var cssTexts = []; for (var i = 0, length = this.cssRules.length; i < length; i++) { cssTexts.push(this.cssRules[i].cssText); } return "@supports " + this.conditionText + " {" + cssTexts.join("") + "}"; } }); //.CommonJS exports.CSSSupportsRule = CSSOM.CSSSupportsRule; ///CommonJS /***/ }), /***/ 99880: /***/ ((__unused_webpack_module, exports) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue * * TODO: add if needed */ CSSOM.CSSValue = function CSSValue() { }; CSSOM.CSSValue.prototype = { constructor: CSSOM.CSSValue, // @see: http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue set cssText(text) { var name = this._getConstructorName(); throw new Error('DOMException: property "cssText" of "' + name + '" is readonly and can not be replaced with "' + text + '"!'); }, get cssText() { var name = this._getConstructorName(); throw new Error('getter "cssText" of "' + name + '" is not implemented!'); }, _getConstructorName: function() { var s = this.constructor.toString(), c = s.match(/function\s([^\(]+)/), name = c[1]; return name; } }; //.CommonJS exports.CSSValue = CSSOM.CSSValue; ///CommonJS /***/ }), /***/ 56356: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSValue: __webpack_require__(99880).CSSValue }; ///CommonJS /** * @constructor * @see http://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx * */ CSSOM.CSSValueExpression = function CSSValueExpression(token, idx) { this._token = token; this._idx = idx; }; CSSOM.CSSValueExpression.prototype = new CSSOM.CSSValue(); CSSOM.CSSValueExpression.prototype.constructor = CSSOM.CSSValueExpression; /** * parse css expression() value * * @return {Object} * - error: * or * - idx: * - expression: * * Example: * * .selector { * zoom: expression(documentElement.clientWidth > 1000 ? '1000px' : 'auto'); * } */ CSSOM.CSSValueExpression.prototype.parse = function() { var token = this._token, idx = this._idx; var character = '', expression = '', error = '', info, paren = []; for (; ; ++idx) { character = token.charAt(idx); // end of token if (character === '') { error = 'css expression error: unfinished expression!'; break; } switch(character) { case '(': paren.push(character); expression += character; break; case ')': paren.pop(character); expression += character; break; case '/': if ((info = this._parseJSComment(token, idx))) { // comment? if (info.error) { error = 'css expression error: unfinished comment in expression!'; } else { idx = info.idx; // ignore the comment } } else if ((info = this._parseJSRexExp(token, idx))) { // regexp idx = info.idx; expression += info.text; } else { // other expression += character; } break; case "'": case '"': info = this._parseJSString(token, idx, character); if (info) { // string idx = info.idx; expression += info.text; } else { expression += character; } break; default: expression += character; break; } if (error) { break; } // end of expression if (paren.length === 0) { break; } } var ret; if (error) { ret = { error: error }; } else { ret = { idx: idx, expression: expression }; } return ret; }; /** * * @return {Object|false} * - idx: * - text: * or * - error: * or * false * */ CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) { var nextChar = token.charAt(idx + 1), text; if (nextChar === '/' || nextChar === '*') { var startIdx = idx, endIdx, commentEndChar; if (nextChar === '/') { // line comment commentEndChar = '\n'; } else if (nextChar === '*') { // block comment commentEndChar = '*/'; } endIdx = token.indexOf(commentEndChar, startIdx + 1 + 1); if (endIdx !== -1) { endIdx = endIdx + commentEndChar.length - 1; text = token.substring(idx, endIdx + 1); return { idx: endIdx, text: text }; } else { var error = 'css expression error: unfinished comment in expression!'; return { error: error }; } } else { return false; } }; /** * * @return {Object|false} * - idx: * - text: * or * false * */ CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) { var endIdx = this._findMatchedIdx(token, idx, sep), text; if (endIdx === -1) { return false; } else { text = token.substring(idx, endIdx + sep.length); return { idx: endIdx, text: text }; } }; /** * parse regexp in css expression * * @return {Object|false} * - idx: * - regExp: * or * false */ /* all legal RegExp /a/ (/a/) [/a/] [12, /a/] !/a/ +/a/ -/a/ * /a/ / /a/ %/a/ ===/a/ !==/a/ ==/a/ !=/a/ >/a/ >=/a/ >/a/ >>>/a/ &&/a/ ||/a/ ?/a/ =/a/ ,/a/ delete /a/ in /a/ instanceof /a/ new /a/ typeof /a/ void /a/ */ CSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) { var before = token.substring(0, idx).replace(/\s+$/, ""), legalRegx = [ /^$/, /\($/, /\[$/, /\!$/, /\+$/, /\-$/, /\*$/, /\/\s+/, /\%$/, /\=$/, /\>$/, /<$/, /\&$/, /\|$/, /\^$/, /\~$/, /\?$/, /\,$/, /delete$/, /in$/, /instanceof$/, /new$/, /typeof$/, /void$/ ]; var isLegal = legalRegx.some(function(reg) { return reg.test(before); }); if (!isLegal) { return false; } else { var sep = '/'; // same logic as string return this._parseJSString(token, idx, sep); } }; /** * * find next sep(same line) index in `token` * * @return {Number} * */ CSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) { var startIdx = idx, endIdx; var NOT_FOUND = -1; while(true) { endIdx = token.indexOf(sep, startIdx + 1); if (endIdx === -1) { // not found endIdx = NOT_FOUND; break; } else { var text = token.substring(idx + 1, endIdx), matched = text.match(/\\+$/); if (!matched || matched[0] % 2 === 0) { // not escaped break; } else { startIdx = endIdx; } } } // boundary must be in the same line(js sting or regexp) var nextNewLineIdx = token.indexOf('\n', idx + 1); if (nextNewLineIdx < endIdx) { endIdx = NOT_FOUND; } return endIdx; }; //.CommonJS exports.CSSValueExpression = CSSOM.CSSValueExpression; ///CommonJS /***/ }), /***/ 81519: /***/ ((__unused_webpack_module, exports) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see https://developer.mozilla.org/en/CSS/@-moz-document */ CSSOM.MatcherList = function MatcherList(){ this.length = 0; }; CSSOM.MatcherList.prototype = { constructor: CSSOM.MatcherList, /** * @return {string} */ get matcherText() { return Array.prototype.join.call(this, ", "); }, /** * @param {string} value */ set matcherText(value) { // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','. var values = value.split(","); var length = this.length = values.length; for (var i=0; i { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#the-medialist-interface */ CSSOM.MediaList = function MediaList(){ this.length = 0; }; CSSOM.MediaList.prototype = { constructor: CSSOM.MediaList, /** * @return {string} */ get mediaText() { return Array.prototype.join.call(this, ", "); }, /** * @param {string} value */ set mediaText(value) { var values = value.split(","); var length = this.length = values.length; for (var i=0; i { //.CommonJS var CSSOM = {}; ///CommonJS /** * @constructor * @see http://dev.w3.org/csswg/cssom/#the-stylesheet-interface */ CSSOM.StyleSheet = function StyleSheet() { this.parentStyleSheet = null; }; //.CommonJS exports.StyleSheet = CSSOM.StyleSheet; ///CommonJS /***/ }), /***/ 13833: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = { CSSStyleSheet: __webpack_require__(28050).CSSStyleSheet, CSSStyleRule: __webpack_require__(57732).CSSStyleRule, CSSMediaRule: __webpack_require__(60365).CSSMediaRule, CSSSupportsRule: __webpack_require__(92243).CSSSupportsRule, CSSStyleDeclaration: __webpack_require__(21449).CSSStyleDeclaration, CSSKeyframeRule: __webpack_require__(8308).CSSKeyframeRule, CSSKeyframesRule: __webpack_require__(53702).CSSKeyframesRule }; ///CommonJS /** * Produces a deep copy of stylesheet — the instance variables of stylesheet are copied recursively. * @param {CSSStyleSheet|CSSOM.CSSStyleSheet} stylesheet * @nosideeffects * @return {CSSOM.CSSStyleSheet} */ CSSOM.clone = function clone(stylesheet) { var cloned = new CSSOM.CSSStyleSheet(); var rules = stylesheet.cssRules; if (!rules) { return cloned; } var RULE_TYPES = { 1: CSSOM.CSSStyleRule, 4: CSSOM.CSSMediaRule, //3: CSSOM.CSSImportRule, //5: CSSOM.CSSFontFaceRule, //6: CSSOM.CSSPageRule, 8: CSSOM.CSSKeyframesRule, 9: CSSOM.CSSKeyframeRule, 12: CSSOM.CSSSupportsRule }; for (var i=0, rulesLength=rules.length; i < rulesLength; i++) { var rule = rules[i]; var ruleClone = cloned.cssRules[i] = new RULE_TYPES[rule.type](); var style = rule.style; if (style) { var styleClone = ruleClone.style = new CSSOM.CSSStyleDeclaration(); for (var j=0, styleLength=style.length; j < styleLength; j++) { var name = styleClone[j] = style[j]; styleClone[name] = style[name]; styleClone._importants[name] = style.getPropertyPriority(name); } styleClone.length = style.length; } if (rule.hasOwnProperty('keyText')) { ruleClone.keyText = rule.keyText; } if (rule.hasOwnProperty('selectorText')) { ruleClone.selectorText = rule.selectorText; } if (rule.hasOwnProperty('mediaText')) { ruleClone.mediaText = rule.mediaText; } if (rule.hasOwnProperty('conditionText')) { ruleClone.conditionText = rule.conditionText; } if (rule.hasOwnProperty('cssRules')) { ruleClone.cssRules = clone(rule).cssRules; } } return cloned; }; //.CommonJS exports.clone = CSSOM.clone; ///CommonJS /***/ }), /***/ 8331: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; exports.CSSStyleDeclaration = __webpack_require__(21449).CSSStyleDeclaration; exports.CSSRule = __webpack_require__(24994).CSSRule; exports.CSSStyleRule = __webpack_require__(57732).CSSStyleRule; exports.MediaList = __webpack_require__(77326).MediaList; exports.CSSMediaRule = __webpack_require__(60365).CSSMediaRule; exports.CSSSupportsRule = __webpack_require__(92243).CSSSupportsRule; exports.CSSImportRule = __webpack_require__(15339).CSSImportRule; exports.CSSFontFaceRule = __webpack_require__(934).CSSFontFaceRule; exports.CSSHostRule = __webpack_require__(80576).CSSHostRule; exports.StyleSheet = __webpack_require__(98847).StyleSheet; exports.CSSStyleSheet = __webpack_require__(28050).CSSStyleSheet; exports.CSSKeyframesRule = __webpack_require__(53702).CSSKeyframesRule; exports.CSSKeyframeRule = __webpack_require__(8308).CSSKeyframeRule; exports.MatcherList = __webpack_require__(81519).MatcherList; exports.CSSDocumentRule = __webpack_require__(57775).CSSDocumentRule; exports.CSSValue = __webpack_require__(99880).CSSValue; exports.CSSValueExpression = __webpack_require__(56356).CSSValueExpression; exports.parse = __webpack_require__(90268).parse; exports.clone = __webpack_require__(13833).clone; /***/ }), /***/ 90268: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { //.CommonJS var CSSOM = {}; ///CommonJS /** * @param {string} token */ CSSOM.parse = function parse(token) { var i = 0; /** "before-selector" or "selector" or "atRule" or "atBlock" or "conditionBlock" or "before-name" or "name" or "before-value" or "value" */ var state = "before-selector"; var index; var buffer = ""; var valueParenthesisDepth = 0; var SIGNIFICANT_WHITESPACE = { "selector": true, "value": true, "value-parenthesis": true, "atRule": true, "importRule-begin": true, "importRule": true, "atBlock": true, "conditionBlock": true, 'documentRule-begin': true }; var styleSheet = new CSSOM.CSSStyleSheet(); // @type CSSStyleSheet|CSSMediaRule|CSSSupportsRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule var currentScope = styleSheet; // @type CSSMediaRule|CSSSupportsRule|CSSKeyframesRule|CSSDocumentRule var parentRule; var ancestorRules = []; var hasAncestors = false; var prevScope; var name, priority="", styleRule, mediaRule, supportsRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule; var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g; var parseError = function(message) { var lines = token.substring(0, i).split('\n'); var lineCount = lines.length; var charCount = lines.pop().length + 1; var error = new Error(message + ' (line ' + lineCount + ', char ' + charCount + ')'); error.line = lineCount; /* jshint sub : true */ error['char'] = charCount; error.styleSheet = styleSheet; throw error; }; for (var character; (character = token.charAt(i)); i++) { switch (character) { case " ": case "\t": case "\r": case "\n": case "\f": if (SIGNIFICANT_WHITESPACE[state]) { buffer += character; } break; // String case '"': index = i + 1; do { index = token.indexOf('"', index) + 1; if (!index) { parseError('Unmatched "'); } } while (token[index - 2] === '\\'); buffer += token.slice(i, index); i = index - 1; switch (state) { case 'before-value': state = 'value'; break; case 'importRule-begin': state = 'importRule'; break; } break; case "'": index = i + 1; do { index = token.indexOf("'", index) + 1; if (!index) { parseError("Unmatched '"); } } while (token[index - 2] === '\\'); buffer += token.slice(i, index); i = index - 1; switch (state) { case 'before-value': state = 'value'; break; case 'importRule-begin': state = 'importRule'; break; } break; // Comment case "/": if (token.charAt(i + 1) === "*") { i += 2; index = token.indexOf("*/", i); if (index === -1) { parseError("Missing */"); } else { i = index + 1; } } else { buffer += character; } if (state === "importRule-begin") { buffer += " "; state = "importRule"; } break; // At-rule case "@": if (token.indexOf("@-moz-document", i) === i) { state = "documentRule-begin"; documentRule = new CSSOM.CSSDocumentRule(); documentRule.__starts = i; i += "-moz-document".length; buffer = ""; break; } else if (token.indexOf("@media", i) === i) { state = "atBlock"; mediaRule = new CSSOM.CSSMediaRule(); mediaRule.__starts = i; i += "media".length; buffer = ""; break; } else if (token.indexOf("@supports", i) === i) { state = "conditionBlock"; supportsRule = new CSSOM.CSSSupportsRule(); supportsRule.__starts = i; i += "supports".length; buffer = ""; break; } else if (token.indexOf("@host", i) === i) { state = "hostRule-begin"; i += "host".length; hostRule = new CSSOM.CSSHostRule(); hostRule.__starts = i; buffer = ""; break; } else if (token.indexOf("@import", i) === i) { state = "importRule-begin"; i += "import".length; buffer += "@import"; break; } else if (token.indexOf("@font-face", i) === i) { state = "fontFaceRule-begin"; i += "font-face".length; fontFaceRule = new CSSOM.CSSFontFaceRule(); fontFaceRule.__starts = i; buffer = ""; break; } else { atKeyframesRegExp.lastIndex = i; var matchKeyframes = atKeyframesRegExp.exec(token); if (matchKeyframes && matchKeyframes.index === i) { state = "keyframesRule-begin"; keyframesRule = new CSSOM.CSSKeyframesRule(); keyframesRule.__starts = i; keyframesRule._vendorPrefix = matchKeyframes[1]; // Will come out as undefined if no prefix was found i += matchKeyframes[0].length - 1; buffer = ""; break; } else if (state === "selector") { state = "atRule"; } } buffer += character; break; case "{": if (state === "selector" || state === "atRule") { styleRule.selectorText = buffer.trim(); styleRule.style.__starts = i; buffer = ""; state = "before-name"; } else if (state === "atBlock") { mediaRule.media.mediaText = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); } currentScope = parentRule = mediaRule; mediaRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "conditionBlock") { supportsRule.conditionText = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); } currentScope = parentRule = supportsRule; supportsRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "hostRule-begin") { if (parentRule) { ancestorRules.push(parentRule); } currentScope = parentRule = hostRule; hostRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "fontFaceRule-begin") { if (parentRule) { ancestorRules.push(parentRule); fontFaceRule.parentRule = parentRule; } fontFaceRule.parentStyleSheet = styleSheet; styleRule = fontFaceRule; buffer = ""; state = "before-name"; } else if (state === "keyframesRule-begin") { keyframesRule.name = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); keyframesRule.parentRule = parentRule; } keyframesRule.parentStyleSheet = styleSheet; currentScope = parentRule = keyframesRule; buffer = ""; state = "keyframeRule-begin"; } else if (state === "keyframeRule-begin") { styleRule = new CSSOM.CSSKeyframeRule(); styleRule.keyText = buffer.trim(); styleRule.__starts = i; buffer = ""; state = "before-name"; } else if (state === "documentRule-begin") { // FIXME: what if this '{' is in the url text of the match function? documentRule.matcher.matcherText = buffer.trim(); if (parentRule) { ancestorRules.push(parentRule); documentRule.parentRule = parentRule; } currentScope = parentRule = documentRule; documentRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } break; case ":": if (state === "name") { name = buffer.trim(); buffer = ""; state = "before-value"; } else { buffer += character; } break; case "(": if (state === 'value') { // ie css expression mode if (buffer.trim() === 'expression') { var info = (new CSSOM.CSSValueExpression(token, i)).parse(); if (info.error) { parseError(info.error); } else { buffer += info.expression; i = info.idx; } } else { state = 'value-parenthesis'; //always ensure this is reset to 1 on transition //from value to value-parenthesis valueParenthesisDepth = 1; buffer += character; } } else if (state === 'value-parenthesis') { valueParenthesisDepth++; buffer += character; } else { buffer += character; } break; case ")": if (state === 'value-parenthesis') { valueParenthesisDepth--; if (valueParenthesisDepth === 0) state = 'value'; } buffer += character; break; case "!": if (state === "value" && token.indexOf("!important", i) === i) { priority = "important"; i += "important".length; } else { buffer += character; } break; case ";": switch (state) { case "value": styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; buffer = ""; state = "before-name"; break; case "atRule": buffer = ""; state = "before-selector"; break; case "importRule": importRule = new CSSOM.CSSImportRule(); importRule.parentStyleSheet = importRule.styleSheet.parentStyleSheet = styleSheet; importRule.cssText = buffer + character; styleSheet.cssRules.push(importRule); buffer = ""; state = "before-selector"; break; default: buffer += character; break; } break; case "}": switch (state) { case "value": styleRule.style.setProperty(name, buffer.trim(), priority); priority = ""; /* falls through */ case "before-name": case "name": styleRule.__ends = i + 1; if (parentRule) { styleRule.parentRule = parentRule; } styleRule.parentStyleSheet = styleSheet; currentScope.cssRules.push(styleRule); buffer = ""; if (currentScope.constructor === CSSOM.CSSKeyframesRule) { state = "keyframeRule-begin"; } else { state = "before-selector"; } break; case "keyframeRule-begin": case "before-selector": case "selector": // End of media/supports/document rule. if (!parentRule) { parseError("Unexpected }"); } // Handle rules nested in @media or @supports hasAncestors = ancestorRules.length > 0; while (ancestorRules.length > 0) { parentRule = ancestorRules.pop(); if ( parentRule.constructor.name === "CSSMediaRule" || parentRule.constructor.name === "CSSSupportsRule" ) { prevScope = currentScope; currentScope = parentRule; currentScope.cssRules.push(prevScope); break; } if (ancestorRules.length === 0) { hasAncestors = false; } } if (!hasAncestors) { currentScope.__ends = i + 1; styleSheet.cssRules.push(currentScope); currentScope = styleSheet; parentRule = null; } buffer = ""; state = "before-selector"; break; } break; default: switch (state) { case "before-selector": state = "selector"; styleRule = new CSSOM.CSSStyleRule(); styleRule.__starts = i; break; case "before-name": state = "name"; break; case "before-value": state = "value"; break; case "importRule-begin": state = "importRule"; break; } buffer += character; break; } } return styleSheet; }; //.CommonJS exports.parse = CSSOM.parse; // The following modules cannot be included sooner due to the mutual dependency with parse.js CSSOM.CSSStyleSheet = __webpack_require__(28050).CSSStyleSheet; CSSOM.CSSStyleRule = __webpack_require__(57732).CSSStyleRule; CSSOM.CSSImportRule = __webpack_require__(15339).CSSImportRule; CSSOM.CSSMediaRule = __webpack_require__(60365).CSSMediaRule; CSSOM.CSSSupportsRule = __webpack_require__(92243).CSSSupportsRule; CSSOM.CSSFontFaceRule = __webpack_require__(934).CSSFontFaceRule; CSSOM.CSSHostRule = __webpack_require__(80576).CSSHostRule; CSSOM.CSSStyleDeclaration = __webpack_require__(21449).CSSStyleDeclaration; CSSOM.CSSKeyframeRule = __webpack_require__(8308).CSSKeyframeRule; CSSOM.CSSKeyframesRule = __webpack_require__(53702).CSSKeyframesRule; CSSOM.CSSValueExpression = __webpack_require__(56356).CSSValueExpression; CSSOM.CSSDocumentRule = __webpack_require__(57775).CSSDocumentRule; ///CommonJS /***/ }), /***/ 18326: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const MIMEType = __webpack_require__(59488); const { parseURL, serializeURL } = __webpack_require__(66365); const { stripLeadingAndTrailingASCIIWhitespace, stringPercentDecode, isomorphicDecode, forgivingBase64Decode } = __webpack_require__(5505); module.exports = stringInput => { const urlRecord = parseURL(stringInput); if (urlRecord === null) { return null; } return module.exports.fromURLRecord(urlRecord); }; module.exports.fromURLRecord = urlRecord => { if (urlRecord.scheme !== "data") { return null; } const input = serializeURL(urlRecord, true).substring("data:".length); let position = 0; let mimeType = ""; while (position < input.length && input[position] !== ",") { mimeType += input[position]; ++position; } mimeType = stripLeadingAndTrailingASCIIWhitespace(mimeType); if (position === input.length) { return null; } ++position; const encodedBody = input.substring(position); let body = stringPercentDecode(encodedBody); // Can't use /i regexp flag because it isn't restricted to ASCII. const mimeTypeBase64MatchResult = /(.*); *[Bb][Aa][Ss][Ee]64$/.exec(mimeType); if (mimeTypeBase64MatchResult) { const stringBody = isomorphicDecode(body); body = forgivingBase64Decode(stringBody); if (body === null) { return null; } mimeType = mimeTypeBase64MatchResult[1]; } if (mimeType.startsWith(";")) { mimeType = "text/plain" + mimeType; } let mimeTypeRecord; try { mimeTypeRecord = new MIMEType(mimeType); } catch (e) { mimeTypeRecord = new MIMEType("text/plain;charset=US-ASCII"); } return { mimeType: mimeTypeRecord, body }; }; /***/ }), /***/ 5505: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; const { percentDecode } = __webpack_require__(66365); const { atob } = __webpack_require__(75696); exports.stripLeadingAndTrailingASCIIWhitespace = string => { return string.replace(/^[ \t\n\f\r]+/, "").replace(/[ \t\n\f\r]+$/, ""); }; exports.stringPercentDecode = input => { return percentDecode(Buffer.from(input, "utf-8")); }; exports.isomorphicDecode = input => { return input.toString("binary"); }; exports.forgivingBase64Decode = data => { const asString = atob(data); if (asString === null) { return null; } return Buffer.from(asString, "binary"); }; /***/ }), /***/ 49458: /***/ (function(module) { ;(function (globalScope) { 'use strict'; /* * decimal.js v10.2.1 * An arbitrary-precision Decimal type for JavaScript. * https://github.com/MikeMcl/decimal.js * Copyright (c) 2020 Michael Mclaughlin * MIT Licence */ // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // // The maximum exponent magnitude. // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`. var EXP_LIMIT = 9e15, // 0 to 9e15 // The limit on the value of `precision`, and on the value of the first argument to // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`. MAX_DIGITS = 1e9, // 0 to 1e9 // Base conversion alphabet. NUMERALS = '0123456789abcdef', // The natural logarithm of 10 (1025 digits). LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', // Pi (1025 digits). PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', // The initial configuration properties of the Decimal constructor. DEFAULTS = { // These values must be integers within the stated ranges (inclusive). // Most of these values can be changed at run-time using the `Decimal.config` method. // The maximum number of significant digits of the result of a calculation or base conversion. // E.g. `Decimal.config({ precision: 20 });` precision: 20, // 1 to MAX_DIGITS // The rounding mode used when rounding to `precision`. // // ROUND_UP 0 Away from zero. // ROUND_DOWN 1 Towards zero. // ROUND_CEIL 2 Towards +Infinity. // ROUND_FLOOR 3 Towards -Infinity. // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up. // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. // // E.g. // `Decimal.rounding = 4;` // `Decimal.rounding = Decimal.ROUND_HALF_UP;` rounding: 4, // 0 to 8 // The modulo mode used when calculating the modulus: a mod n. // The quotient (q = a / n) is calculated according to the corresponding rounding mode. // The remainder (r) is calculated as: r = a - n * q. // // UP 0 The remainder is positive if the dividend is negative, else is negative. // DOWN 1 The remainder has the same sign as the dividend (JavaScript %). // FLOOR 3 The remainder has the same sign as the divisor (Python %). // HALF_EVEN 6 The IEEE 754 remainder function. // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive. // // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian // division (9) are commonly used for the modulus operation. The other rounding modes can also // be used, but they may not give useful results. modulo: 1, // 0 to 9 // The exponent value at and beneath which `toString` returns exponential notation. // JavaScript numbers: -7 toExpNeg: -7, // 0 to -EXP_LIMIT // The exponent value at and above which `toString` returns exponential notation. // JavaScript numbers: 21 toExpPos: 21, // 0 to EXP_LIMIT // The minimum exponent value, beneath which underflow to zero occurs. // JavaScript numbers: -324 (5e-324) minE: -EXP_LIMIT, // -1 to -EXP_LIMIT // The maximum exponent value, above which overflow to Infinity occurs. // JavaScript numbers: 308 (1.7976931348623157e+308) maxE: EXP_LIMIT, // 1 to EXP_LIMIT // Whether to use cryptographically-secure random number generation, if available. crypto: false // true/false }, // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- // Decimal, inexact, noConflict, quadrant, external = true, decimalError = '[DecimalError] ', invalidArgument = decimalError + 'Invalid argument: ', precisionLimitExceeded = decimalError + 'Precision limit exceeded', cryptoUnavailable = decimalError + 'crypto unavailable', mathfloor = Math.floor, mathpow = Math.pow, isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, BASE = 1e7, LOG_BASE = 7, MAX_SAFE_INTEGER = 9007199254740991, LN10_PRECISION = LN10.length - 1, PI_PRECISION = PI.length - 1, // Decimal.prototype object P = { name: '[object Decimal]' }; // Decimal prototype methods /* * absoluteValue abs * ceil * comparedTo cmp * cosine cos * cubeRoot cbrt * decimalPlaces dp * dividedBy div * dividedToIntegerBy divToInt * equals eq * floor * greaterThan gt * greaterThanOrEqualTo gte * hyperbolicCosine cosh * hyperbolicSine sinh * hyperbolicTangent tanh * inverseCosine acos * inverseHyperbolicCosine acosh * inverseHyperbolicSine asinh * inverseHyperbolicTangent atanh * inverseSine asin * inverseTangent atan * isFinite * isInteger isInt * isNaN * isNegative isNeg * isPositive isPos * isZero * lessThan lt * lessThanOrEqualTo lte * logarithm log * [maximum] [max] * [minimum] [min] * minus sub * modulo mod * naturalExponential exp * naturalLogarithm ln * negated neg * plus add * precision sd * round * sine sin * squareRoot sqrt * tangent tan * times mul * toBinary * toDecimalPlaces toDP * toExponential * toFixed * toFraction * toHexadecimal toHex * toNearest * toNumber * toOctal * toPower pow * toPrecision * toSignificantDigits toSD * toString * truncated trunc * valueOf toJSON */ /* * Return a new Decimal whose value is the absolute value of this Decimal. * */ P.absoluteValue = P.abs = function () { var x = new this.constructor(this); if (x.s < 0) x.s = 1; return finalise(x); }; /* * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the * direction of positive Infinity. * */ P.ceil = function () { return finalise(new this.constructor(this), this.e + 1, 2); }; /* * Return * 1 if the value of this Decimal is greater than the value of `y`, * -1 if the value of this Decimal is less than the value of `y`, * 0 if they have the same value, * NaN if the value of either Decimal is NaN. * */ P.comparedTo = P.cmp = function (y) { var i, j, xdL, ydL, x = this, xd = x.d, yd = (y = new x.constructor(y)).d, xs = x.s, ys = y.s; // Either NaN or ±Infinity? if (!xd || !yd) { return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1; } // Either zero? if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0; // Signs differ? if (xs !== ys) return xs; // Compare exponents. if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1; xdL = xd.length; ydL = yd.length; // Compare digit by digit. for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) { if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; } // Compare lengths. return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; }; /* * Return a new Decimal whose value is the cosine of the value in radians of this Decimal. * * Domain: [-Infinity, Infinity] * Range: [-1, 1] * * cos(0) = 1 * cos(-0) = 1 * cos(Infinity) = NaN * cos(-Infinity) = NaN * cos(NaN) = NaN * */ P.cosine = P.cos = function () { var pr, rm, x = this, Ctor = x.constructor; if (!x.d) return new Ctor(NaN); // cos(0) = cos(-0) = 1 if (!x.d[0]) return new Ctor(1); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; Ctor.rounding = 1; x = cosine(Ctor, toLessThanHalfPi(Ctor, x)); Ctor.precision = pr; Ctor.rounding = rm; return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); }; /* * * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to * `precision` significant digits using rounding mode `rounding`. * * cbrt(0) = 0 * cbrt(-0) = -0 * cbrt(1) = 1 * cbrt(-1) = -1 * cbrt(N) = N * cbrt(-I) = -I * cbrt(I) = I * * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3)) * */ P.cubeRoot = P.cbrt = function () { var e, m, n, r, rep, s, sd, t, t3, t3plusx, x = this, Ctor = x.constructor; if (!x.isFinite() || x.isZero()) return new Ctor(x); external = false; // Initial estimate. s = x.s * mathpow(x.s * x, 1 / 3); // Math.cbrt underflow/overflow? // Pass x to Math.pow as integer, then adjust the exponent of the result. if (!s || Math.abs(s) == 1 / 0) { n = digitsToString(x.d); e = x.e; // Adjust n exponent so it is a multiple of 3 away from x exponent. if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00'); s = mathpow(n, 1 / 3); // Rarely, e may be one less than the result exponent value. e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)); if (s == 1 / 0) { n = '5e' + e; } else { n = s.toExponential(); n = n.slice(0, n.indexOf('e') + 1) + e; } r = new Ctor(n); r.s = x.s; } else { r = new Ctor(s.toString()); } sd = (e = Ctor.precision) + 3; // Halley's method. // TODO? Compare Newton's method. for (;;) { t = r; t3 = t.times(t).times(t); t3plusx = t3.plus(x); r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1); // TODO? Replace with for-loop and checkRoundingDigits. if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { n = n.slice(sd - 3, sd + 1); // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999 // , i.e. approaching a rounding boundary, continue the iteration. if (n == '9999' || !rep && n == '4999') { // On the first iteration only, check to see if rounding up gives the exact result as the // nines may infinitely repeat. if (!rep) { finalise(t, e + 1, 0); if (t.times(t).times(t).eq(x)) { r = t; break; } } sd += 4; rep = 1; } else { // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. // If not, then there are further digits and m will be truthy. if (!+n || !+n.slice(1) && n.charAt(0) == '5') { // Truncate to the first rounding digit. finalise(r, e + 1, 1); m = !r.times(r).times(r).eq(x); } break; } } } external = true; return finalise(r, e, Ctor.rounding, m); }; /* * Return the number of decimal places of the value of this Decimal. * */ P.decimalPlaces = P.dp = function () { var w, d = this.d, n = NaN; if (d) { w = d.length - 1; n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE; // Subtract the number of trailing zeros of the last word. w = d[w]; if (w) for (; w % 10 == 0; w /= 10) n--; if (n < 0) n = 0; } return n; }; /* * n / 0 = I * n / N = N * n / I = 0 * 0 / n = 0 * 0 / 0 = N * 0 / N = N * 0 / I = 0 * N / n = N * N / 0 = N * N / N = N * N / I = N * I / n = I * I / 0 = I * I / N = N * I / I = N * * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to * `precision` significant digits using rounding mode `rounding`. * */ P.dividedBy = P.div = function (y) { return divide(this, new this.constructor(y)); }; /* * Return a new Decimal whose value is the integer part of dividing the value of this Decimal * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`. * */ P.dividedToIntegerBy = P.divToInt = function (y) { var x = this, Ctor = x.constructor; return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding); }; /* * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false. * */ P.equals = P.eq = function (y) { return this.cmp(y) === 0; }; /* * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the * direction of negative Infinity. * */ P.floor = function () { return finalise(new this.constructor(this), this.e + 1, 3); }; /* * Return true if the value of this Decimal is greater than the value of `y`, otherwise return * false. * */ P.greaterThan = P.gt = function (y) { return this.cmp(y) > 0; }; /* * Return true if the value of this Decimal is greater than or equal to the value of `y`, * otherwise return false. * */ P.greaterThanOrEqualTo = P.gte = function (y) { var k = this.cmp(y); return k == 1 || k === 0; }; /* * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this * Decimal. * * Domain: [-Infinity, Infinity] * Range: [1, Infinity] * * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ... * * cosh(0) = 1 * cosh(-0) = 1 * cosh(Infinity) = Infinity * cosh(-Infinity) = Infinity * cosh(NaN) = NaN * * x time taken (ms) result * 1000 9 9.8503555700852349694e+433 * 10000 25 4.4034091128314607936e+4342 * 100000 171 1.4033316802130615897e+43429 * 1000000 3817 1.5166076984010437725e+434294 * 10000000 abandoned after 2 minute wait * * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x)) * */ P.hyperbolicCosine = P.cosh = function () { var k, n, pr, rm, len, x = this, Ctor = x.constructor, one = new Ctor(1); if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN); if (x.isZero()) return one; pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; Ctor.rounding = 1; len = x.d.length; // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1 // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4)) // Estimate the optimum number of times to use the argument reduction. // TODO? Estimation reused from cosine() and may not be optimal here. if (len < 32) { k = Math.ceil(len / 3); n = (1 / tinyPow(4, k)).toString(); } else { k = 16; n = '2.3283064365386962890625e-10'; } x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true); // Reverse argument reduction var cosh2_x, i = k, d8 = new Ctor(8); for (; i--;) { cosh2_x = x.times(x); x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8)))); } return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); }; /* * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this * Decimal. * * Domain: [-Infinity, Infinity] * Range: [-Infinity, Infinity] * * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ... * * sinh(0) = 0 * sinh(-0) = -0 * sinh(Infinity) = Infinity * sinh(-Infinity) = -Infinity * sinh(NaN) = NaN * * x time taken (ms) * 10 2 ms * 100 5 ms * 1000 14 ms * 10000 82 ms * 100000 886 ms 1.4033316802130615897e+43429 * 200000 2613 ms * 300000 5407 ms * 400000 8824 ms * 500000 13026 ms 8.7080643612718084129e+217146 * 1000000 48543 ms * * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x)) * */ P.hyperbolicSine = P.sinh = function () { var k, pr, rm, len, x = this, Ctor = x.constructor; if (!x.isFinite() || x.isZero()) return new Ctor(x); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; Ctor.rounding = 1; len = x.d.length; if (len < 3) { x = taylorSeries(Ctor, 2, x, x, true); } else { // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x)) // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3)) // 3 multiplications and 1 addition // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x))) // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5))) // 4 multiplications and 2 additions // Estimate the optimum number of times to use the argument reduction. k = 1.4 * Math.sqrt(len); k = k > 16 ? 16 : k | 0; x = x.times(1 / tinyPow(5, k)); x = taylorSeries(Ctor, 2, x, x, true); // Reverse argument reduction var sinh2_x, d5 = new Ctor(5), d16 = new Ctor(16), d20 = new Ctor(20); for (; k--;) { sinh2_x = x.times(x); x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20)))); } } Ctor.precision = pr; Ctor.rounding = rm; return finalise(x, pr, rm, true); }; /* * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this * Decimal. * * Domain: [-Infinity, Infinity] * Range: [-1, 1] * * tanh(x) = sinh(x) / cosh(x) * * tanh(0) = 0 * tanh(-0) = -0 * tanh(Infinity) = 1 * tanh(-Infinity) = -1 * tanh(NaN) = NaN * */ P.hyperbolicTangent = P.tanh = function () { var pr, rm, x = this, Ctor = x.constructor; if (!x.isFinite()) return new Ctor(x.s); if (x.isZero()) return new Ctor(x); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + 7; Ctor.rounding = 1; return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); }; /* * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of * this Decimal. * * Domain: [-1, 1] * Range: [0, pi] * * acos(x) = pi/2 - asin(x) * * acos(0) = pi/2 * acos(-0) = pi/2 * acos(1) = 0 * acos(-1) = pi * acos(1/2) = pi/3 * acos(-1/2) = 2*pi/3 * acos(|x| > 1) = NaN * acos(NaN) = NaN * */ P.inverseCosine = P.acos = function () { var halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding; if (k !== -1) { return k === 0 // |x| is 1 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) // |x| > 1 or x is NaN : new Ctor(NaN); } if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5); // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3 Ctor.precision = pr + 6; Ctor.rounding = 1; x = x.asin(); halfPi = getPi(Ctor, pr + 4, rm).times(0.5); Ctor.precision = pr; Ctor.rounding = rm; return halfPi.minus(x); }; /* * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the * value of this Decimal. * * Domain: [1, Infinity] * Range: [0, Infinity] * * acosh(x) = ln(x + sqrt(x^2 - 1)) * * acosh(x < 1) = NaN * acosh(NaN) = NaN * acosh(Infinity) = Infinity * acosh(-Infinity) = NaN * acosh(0) = NaN * acosh(-0) = NaN * acosh(1) = 0 * acosh(-1) = NaN * */ P.inverseHyperbolicCosine = P.acosh = function () { var pr, rm, x = this, Ctor = x.constructor; if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN); if (!x.isFinite()) return new Ctor(x); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4; Ctor.rounding = 1; external = false; x = x.times(x).minus(1).sqrt().plus(x); external = true; Ctor.precision = pr; Ctor.rounding = rm; return x.ln(); }; /* * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value * of this Decimal. * * Domain: [-Infinity, Infinity] * Range: [-Infinity, Infinity] * * asinh(x) = ln(x + sqrt(x^2 + 1)) * * asinh(NaN) = NaN * asinh(Infinity) = Infinity * asinh(-Infinity) = -Infinity * asinh(0) = 0 * asinh(-0) = -0 * */ P.inverseHyperbolicSine = P.asinh = function () { var pr, rm, x = this, Ctor = x.constructor; if (!x.isFinite() || x.isZero()) return new Ctor(x); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6; Ctor.rounding = 1; external = false; x = x.times(x).plus(1).sqrt().plus(x); external = true; Ctor.precision = pr; Ctor.rounding = rm; return x.ln(); }; /* * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the * value of this Decimal. * * Domain: [-1, 1] * Range: [-Infinity, Infinity] * * atanh(x) = 0.5 * ln((1 + x) / (1 - x)) * * atanh(|x| > 1) = NaN * atanh(NaN) = NaN * atanh(Infinity) = NaN * atanh(-Infinity) = NaN * atanh(0) = 0 * atanh(-0) = -0 * atanh(1) = Infinity * atanh(-1) = -Infinity * */ P.inverseHyperbolicTangent = P.atanh = function () { var pr, rm, wpr, xsd, x = this, Ctor = x.constructor; if (!x.isFinite()) return new Ctor(NaN); if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN); pr = Ctor.precision; rm = Ctor.rounding; xsd = x.sd(); if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true); Ctor.precision = wpr = xsd - x.e; x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1); Ctor.precision = pr + 4; Ctor.rounding = 1; x = x.ln(); Ctor.precision = pr; Ctor.rounding = rm; return x.times(0.5); }; /* * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this * Decimal. * * Domain: [-Infinity, Infinity] * Range: [-pi/2, pi/2] * * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2))) * * asin(0) = 0 * asin(-0) = -0 * asin(1/2) = pi/6 * asin(-1/2) = -pi/6 * asin(1) = pi/2 * asin(-1) = -pi/2 * asin(|x| > 1) = NaN * asin(NaN) = NaN * * TODO? Compare performance of Taylor series. * */ P.inverseSine = P.asin = function () { var halfPi, k, pr, rm, x = this, Ctor = x.constructor; if (x.isZero()) return new Ctor(x); k = x.abs().cmp(1); pr = Ctor.precision; rm = Ctor.rounding; if (k !== -1) { // |x| is 1 if (k === 0) { halfPi = getPi(Ctor, pr + 4, rm).times(0.5); halfPi.s = x.s; return halfPi; } // |x| > 1 or x is NaN return new Ctor(NaN); } // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6 Ctor.precision = pr + 6; Ctor.rounding = 1; x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan(); Ctor.precision = pr; Ctor.rounding = rm; return x.times(2); }; /* * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value * of this Decimal. * * Domain: [-Infinity, Infinity] * Range: [-pi/2, pi/2] * * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... * * atan(0) = 0 * atan(-0) = -0 * atan(1) = pi/4 * atan(-1) = -pi/4 * atan(Infinity) = pi/2 * atan(-Infinity) = -pi/2 * atan(NaN) = NaN * */ P.inverseTangent = P.atan = function () { var i, j, k, n, px, t, r, wpr, x2, x = this, Ctor = x.constructor, pr = Ctor.precision, rm = Ctor.rounding; if (!x.isFinite()) { if (!x.s) return new Ctor(NaN); if (pr + 4 <= PI_PRECISION) { r = getPi(Ctor, pr + 4, rm).times(0.5); r.s = x.s; return r; } } else if (x.isZero()) { return new Ctor(x); } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) { r = getPi(Ctor, pr + 4, rm).times(0.25); r.s = x.s; return r; } Ctor.precision = wpr = pr + 10; Ctor.rounding = 1; // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x); // Argument reduction // Ensure |x| < 0.42 // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2))) k = Math.min(28, wpr / LOG_BASE + 2 | 0); for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1)); external = false; j = Math.ceil(wpr / LOG_BASE); n = 1; x2 = x.times(x); r = new Ctor(x); px = x; // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... for (; i !== -1;) { px = px.times(x2); t = r.minus(px.div(n += 2)); px = px.times(x2); r = t.plus(px.div(n += 2)); if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;); } if (k) r = r.times(2 << (k - 1)); external = true; return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true); }; /* * Return true if the value of this Decimal is a finite number, otherwise return false. * */ P.isFinite = function () { return !!this.d; }; /* * Return true if the value of this Decimal is an integer, otherwise return false. * */ P.isInteger = P.isInt = function () { return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; }; /* * Return true if the value of this Decimal is NaN, otherwise return false. * */ P.isNaN = function () { return !this.s; }; /* * Return true if the value of this Decimal is negative, otherwise return false. * */ P.isNegative = P.isNeg = function () { return this.s < 0; }; /* * Return true if the value of this Decimal is positive, otherwise return false. * */ P.isPositive = P.isPos = function () { return this.s > 0; }; /* * Return true if the value of this Decimal is 0 or -0, otherwise return false. * */ P.isZero = function () { return !!this.d && this.d[0] === 0; }; /* * Return true if the value of this Decimal is less than `y`, otherwise return false. * */ P.lessThan = P.lt = function (y) { return this.cmp(y) < 0; }; /* * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false. * */ P.lessThanOrEqualTo = P.lte = function (y) { return this.cmp(y) < 1; }; /* * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision` * significant digits using rounding mode `rounding`. * * If no base is specified, return log[10](arg). * * log[base](arg) = ln(arg) / ln(base) * * The result will always be correctly rounded if the base of the log is 10, and 'almost always' * otherwise: * * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error * between the result and the correctly rounded result will be one ulp (unit in the last place). * * log[-b](a) = NaN * log[0](a) = NaN * log[1](a) = NaN * log[NaN](a) = NaN * log[Infinity](a) = NaN * log[b](0) = -Infinity * log[b](-0) = -Infinity * log[b](-a) = NaN * log[b](1) = 0 * log[b](Infinity) = Infinity * log[b](NaN) = NaN * * [base] {number|string|Decimal} The base of the logarithm. * */ P.logarithm = P.log = function (base) { var isBase10, d, denominator, k, inf, num, sd, r, arg = this, Ctor = arg.constructor, pr = Ctor.precision, rm = Ctor.rounding, guard = 5; // Default base is 10. if (base == null) { base = new Ctor(10); isBase10 = true; } else { base = new Ctor(base); d = base.d; // Return NaN if base is negative, or non-finite, or is 0 or 1. if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN); isBase10 = base.eq(10); } d = arg.d; // Is arg negative, non-finite, 0 or 1? if (arg.s < 0 || !d || !d[0] || arg.eq(1)) { return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0); } // The result will have a non-terminating decimal expansion if base is 10 and arg is not an // integer power of 10. if (isBase10) { if (d.length > 1) { inf = true; } else { for (k = d[0]; k % 10 === 0;) k /= 10; inf = k !== 1; } } external = false; sd = pr + guard; num = naturalLogarithm(arg, sd); denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); // The result will have 5 rounding digits. r = divide(num, denominator, sd, 1); // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000, // calculate 10 further digits. // // If the result is known to have an infinite decimal expansion, repeat this until it is clear // that the result is above or below the boundary. Otherwise, if after calculating the 10 // further digits, the last 14 are nines, round up and assume the result is exact. // Also assume the result is exact if the last 14 are zero. // // Example of a result that will be incorrectly rounded: // log[1048576](4503599627370502) = 2.60000000000000009610279511444746... // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal // place is still 2.6. if (checkRoundingDigits(r.d, k = pr, rm)) { do { sd += 10; num = naturalLogarithm(arg, sd); denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); r = divide(num, denominator, sd, 1); if (!inf) { // Check for 14 nines from the 2nd rounding digit, as the first may be 4. if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) { r = finalise(r, pr + 1, 0); } break; } } while (checkRoundingDigits(r.d, k += 10, rm)); } external = true; return finalise(r, pr, rm); }; /* * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal. * * arguments {number|string|Decimal} * P.max = function () { Array.prototype.push.call(arguments, this); return maxOrMin(this.constructor, arguments, 'lt'); }; */ /* * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal. * * arguments {number|string|Decimal} * P.min = function () { Array.prototype.push.call(arguments, this); return maxOrMin(this.constructor, arguments, 'gt'); }; */ /* * n - 0 = n * n - N = N * n - I = -I * 0 - n = -n * 0 - 0 = 0 * 0 - N = N * 0 - I = -I * N - n = N * N - 0 = N * N - N = N * N - I = N * I - n = I * I - 0 = I * I - N = N * I - I = N * * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision` * significant digits using rounding mode `rounding`. * */ P.minus = P.sub = function (y) { var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd, x = this, Ctor = x.constructor; y = new Ctor(y); // If either is not finite... if (!x.d || !y.d) { // Return NaN if either is NaN. if (!x.s || !y.s) y = new Ctor(NaN); // Return y negated if x is finite and y is ±Infinity. else if (x.d) y.s = -y.s; // Return x if y is finite and x is ±Infinity. // Return x if both are ±Infinity with different signs. // Return NaN if both are ±Infinity with the same sign. else y = new Ctor(y.d || x.s !== y.s ? x : NaN); return y; } // If signs differ... if (x.s != y.s) { y.s = -y.s; return x.plus(y); } xd = x.d; yd = y.d; pr = Ctor.precision; rm = Ctor.rounding; // If either is zero... if (!xd[0] || !yd[0]) { // Return y negated if x is zero and y is non-zero. if (yd[0]) y.s = -y.s; // Return x if y is zero and x is non-zero. else if (xd[0]) y = new Ctor(x); // Return zero if both are zero. // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity. else return new Ctor(rm === 3 ? -0 : 0); return external ? finalise(y, pr, rm) : y; } // x and y are finite, non-zero numbers with the same sign. // Calculate base 1e7 exponents. e = mathfloor(y.e / LOG_BASE); xe = mathfloor(x.e / LOG_BASE); xd = xd.slice(); k = xe - e; // If base 1e7 exponents differ... if (k) { xLTy = k < 0; if (xLTy) { d = xd; k = -k; len = yd.length; } else { d = yd; e = xe; len = xd.length; } // Numbers with massively different exponents would result in a very high number of // zeros needing to be prepended, but this can be avoided while still ensuring correct // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`. i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2; if (k > i) { k = i; d.length = 1; } // Prepend zeros to equalise exponents. d.reverse(); for (i = k; i--;) d.push(0); d.reverse(); // Base 1e7 exponents equal. } else { // Check digits to determine which is the bigger number. i = xd.length; len = yd.length; xLTy = i < len; if (xLTy) len = i; for (i = 0; i < len; i++) { if (xd[i] != yd[i]) { xLTy = xd[i] < yd[i]; break; } } k = 0; } if (xLTy) { d = xd; xd = yd; yd = d; y.s = -y.s; } len = xd.length; // Append zeros to `xd` if shorter. // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length. for (i = yd.length - len; i > 0; --i) xd[len++] = 0; // Subtract yd from xd. for (i = yd.length; i > k;) { if (xd[--i] < yd[i]) { for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1; --xd[j]; xd[i] += BASE; } xd[i] -= yd[i]; } // Remove trailing zeros. for (; xd[--len] === 0;) xd.pop(); // Remove leading zeros and adjust exponent accordingly. for (; xd[0] === 0; xd.shift()) --e; // Zero? if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0); y.d = xd; y.e = getBase10Exponent(xd, e); return external ? finalise(y, pr, rm) : y; }; /* * n % 0 = N * n % N = N * n % I = n * 0 % n = 0 * -0 % n = -0 * 0 % 0 = N * 0 % N = N * 0 % I = 0 * N % n = N * N % 0 = N * N % N = N * N % I = N * I % n = N * I % 0 = N * I % N = N * I % I = N * * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to * `precision` significant digits using rounding mode `rounding`. * * The result depends on the modulo mode. * */ P.modulo = P.mod = function (y) { var q, x = this, Ctor = x.constructor; y = new Ctor(y); // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0. if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN); // Return x if y is ±Infinity or x is ±0. if (!y.d || x.d && !x.d[0]) { return finalise(new Ctor(x), Ctor.precision, Ctor.rounding); } // Prevent rounding of intermediate calculations. external = false; if (Ctor.modulo == 9) { // Euclidian division: q = sign(y) * floor(x / abs(y)) // result = x - q * y where 0 <= result < abs(y) q = divide(x, y.abs(), 0, 3, 1); q.s *= y.s; } else { q = divide(x, y, 0, Ctor.modulo, 1); } q = q.times(y); external = true; return x.minus(q); }; /* * Return a new Decimal whose value is the natural exponential of the value of this Decimal, * i.e. the base e raised to the power the value of this Decimal, rounded to `precision` * significant digits using rounding mode `rounding`. * */ P.naturalExponential = P.exp = function () { return naturalExponential(this); }; /* * Return a new Decimal whose value is the natural logarithm of the value of this Decimal, * rounded to `precision` significant digits using rounding mode `rounding`. * */ P.naturalLogarithm = P.ln = function () { return naturalLogarithm(this); }; /* * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by * -1. * */ P.negated = P.neg = function () { var x = new this.constructor(this); x.s = -x.s; return finalise(x); }; /* * n + 0 = n * n + N = N * n + I = I * 0 + n = n * 0 + 0 = 0 * 0 + N = N * 0 + I = I * N + n = N * N + 0 = N * N + N = N * N + I = N * I + n = I * I + 0 = I * I + N = N * I + I = I * * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision` * significant digits using rounding mode `rounding`. * */ P.plus = P.add = function (y) { var carry, d, e, i, k, len, pr, rm, xd, yd, x = this, Ctor = x.constructor; y = new Ctor(y); // If either is not finite... if (!x.d || !y.d) { // Return NaN if either is NaN. if (!x.s || !y.s) y = new Ctor(NaN); // Return x if y is finite and x is ±Infinity. // Return x if both are ±Infinity with the same sign. // Return NaN if both are ±Infinity with different signs. // Return y if x is finite and y is ±Infinity. else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN); return y; } // If signs differ... if (x.s != y.s) { y.s = -y.s; return x.minus(y); } xd = x.d; yd = y.d; pr = Ctor.precision; rm = Ctor.rounding; // If either is zero... if (!xd[0] || !yd[0]) { // Return x if y is zero. // Return y if y is non-zero. if (!yd[0]) y = new Ctor(x); return external ? finalise(y, pr, rm) : y; } // x and y are finite, non-zero numbers with the same sign. // Calculate base 1e7 exponents. k = mathfloor(x.e / LOG_BASE); e = mathfloor(y.e / LOG_BASE); xd = xd.slice(); i = k - e; // If base 1e7 exponents differ... if (i) { if (i < 0) { d = xd; i = -i; len = yd.length; } else { d = yd; e = k; len = xd.length; } // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1. k = Math.ceil(pr / LOG_BASE); len = k > len ? k + 1 : len + 1; if (i > len) { i = len; d.length = 1; } // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts. d.reverse(); for (; i--;) d.push(0); d.reverse(); } len = xd.length; i = yd.length; // If yd is longer than xd, swap xd and yd so xd points to the longer array. if (len - i < 0) { i = len; d = yd; yd = xd; xd = d; } // Only start adding at yd.length - 1 as the further digits of xd can be left as they are. for (carry = 0; i;) { carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; xd[i] %= BASE; } if (carry) { xd.unshift(carry); ++e; } // Remove trailing zeros. // No need to check for zero, as +x + +y != 0 && -x + -y != 0 for (len = xd.length; xd[--len] == 0;) xd.pop(); y.d = xd; y.e = getBase10Exponent(xd, e); return external ? finalise(y, pr, rm) : y; }; /* * Return the number of significant digits of the value of this Decimal. * * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. * */ P.precision = P.sd = function (z) { var k, x = this; if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z); if (x.d) { k = getPrecision(x.d); if (z && x.e + 1 > k) k = x.e + 1; } else { k = NaN; } return k; }; /* * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using * rounding mode `rounding`. * */ P.round = function () { var x = this, Ctor = x.constructor; return finalise(new Ctor(x), x.e + 1, Ctor.rounding); }; /* * Return a new Decimal whose value is the sine of the value in radians of this Decimal. * * Domain: [-Infinity, Infinity] * Range: [-1, 1] * * sin(x) = x - x^3/3! + x^5/5! - ... * * sin(0) = 0 * sin(-0) = -0 * sin(Infinity) = NaN * sin(-Infinity) = NaN * sin(NaN) = NaN * */ P.sine = P.sin = function () { var pr, rm, x = this, Ctor = x.constructor; if (!x.isFinite()) return new Ctor(NaN); if (x.isZero()) return new Ctor(x); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; Ctor.rounding = 1; x = sine(Ctor, toLessThanHalfPi(Ctor, x)); Ctor.precision = pr; Ctor.rounding = rm; return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); }; /* * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision` * significant digits using rounding mode `rounding`. * * sqrt(-n) = N * sqrt(N) = N * sqrt(-I) = N * sqrt(I) = I * sqrt(0) = 0 * sqrt(-0) = -0 * */ P.squareRoot = P.sqrt = function () { var m, n, sd, r, rep, t, x = this, d = x.d, e = x.e, s = x.s, Ctor = x.constructor; // Negative/NaN/Infinity/zero? if (s !== 1 || !d || !d[0]) { return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0); } external = false; // Initial estimate. s = Math.sqrt(+x); // Math.sqrt underflow/overflow? // Pass x to Math.sqrt as integer, then adjust the exponent of the result. if (s == 0 || s == 1 / 0) { n = digitsToString(d); if ((n.length + e) % 2 == 0) n += '0'; s = Math.sqrt(n); e = mathfloor((e + 1) / 2) - (e < 0 || e % 2); if (s == 1 / 0) { n = '5e' + e; } else { n = s.toExponential(); n = n.slice(0, n.indexOf('e') + 1) + e; } r = new Ctor(n); } else { r = new Ctor(s.toString()); } sd = (e = Ctor.precision) + 3; // Newton-Raphson iteration. for (;;) { t = r; r = t.plus(divide(x, t, sd + 2, 1)).times(0.5); // TODO? Replace with for-loop and checkRoundingDigits. if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { n = n.slice(sd - 3, sd + 1); // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or // 4999, i.e. approaching a rounding boundary, continue the iteration. if (n == '9999' || !rep && n == '4999') { // On the first iteration only, check to see if rounding up gives the exact result as the // nines may infinitely repeat. if (!rep) { finalise(t, e + 1, 0); if (t.times(t).eq(x)) { r = t; break; } } sd += 4; rep = 1; } else { // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. // If not, then there are further digits and m will be truthy. if (!+n || !+n.slice(1) && n.charAt(0) == '5') { // Truncate to the first rounding digit. finalise(r, e + 1, 1); m = !r.times(r).eq(x); } break; } } } external = true; return finalise(r, e, Ctor.rounding, m); }; /* * Return a new Decimal whose value is the tangent of the value in radians of this Decimal. * * Domain: [-Infinity, Infinity] * Range: [-Infinity, Infinity] * * tan(0) = 0 * tan(-0) = -0 * tan(Infinity) = NaN * tan(-Infinity) = NaN * tan(NaN) = NaN * */ P.tangent = P.tan = function () { var pr, rm, x = this, Ctor = x.constructor; if (!x.isFinite()) return new Ctor(NaN); if (x.isZero()) return new Ctor(x); pr = Ctor.precision; rm = Ctor.rounding; Ctor.precision = pr + 10; Ctor.rounding = 1; x = x.sin(); x.s = 1; x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0); Ctor.precision = pr; Ctor.rounding = rm; return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); }; /* * n * 0 = 0 * n * N = N * n * I = I * 0 * n = 0 * 0 * 0 = 0 * 0 * N = N * 0 * I = N * N * n = N * N * 0 = N * N * N = N * N * I = N * I * n = I * I * 0 = N * I * N = N * I * I = I * * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant * digits using rounding mode `rounding`. * */ P.times = P.mul = function (y) { var carry, e, i, k, r, rL, t, xdL, ydL, x = this, Ctor = x.constructor, xd = x.d, yd = (y = new Ctor(y)).d; y.s *= x.s; // If either is NaN, ±Infinity or ±0... if (!xd || !xd[0] || !yd || !yd[0]) { return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd // Return NaN if either is NaN. // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity. ? NaN // Return ±Infinity if either is ±Infinity. // Return ±0 if either is ±0. : !xd || !yd ? y.s / 0 : y.s * 0); } e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE); xdL = xd.length; ydL = yd.length; // Ensure xd points to the longer array. if (xdL < ydL) { r = xd; xd = yd; yd = r; rL = xdL; xdL = ydL; ydL = rL; } // Initialise the result array with zeros. r = []; rL = xdL + ydL; for (i = rL; i--;) r.push(0); // Multiply! for (i = ydL; --i >= 0;) { carry = 0; for (k = xdL + i; k > i;) { t = r[k] + yd[i] * xd[k - i - 1] + carry; r[k--] = t % BASE | 0; carry = t / BASE | 0; } r[k] = (r[k] + carry) % BASE | 0; } // Remove trailing zeros. for (; !r[--rL];) r.pop(); if (carry) ++e; else r.shift(); y.d = r; y.e = getBase10Exponent(r, e); return external ? finalise(y, Ctor.precision, Ctor.rounding) : y; }; /* * Return a string representing the value of this Decimal in base 2, round to `sd` significant * digits using rounding mode `rm`. * * If the optional `sd` argument is present then return binary exponential notation. * * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * */ P.toBinary = function (sd, rm) { return toStringBinary(this, 2, sd, rm); }; /* * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp` * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted. * * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal. * * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * */ P.toDecimalPlaces = P.toDP = function (dp, rm) { var x = this, Ctor = x.constructor; x = new Ctor(x); if (dp === void 0) return x; checkInt32(dp, 0, MAX_DIGITS); if (rm === void 0) rm = Ctor.rounding; else checkInt32(rm, 0, 8); return finalise(x, dp + x.e + 1, rm); }; /* * Return a string representing the value of this Decimal in exponential notation rounded to * `dp` fixed decimal places using rounding mode `rounding`. * * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * */ P.toExponential = function (dp, rm) { var str, x = this, Ctor = x.constructor; if (dp === void 0) { str = finiteToString(x, true); } else { checkInt32(dp, 0, MAX_DIGITS); if (rm === void 0) rm = Ctor.rounding; else checkInt32(rm, 0, 8); x = finalise(new Ctor(x), dp + 1, rm); str = finiteToString(x, true, dp + 1); } return x.isNeg() && !x.isZero() ? '-' + str : str; }; /* * Return a string representing the value of this Decimal in normal (fixed-point) notation to * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is * omitted. * * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'. * * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. * (-0).toFixed(3) is '0.000'. * (-0.5).toFixed(0) is '-0'. * */ P.toFixed = function (dp, rm) { var str, y, x = this, Ctor = x.constructor; if (dp === void 0) { str = finiteToString(x); } else { checkInt32(dp, 0, MAX_DIGITS); if (rm === void 0) rm = Ctor.rounding; else checkInt32(rm, 0, 8); y = finalise(new Ctor(x), dp + x.e + 1, rm); str = finiteToString(y, false, dp + y.e + 1); } // To determine whether to add the minus sign look at the value before it was rounded, // i.e. look at `x` rather than `y`. return x.isNeg() && !x.isZero() ? '-' + str : str; }; /* * Return an array representing the value of this Decimal as a simple fraction with an integer * numerator and an integer denominator. * * The denominator will be a positive non-zero value less than or equal to the specified maximum * denominator. If a maximum denominator is not specified, the denominator will be the lowest * value necessary to represent the number exactly. * * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity. * */ P.toFraction = function (maxD) { var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r, x = this, xd = x.d, Ctor = x.constructor; if (!xd) return new Ctor(x); n1 = d0 = new Ctor(1); d1 = n0 = new Ctor(0); d = new Ctor(d1); e = d.e = getPrecision(xd) - x.e - 1; k = e % LOG_BASE; d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k); if (maxD == null) { // d is 10**e, the minimum max-denominator needed. maxD = e > 0 ? d : n1; } else { n = new Ctor(maxD); if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n); maxD = n.gt(d) ? (e > 0 ? d : n1) : n; } external = false; n = new Ctor(digitsToString(xd)); pr = Ctor.precision; Ctor.precision = e = xd.length * LOG_BASE * 2; for (;;) { q = divide(n, d, 0, 1, 1); d2 = d0.plus(q.times(d1)); if (d2.cmp(maxD) == 1) break; d0 = d1; d1 = d2; d2 = n1; n1 = n0.plus(q.times(d2)); n0 = d2; d2 = d; d = n.minus(q.times(d2)); n = d2; } d2 = divide(maxD.minus(d0), d1, 0, 1, 1); n0 = n0.plus(d2.times(n1)); d0 = d0.plus(d2.times(d1)); n0.s = n1.s = x.s; // Determine which fraction is closer to x, n0/d0 or n1/d1? r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; Ctor.precision = pr; external = true; return r; }; /* * Return a string representing the value of this Decimal in base 16, round to `sd` significant * digits using rounding mode `rm`. * * If the optional `sd` argument is present then return binary exponential notation. * * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * */ P.toHexadecimal = P.toHex = function (sd, rm) { return toStringBinary(this, 16, sd, rm); }; /* * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal. * * The return value will always have the same sign as this Decimal, unless either this Decimal * or `y` is NaN, in which case the return value will be also be NaN. * * The return value is not affected by the value of `precision`. * * y {number|string|Decimal} The magnitude to round to a multiple of. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * * 'toNearest() rounding mode not an integer: {rm}' * 'toNearest() rounding mode out of range: {rm}' * */ P.toNearest = function (y, rm) { var x = this, Ctor = x.constructor; x = new Ctor(x); if (y == null) { // If x is not finite, return x. if (!x.d) return x; y = new Ctor(1); rm = Ctor.rounding; } else { y = new Ctor(y); if (rm === void 0) { rm = Ctor.rounding; } else { checkInt32(rm, 0, 8); } // If x is not finite, return x if y is not NaN, else NaN. if (!x.d) return y.s ? x : y; // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN. if (!y.d) { if (y.s) y.s = x.s; return y; } } // If y is not zero, calculate the nearest multiple of y to x. if (y.d[0]) { external = false; x = divide(x, y, 0, rm, 1).times(y); external = true; finalise(x); // If y is zero, return zero with the sign of x. } else { y.s = x.s; x = y; } return x; }; /* * Return the value of this Decimal converted to a number primitive. * Zero keeps its sign. * */ P.toNumber = function () { return +this; }; /* * Return a string representing the value of this Decimal in base 8, round to `sd` significant * digits using rounding mode `rm`. * * If the optional `sd` argument is present then return binary exponential notation. * * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * */ P.toOctal = function (sd, rm) { return toStringBinary(this, 8, sd, rm); }; /* * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded * to `precision` significant digits using rounding mode `rounding`. * * ECMAScript compliant. * * pow(x, NaN) = NaN * pow(x, ±0) = 1 * pow(NaN, non-zero) = NaN * pow(abs(x) > 1, +Infinity) = +Infinity * pow(abs(x) > 1, -Infinity) = +0 * pow(abs(x) == 1, ±Infinity) = NaN * pow(abs(x) < 1, +Infinity) = +0 * pow(abs(x) < 1, -Infinity) = +Infinity * pow(+Infinity, y > 0) = +Infinity * pow(+Infinity, y < 0) = +0 * pow(-Infinity, odd integer > 0) = -Infinity * pow(-Infinity, even integer > 0) = +Infinity * pow(-Infinity, odd integer < 0) = -0 * pow(-Infinity, even integer < 0) = +0 * pow(+0, y > 0) = +0 * pow(+0, y < 0) = +Infinity * pow(-0, odd integer > 0) = -0 * pow(-0, even integer > 0) = +0 * pow(-0, odd integer < 0) = -Infinity * pow(-0, even integer < 0) = +Infinity * pow(finite x < 0, finite non-integer) = NaN * * For non-integer or very large exponents pow(x, y) is calculated using * * x^y = exp(y*ln(x)) * * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the * probability of an incorrectly rounded result * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14 * i.e. 1 in 250,000,000,000,000 * * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place). * * y {number|string|Decimal} The power to which to raise this Decimal. * */ P.toPower = P.pow = function (y) { var e, k, pr, r, rm, s, x = this, Ctor = x.constructor, yn = +(y = new Ctor(y)); // Either ±Infinity, NaN or ±0? if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn)); x = new Ctor(x); if (x.eq(1)) return x; pr = Ctor.precision; rm = Ctor.rounding; if (y.eq(1)) return finalise(x, pr, rm); // y exponent e = mathfloor(y.e / LOG_BASE); // If y is a small integer use the 'exponentiation by squaring' algorithm. if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) { r = intPow(Ctor, x, k, pr); return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm); } s = x.s; // if x is negative if (s < 0) { // if y is not an integer if (e < y.d.length - 1) return new Ctor(NaN); // Result is positive if x is negative and the last digit of integer y is even. if ((y.d[e] & 1) == 0) s = 1; // if x.eq(-1) if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) { x.s = s; return x; } } // Estimate result exponent. // x^y = 10^e, where e = y * log10(x) // log10(x) = log10(x_significand) + x_exponent // log10(x_significand) = ln(x_significand) / ln(10) k = mathpow(+x, yn); e = k == 0 || !isFinite(k) ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1)) : new Ctor(k + '').e; // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1. // Overflow/underflow? if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0); external = false; Ctor.rounding = x.s = 1; // Estimate the extra guard digits needed to ensure five correct rounding digits from // naturalLogarithm(x). Example of failure without these extra digits (precision: 10): // new Decimal(2.32456).pow('2087987436534566.46411') // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815 k = Math.min(12, (e + '').length); // r = x^y = exp(y*ln(x)) r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr); // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40) if (r.d) { // Truncate to the required precision plus five rounding digits. r = finalise(r, pr + 5, 1); // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate // the result. if (checkRoundingDigits(r.d, pr, rm)) { e = pr + 10; // Truncate to the increased precision plus five rounding digits. r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1); // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9). if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) { r = finalise(r, pr + 1, 0); } } } r.s = s; external = true; Ctor.rounding = rm; return finalise(r, pr, rm); }; /* * Return a string representing the value of this Decimal rounded to `sd` significant digits * using rounding mode `rounding`. * * Return exponential notation if `sd` is less than the number of digits necessary to represent * the integer part of the value in normal notation. * * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * */ P.toPrecision = function (sd, rm) { var str, x = this, Ctor = x.constructor; if (sd === void 0) { str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); } else { checkInt32(sd, 1, MAX_DIGITS); if (rm === void 0) rm = Ctor.rounding; else checkInt32(rm, 0, 8); x = finalise(new Ctor(x), sd, rm); str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd); } return x.isNeg() && !x.isZero() ? '-' + str : str; }; /* * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd` * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if * omitted. * * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * * 'toSD() digits out of range: {sd}' * 'toSD() digits not an integer: {sd}' * 'toSD() rounding mode not an integer: {rm}' * 'toSD() rounding mode out of range: {rm}' * */ P.toSignificantDigits = P.toSD = function (sd, rm) { var x = this, Ctor = x.constructor; if (sd === void 0) { sd = Ctor.precision; rm = Ctor.rounding; } else { checkInt32(sd, 1, MAX_DIGITS); if (rm === void 0) rm = Ctor.rounding; else checkInt32(rm, 0, 8); } return finalise(new Ctor(x), sd, rm); }; /* * Return a string representing the value of this Decimal. * * Return exponential notation if this Decimal has a positive exponent equal to or greater than * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`. * */ P.toString = function () { var x = this, Ctor = x.constructor, str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); return x.isNeg() && !x.isZero() ? '-' + str : str; }; /* * Return a new Decimal whose value is the value of this Decimal truncated to a whole number. * */ P.truncated = P.trunc = function () { return finalise(new this.constructor(this), this.e + 1, 1); }; /* * Return a string representing the value of this Decimal. * Unlike `toString`, negative zero will include the minus sign. * */ P.valueOf = P.toJSON = function () { var x = this, Ctor = x.constructor, str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); return x.isNeg() ? '-' + str : str; }; /* // Add aliases to match BigDecimal method names. // P.add = P.plus; P.subtract = P.minus; P.multiply = P.times; P.divide = P.div; P.remainder = P.mod; P.compareTo = P.cmp; P.negate = P.neg; */ // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers. /* * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower, * finiteToString, naturalExponential, naturalLogarithm * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest, * P.toPrecision, P.toSignificantDigits, toStringBinary, random * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm * convertBase toStringBinary, parseOther * cos P.cos * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy, * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction, * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm, * taylorSeries, atan2, parseOther * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh, * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus, * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot, * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed, * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits, * P.truncated, divide, getLn10, getPi, naturalExponential, * naturalLogarithm, ceil, floor, round, trunc * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf, * toStringBinary * getBase10Exponent P.minus, P.plus, P.times, parseOther * getLn10 P.logarithm, naturalLogarithm * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2 * getPrecision P.precision, P.toFraction * getZeroString digitsToString, finiteToString * intPow P.toPower, parseOther * isOdd toLessThanHalfPi * maxOrMin max, min * naturalExponential P.naturalExponential, P.toPower * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm, * P.toPower, naturalExponential * nonFiniteToString finiteToString, toStringBinary * parseDecimal Decimal * parseOther Decimal * sin P.sin * taylorSeries P.cosh, P.sinh, cos, sin * toLessThanHalfPi P.cos, P.sin * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal * truncate intPow * * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi, * naturalLogarithm, config, parseOther, random, Decimal */ function digitsToString(d) { var i, k, ws, indexOfLastWord = d.length - 1, str = '', w = d[0]; if (indexOfLastWord > 0) { str += w; for (i = 1; i < indexOfLastWord; i++) { ws = d[i] + ''; k = LOG_BASE - ws.length; if (k) str += getZeroString(k); str += ws; } w = d[i]; ws = w + ''; k = LOG_BASE - ws.length; if (k) str += getZeroString(k); } else if (w === 0) { return '0'; } // Remove trailing zeros of last w. for (; w % 10 === 0;) w /= 10; return str + w; } function checkInt32(i, min, max) { if (i !== ~~i || i < min || i > max) { throw Error(invalidArgument + i); } } /* * Check 5 rounding digits if `repeating` is null, 4 otherwise. * `repeating == null` if caller is `log` or `pow`, * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`. */ function checkRoundingDigits(d, i, rm, repeating) { var di, k, r, rd; // Get the length of the first word of the array d. for (k = d[0]; k >= 10; k /= 10) --i; // Is the rounding digit in the first word of d? if (--i < 0) { i += LOG_BASE; di = 0; } else { di = Math.ceil((i + 1) / LOG_BASE); i %= LOG_BASE; } // i is the index (0 - 6) of the rounding digit. // E.g. if within the word 3487563 the first rounding digit is 5, // then i = 4, k = 1000, rd = 3487563 % 1000 = 563 k = mathpow(10, LOG_BASE - i); rd = d[di] % k | 0; if (repeating == null) { if (i < 3) { if (i == 0) rd = rd / 100 | 0; else if (i == 1) rd = rd / 10 | 0; r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0; } else { r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0; } } else { if (i < 4) { if (i == 0) rd = rd / 1000 | 0; else if (i == 1) rd = rd / 100 | 0; else if (i == 2) rd = rd / 10 | 0; r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999; } else { r = ((repeating || rm < 4) && rd + 1 == k || (!repeating && rm > 3) && rd + 1 == k / 2) && (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1; } } return r; } // Convert string of `baseIn` to an array of numbers of `baseOut`. // Eg. convertBase('255', 10, 16) returns [15, 15]. // Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. function convertBase(str, baseIn, baseOut) { var j, arr = [0], arrL, i = 0, strL = str.length; for (; i < strL;) { for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn; arr[0] += NUMERALS.indexOf(str.charAt(i++)); for (j = 0; j < arr.length; j++) { if (arr[j] > baseOut - 1) { if (arr[j + 1] === void 0) arr[j + 1] = 0; arr[j + 1] += arr[j] / baseOut | 0; arr[j] %= baseOut; } } } return arr.reverse(); } /* * cos(x) = 1 - x^2/2! + x^4/4! - ... * |x| < pi/2 * */ function cosine(Ctor, x) { var k, y, len = x.d.length; // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1 // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1 // Estimate the optimum number of times to use the argument reduction. if (len < 32) { k = Math.ceil(len / 3); y = (1 / tinyPow(4, k)).toString(); } else { k = 16; y = '2.3283064365386962890625e-10'; } Ctor.precision += k; x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1)); // Reverse argument reduction for (var i = k; i--;) { var cos2x = x.times(x); x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1); } Ctor.precision -= k; return x; } /* * Perform division in the specified base. */ var divide = (function () { // Assumes non-zero x and k, and hence non-zero result. function multiplyInteger(x, k, base) { var temp, carry = 0, i = x.length; for (x = x.slice(); i--;) { temp = x[i] * k + carry; x[i] = temp % base | 0; carry = temp / base | 0; } if (carry) x.unshift(carry); return x; } function compare(a, b, aL, bL) { var i, r; if (aL != bL) { r = aL > bL ? 1 : -1; } else { for (i = r = 0; i < aL; i++) { if (a[i] != b[i]) { r = a[i] > b[i] ? 1 : -1; break; } } } return r; } function subtract(a, b, aL, base) { var i = 0; // Subtract b from a. for (; aL--;) { a[aL] -= i; i = a[aL] < b[aL] ? 1 : 0; a[aL] = i * base + a[aL] - b[aL]; } // Remove leading zeros. for (; !a[0] && a.length > 1;) a.shift(); } return function (x, y, pr, rm, dp, base) { var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, yL, yz, Ctor = x.constructor, sign = x.s == y.s ? 1 : -1, xd = x.d, yd = y.d; // Either NaN, Infinity or 0? if (!xd || !xd[0] || !yd || !yd[0]) { return new Ctor(// Return NaN if either NaN, or both Infinity or 0. !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN : // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0. xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0); } if (base) { logBase = 1; e = x.e - y.e; } else { base = BASE; logBase = LOG_BASE; e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase); } yL = yd.length; xL = xd.length; q = new Ctor(sign); qd = q.d = []; // Result exponent may be one less than e. // The digit array of a Decimal from toStringBinary may have trailing zeros. for (i = 0; yd[i] == (xd[i] || 0); i++); if (yd[i] > (xd[i] || 0)) e--; if (pr == null) { sd = pr = Ctor.precision; rm = Ctor.rounding; } else if (dp) { sd = pr + (x.e - y.e) + 1; } else { sd = pr; } if (sd < 0) { qd.push(1); more = true; } else { // Convert precision in number of base 10 digits to base 1e7 digits. sd = sd / logBase + 2 | 0; i = 0; // divisor < 1e7 if (yL == 1) { k = 0; yd = yd[0]; sd++; // k is the carry. for (; (i < xL || k) && sd--; i++) { t = k * base + (xd[i] || 0); qd[i] = t / yd | 0; k = t % yd | 0; } more = k || i < xL; // divisor >= 1e7 } else { // Normalise xd and yd so highest order digit of yd is >= base/2 k = base / (yd[0] + 1) | 0; if (k > 1) { yd = multiplyInteger(yd, k, base); xd = multiplyInteger(xd, k, base); yL = yd.length; xL = xd.length; } xi = yL; rem = xd.slice(0, yL); remL = rem.length; // Add zeros to make remainder as long as divisor. for (; remL < yL;) rem[remL++] = 0; yz = yd.slice(); yz.unshift(0); yd0 = yd[0]; if (yd[1] >= base / 2) ++yd0; do { k = 0; // Compare divisor and remainder. cmp = compare(yd, rem, yL, remL); // If divisor < remainder. if (cmp < 0) { // Calculate trial digit, k. rem0 = rem[0]; if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); // k will be how many times the divisor goes into the current remainder. k = rem0 / yd0 | 0; // Algorithm: // 1. product = divisor * trial digit (k) // 2. if product > remainder: product -= divisor, k-- // 3. remainder -= product // 4. if product was < remainder at 2: // 5. compare new remainder and divisor // 6. If remainder > divisor: remainder -= divisor, k++ if (k > 1) { if (k >= base) k = base - 1; // product = divisor * trial digit. prod = multiplyInteger(yd, k, base); prodL = prod.length; remL = rem.length; // Compare product and remainder. cmp = compare(prod, rem, prodL, remL); // product > remainder. if (cmp == 1) { k--; // Subtract divisor from product. subtract(prod, yL < prodL ? yz : yd, prodL, base); } } else { // cmp is -1. // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1 // to avoid it. If k is 1 there is a need to compare yd and rem again below. if (k == 0) cmp = k = 1; prod = yd.slice(); } prodL = prod.length; if (prodL < remL) prod.unshift(0); // Subtract product from remainder. subtract(rem, prod, remL, base); // If product was < previous remainder. if (cmp == -1) { remL = rem.length; // Compare divisor and new remainder. cmp = compare(yd, rem, yL, remL); // If divisor < new remainder, subtract divisor from remainder. if (cmp < 1) { k++; // Subtract divisor from remainder. subtract(rem, yL < remL ? yz : yd, remL, base); } } remL = rem.length; } else if (cmp === 0) { k++; rem = [0]; } // if cmp === 1, k will be 0 // Add the next digit, k, to the result array. qd[i++] = k; // Update the remainder. if (cmp && rem[0]) { rem[remL++] = xd[xi] || 0; } else { rem = [xd[xi]]; remL = 1; } } while ((xi++ < xL || rem[0] !== void 0) && sd--); more = rem[0] !== void 0; } // Leading zero? if (!qd[0]) qd.shift(); } // logBase is 1 when divide is being used for base conversion. if (logBase == 1) { q.e = e; inexact = more; } else { // To calculate q.e, first get the number of digits of qd[0]. for (i = 1, k = qd[0]; k >= 10; k /= 10) i++; q.e = i + e * logBase - 1; finalise(q, dp ? pr + q.e + 1 : pr, rm, more); } return q; }; })(); /* * Round `x` to `sd` significant digits using rounding mode `rm`. * Check for over/under-flow. */ function finalise(x, sd, rm, isTruncated) { var digits, i, j, k, rd, roundUp, w, xd, xdi, Ctor = x.constructor; // Don't round if sd is null or undefined. out: if (sd != null) { xd = x.d; // Infinity/NaN. if (!xd) return x; // rd: the rounding digit, i.e. the digit after the digit that may be rounded up. // w: the word of xd containing rd, a base 1e7 number. // xdi: the index of w within xd. // digits: the number of digits of w. // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if // they had leading zeros) // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero). // Get the length of the first word of the digits array xd. for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++; i = sd - digits; // Is the rounding digit in the first word of xd? if (i < 0) { i += LOG_BASE; j = sd; w = xd[xdi = 0]; // Get the rounding digit at index j of w. rd = w / mathpow(10, digits - j - 1) % 10 | 0; } else { xdi = Math.ceil((i + 1) / LOG_BASE); k = xd.length; if (xdi >= k) { if (isTruncated) { // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`. for (; k++ <= xdi;) xd.push(0); w = rd = 0; digits = 1; i %= LOG_BASE; j = i - LOG_BASE + 1; } else { break out; } } else { w = k = xd[xdi]; // Get the number of digits of w. for (digits = 1; k >= 10; k /= 10) digits++; // Get the index of rd within w. i %= LOG_BASE; // Get the index of rd within w, adjusted for leading zeros. // The number of leading zeros of w is given by LOG_BASE - digits. j = i - LOG_BASE + digits; // Get the rounding digit at index j of w. rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0; } } // Are there any non-zero digits after the rounding digit? isTruncated = isTruncated || sd < 0 || xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1)); // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression // will give 714. roundUp = rm < 4 ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 && // Check whether the digit to the left of the rounding digit is odd. ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 || rm == (x.s < 0 ? 8 : 7)); if (sd < 1 || !xd[0]) { xd.length = 0; if (roundUp) { // Convert sd to decimal places. sd -= x.e + 1; // 1, 0.1, 0.01, 0.001, 0.0001 etc. xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); x.e = -sd || 0; } else { // Zero. xd[0] = x.e = 0; } return x; } // Remove excess digits. if (i == 0) { xd.length = xdi; k = 1; xdi--; } else { xd.length = xdi + 1; k = mathpow(10, LOG_BASE - i); // E.g. 56700 becomes 56000 if 7 is the rounding digit. // j > 0 means i > number of leading zeros of w. xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0; } if (roundUp) { for (;;) { // Is the digit to be rounded up in the first word of xd? if (xdi == 0) { // i will be the length of xd[0] before k is added. for (i = 1, j = xd[0]; j >= 10; j /= 10) i++; j = xd[0] += k; for (k = 1; j >= 10; j /= 10) k++; // if i != k the length has increased. if (i != k) { x.e++; if (xd[0] == BASE) xd[0] = 1; } break; } else { xd[xdi] += k; if (xd[xdi] != BASE) break; xd[xdi--] = 0; k = 1; } } } // Remove trailing zeros. for (i = xd.length; xd[--i] === 0;) xd.pop(); } if (external) { // Overflow? if (x.e > Ctor.maxE) { // Infinity. x.d = null; x.e = NaN; // Underflow? } else if (x.e < Ctor.minE) { // Zero. x.e = 0; x.d = [0]; // Ctor.underflow = true; } // else Ctor.underflow = false; } return x; } function finiteToString(x, isExp, sd) { if (!x.isFinite()) return nonFiniteToString(x); var k, e = x.e, str = digitsToString(x.d), len = str.length; if (isExp) { if (sd && (k = sd - len) > 0) { str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k); } else if (len > 1) { str = str.charAt(0) + '.' + str.slice(1); } str = str + (x.e < 0 ? 'e' : 'e+') + x.e; } else if (e < 0) { str = '0.' + getZeroString(-e - 1) + str; if (sd && (k = sd - len) > 0) str += getZeroString(k); } else if (e >= len) { str += getZeroString(e + 1 - len); if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k); } else { if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k); if (sd && (k = sd - len) > 0) { if (e + 1 === len) str += '.'; str += getZeroString(k); } } return str; } // Calculate the base 10 exponent from the base 1e7 exponent. function getBase10Exponent(digits, e) { var w = digits[0]; // Add the number of digits of the first word of the digits array. for ( e *= LOG_BASE; w >= 10; w /= 10) e++; return e; } function getLn10(Ctor, sd, pr) { if (sd > LN10_PRECISION) { // Reset global state in case the exception is caught. external = true; if (pr) Ctor.precision = pr; throw Error(precisionLimitExceeded); } return finalise(new Ctor(LN10), sd, 1, true); } function getPi(Ctor, sd, rm) { if (sd > PI_PRECISION) throw Error(precisionLimitExceeded); return finalise(new Ctor(PI), sd, rm, true); } function getPrecision(digits) { var w = digits.length - 1, len = w * LOG_BASE + 1; w = digits[w]; // If non-zero... if (w) { // Subtract the number of trailing zeros of the last word. for (; w % 10 == 0; w /= 10) len--; // Add the number of digits of the first word. for (w = digits[0]; w >= 10; w /= 10) len++; } return len; } function getZeroString(k) { var zs = ''; for (; k--;) zs += '0'; return zs; } /* * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an * integer of type number. * * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`. * */ function intPow(Ctor, x, n, pr) { var isTruncated, r = new Ctor(1), // Max n of 9007199254740991 takes 53 loop iterations. // Maximum digits array length; leaves [28, 34] guard digits. k = Math.ceil(pr / LOG_BASE + 4); external = false; for (;;) { if (n % 2) { r = r.times(x); if (truncate(r.d, k)) isTruncated = true; } n = mathfloor(n / 2); if (n === 0) { // To ensure correct rounding when r.d is truncated, increment the last word if it is zero. n = r.d.length - 1; if (isTruncated && r.d[n] === 0) ++r.d[n]; break; } x = x.times(x); truncate(x.d, k); } external = true; return r; } function isOdd(n) { return n.d[n.d.length - 1] & 1; } /* * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'. */ function maxOrMin(Ctor, args, ltgt) { var y, x = new Ctor(args[0]), i = 0; for (; ++i < args.length;) { y = new Ctor(args[i]); if (!y.s) { x = y; break; } else if (x[ltgt](y)) { x = y; } } return x; } /* * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant * digits. * * Taylor/Maclaurin series. * * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ... * * Argument reduction: * Repeat x = x / 32, k += 5, until |x| < 0.1 * exp(x) = exp(x / 2^k)^(2^k) * * Previously, the argument was initially reduced by * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10) * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was * found to be slower than just dividing repeatedly by 32 as above. * * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000 * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000 * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324) * * exp(Infinity) = Infinity * exp(-Infinity) = 0 * exp(NaN) = NaN * exp(±0) = 1 * * exp(x) is non-terminating for any finite, non-zero x. * * The result will always be correctly rounded. * */ function naturalExponential(x, sd) { var denominator, guard, j, pow, sum, t, wpr, rep = 0, i = 0, k = 0, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; // 0/NaN/Infinity? if (!x.d || !x.d[0] || x.e > 17) { return new Ctor(x.d ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 : x.s ? x.s < 0 ? 0 : x : 0 / 0); } if (sd == null) { external = false; wpr = pr; } else { wpr = sd; } t = new Ctor(0.03125); // while abs(x) >= 0.1 while (x.e > -2) { // x = x / 2^5 x = x.times(t); k += 5; } // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision // necessary to ensure the first 4 rounding digits are correct. guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0; wpr += guard; denominator = pow = sum = new Ctor(1); Ctor.precision = wpr; for (;;) { pow = finalise(pow.times(x), wpr, 1); denominator = denominator.times(++i); t = sum.plus(divide(pow, denominator, wpr, 1)); if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { j = k; while (j--) sum = finalise(sum.times(sum), wpr, 1); // Check to see if the first 4 rounding digits are [49]999. // If so, repeat the summation with a higher precision, otherwise // e.g. with precision: 18, rounding: 1 // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123) // `wpr - guard` is the index of first rounding digit. if (sd == null) { if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { Ctor.precision = wpr += 10; denominator = pow = t = new Ctor(1); i = 0; rep++; } else { return finalise(sum, Ctor.precision = pr, rm, external = true); } } else { Ctor.precision = pr; return sum; } } sum = t; } } /* * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant * digits. * * ln(-n) = NaN * ln(0) = -Infinity * ln(-0) = -Infinity * ln(1) = 0 * ln(Infinity) = Infinity * ln(-Infinity) = NaN * ln(NaN) = NaN * * ln(n) (n != 1) is non-terminating. * */ function naturalLogarithm(y, sd) { var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2, n = 1, guard = 10, x = y, xd = x.d, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; // Is x negative or Infinity, NaN, 0 or 1? if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) { return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x); } if (sd == null) { external = false; wpr = pr; } else { wpr = sd; } Ctor.precision = wpr += guard; c = digitsToString(xd); c0 = c.charAt(0); if (Math.abs(e = x.e) < 1.5e15) { // Argument reduction. // The series converges faster the closer the argument is to 1, so using // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b // multiply the argument by itself until the leading digits of the significand are 7, 8, 9, // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can // later be divided by this number, then separate out the power of 10 using // ln(a*10^b) = ln(a) + b*ln(10). // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14). //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) { // max n is 6 (gives 0.7 - 1.3) while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) { x = x.times(y); c = digitsToString(x.d); c0 = c.charAt(0); n++; } e = x.e; if (c0 > 1) { x = new Ctor('0.' + c); e++; } else { x = new Ctor(c0 + '.' + c.slice(1)); } } else { // The argument reduction method above may result in overflow if the argument y is a massive // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this // function using ln(x*10^e) = ln(x) + e*ln(10). t = getLn10(Ctor, wpr + 2, pr).times(e + ''); x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t); Ctor.precision = pr; return sd == null ? finalise(x, pr, rm, external = true) : x; } // x1 is x reduced to a value near 1. x1 = x; // Taylor series. // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...) // where x = (y - 1)/(y + 1) (|x| < 1) sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1); x2 = finalise(x.times(x), wpr, 1); denominator = 3; for (;;) { numerator = finalise(numerator.times(x2), wpr, 1); t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1)); if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { sum = sum.times(2); // Reverse the argument reduction. Check that e is not 0 because, besides preventing an // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0. if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + '')); sum = divide(sum, new Ctor(n), wpr, 1); // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has // been repeated previously) and the first 4 rounding digits 9999? // If so, restart the summation with a higher precision, otherwise // e.g. with precision: 12, rounding: 1 // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463. // `wpr - guard` is the index of first rounding digit. if (sd == null) { if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { Ctor.precision = wpr += guard; t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1); x2 = finalise(x.times(x), wpr, 1); denominator = rep = 1; } else { return finalise(sum, Ctor.precision = pr, rm, external = true); } } else { Ctor.precision = pr; return sum; } } sum = t; denominator += 2; } } // ±Infinity, NaN. function nonFiniteToString(x) { // Unsigned. return String(x.s * x.s / 0); } /* * Parse the value of a new Decimal `x` from string `str`. */ function parseDecimal(x, str) { var e, i, len; // Decimal point? if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); // Exponential form? if ((i = str.search(/e/i)) > 0) { // Determine exponent. if (e < 0) e = i; e += +str.slice(i + 1); str = str.substring(0, i); } else if (e < 0) { // Integer. e = str.length; } // Determine leading zeros. for (i = 0; str.charCodeAt(i) === 48; i++); // Determine trailing zeros. for (len = str.length; str.charCodeAt(len - 1) === 48; --len); str = str.slice(i, len); if (str) { len -= i; x.e = e = e - i - 1; x.d = []; // Transform base // e is the base 10 exponent. // i is where to slice str to get the first word of the digits array. i = (e + 1) % LOG_BASE; if (e < 0) i += LOG_BASE; if (i < len) { if (i) x.d.push(+str.slice(0, i)); for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE)); str = str.slice(i); i = LOG_BASE - str.length; } else { i -= len; } for (; i--;) str += '0'; x.d.push(+str); if (external) { // Overflow? if (x.e > x.constructor.maxE) { // Infinity. x.d = null; x.e = NaN; // Underflow? } else if (x.e < x.constructor.minE) { // Zero. x.e = 0; x.d = [0]; // x.constructor.underflow = true; } // else x.constructor.underflow = false; } } else { // Zero. x.e = 0; x.d = [0]; } return x; } /* * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value. */ function parseOther(x, str) { var base, Ctor, divisor, i, isFloat, len, p, xd, xe; if (str === 'Infinity' || str === 'NaN') { if (!+str) x.s = NaN; x.e = NaN; x.d = null; return x; } if (isHex.test(str)) { base = 16; str = str.toLowerCase(); } else if (isBinary.test(str)) { base = 2; } else if (isOctal.test(str)) { base = 8; } else { throw Error(invalidArgument + str); } // Is there a binary exponent part? i = str.search(/p/i); if (i > 0) { p = +str.slice(i + 1); str = str.substring(2, i); } else { str = str.slice(2); } // Convert `str` as an integer then divide the result by `base` raised to a power such that the // fraction part will be restored. i = str.indexOf('.'); isFloat = i >= 0; Ctor = x.constructor; if (isFloat) { str = str.replace('.', ''); len = str.length; i = len - i; // log[10](16) = 1.2041... , log[10](88) = 1.9444.... divisor = intPow(Ctor, new Ctor(base), i, i * 2); } xd = convertBase(str, base, BASE); xe = xd.length - 1; // Remove trailing zeros. for (i = xe; xd[i] === 0; --i) xd.pop(); if (i < 0) return new Ctor(x.s * 0); x.e = getBase10Exponent(xd, xe); x.d = xd; external = false; // At what precision to perform the division to ensure exact conversion? // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount) // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412 // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits. // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount // Therefore using 4 * the number of digits of str will always be enough. if (isFloat) x = divide(x, divisor, len * 4); // Multiply by the binary exponent part if present. if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p)); external = true; return x; } /* * sin(x) = x - x^3/3! + x^5/5! - ... * |x| < pi/2 * */ function sine(Ctor, x) { var k, len = x.d.length; if (len < 3) return taylorSeries(Ctor, 2, x, x); // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x) // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5) // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20)) // Estimate the optimum number of times to use the argument reduction. k = 1.4 * Math.sqrt(len); k = k > 16 ? 16 : k | 0; x = x.times(1 / tinyPow(5, k)); x = taylorSeries(Ctor, 2, x, x); // Reverse argument reduction var sin2_x, d5 = new Ctor(5), d16 = new Ctor(16), d20 = new Ctor(20); for (; k--;) { sin2_x = x.times(x); x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20)))); } return x; } // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`. function taylorSeries(Ctor, n, x, y, isHyperbolic) { var j, t, u, x2, i = 1, pr = Ctor.precision, k = Math.ceil(pr / LOG_BASE); external = false; x2 = x.times(x); u = new Ctor(y); for (;;) { t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1); u = isHyperbolic ? y.plus(t) : y.minus(t); y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1); t = u.plus(y); if (t.d[k] !== void 0) { for (j = k; t.d[j] === u.d[j] && j--;); if (j == -1) break; } j = u; u = y; y = t; t = j; i++; } external = true; t.d.length = k + 1; return t; } // Exponent e must be positive and non-zero. function tinyPow(b, e) { var n = b; while (--e) n *= b; return n; } // Return the absolute value of `x` reduced to less than or equal to half pi. function toLessThanHalfPi(Ctor, x) { var t, isNeg = x.s < 0, pi = getPi(Ctor, Ctor.precision, 1), halfPi = pi.times(0.5); x = x.abs(); if (x.lte(halfPi)) { quadrant = isNeg ? 4 : 1; return x; } t = x.divToInt(pi); if (t.isZero()) { quadrant = isNeg ? 3 : 2; } else { x = x.minus(t.times(pi)); // 0 <= x < pi if (x.lte(halfPi)) { quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1); return x; } quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2); } return x.minus(pi).abs(); } /* * Return the value of Decimal `x` as a string in base `baseOut`. * * If the optional `sd` argument is present include a binary exponent suffix. */ function toStringBinary(x, baseOut, sd, rm) { var base, e, i, k, len, roundUp, str, xd, y, Ctor = x.constructor, isExp = sd !== void 0; if (isExp) { checkInt32(sd, 1, MAX_DIGITS); if (rm === void 0) rm = Ctor.rounding; else checkInt32(rm, 0, 8); } else { sd = Ctor.precision; rm = Ctor.rounding; } if (!x.isFinite()) { str = nonFiniteToString(x); } else { str = finiteToString(x); i = str.indexOf('.'); // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required: // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10)) // minBinaryExponent = floor(decimalExponent * log[2](10)) // log[2](10) = 3.321928094887362347870319429489390175864 if (isExp) { base = 2; if (baseOut == 16) { sd = sd * 4 - 3; } else if (baseOut == 8) { sd = sd * 3 - 2; } } else { base = baseOut; } // Convert the number as an integer then divide the result by its base raised to a power such // that the fraction part will be restored. // Non-integer. if (i >= 0) { str = str.replace('.', ''); y = new Ctor(1); y.e = str.length - i; y.d = convertBase(finiteToString(y), 10, base); y.e = y.d.length; } xd = convertBase(str, 10, base); e = len = xd.length; // Remove trailing zeros. for (; xd[--len] == 0;) xd.pop(); if (!xd[0]) { str = isExp ? '0p+0' : '0'; } else { if (i < 0) { e--; } else { x = new Ctor(x); x.d = xd; x.e = e; x = divide(x, y, sd, rm, 0, base); xd = x.d; e = x.e; roundUp = inexact; } // The rounding digit, i.e. the digit after the digit that may be rounded up. i = xd[sd]; k = base / 2; roundUp = roundUp || xd[sd + 1] !== void 0; roundUp = rm < 4 ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2)) : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 || rm === (x.s < 0 ? 8 : 7)); xd.length = sd; if (roundUp) { // Rounding up may mean the previous digit has to be rounded up and so on. for (; ++xd[--sd] > base - 1;) { xd[sd] = 0; if (!sd) { ++e; xd.unshift(1); } } } // Determine trailing zeros. for (len = xd.length; !xd[len - 1]; --len); // E.g. [4, 11, 15] becomes 4bf. for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]); // Add binary exponent suffix? if (isExp) { if (len > 1) { if (baseOut == 16 || baseOut == 8) { i = baseOut == 16 ? 4 : 3; for (--len; len % i; len++) str += '0'; xd = convertBase(str, base, baseOut); for (len = xd.length; !xd[len - 1]; --len); // xd[0] will always be be 1 for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]); } else { str = str.charAt(0) + '.' + str.slice(1); } } str = str + (e < 0 ? 'p' : 'p+') + e; } else if (e < 0) { for (; ++e;) str = '0' + str; str = '0.' + str; } else { if (++e > len) for (e -= len; e-- ;) str += '0'; else if (e < len) str = str.slice(0, e) + '.' + str.slice(e); } } str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str; } return x.s < 0 ? '-' + str : str; } // Does not strip trailing zeros. function truncate(arr, len) { if (arr.length > len) { arr.length = len; return true; } } // Decimal methods /* * abs * acos * acosh * add * asin * asinh * atan * atanh * atan2 * cbrt * ceil * clone * config * cos * cosh * div * exp * floor * hypot * ln * log * log2 * log10 * max * min * mod * mul * pow * random * round * set * sign * sin * sinh * sqrt * sub * tan * tanh * trunc */ /* * Return a new Decimal whose value is the absolute value of `x`. * * x {number|string|Decimal} * */ function abs(x) { return new this(x).abs(); } /* * Return a new Decimal whose value is the arccosine in radians of `x`. * * x {number|string|Decimal} * */ function acos(x) { return new this(x).acos(); } /* * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to * `precision` significant digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function acosh(x) { return new this(x).acosh(); } /* * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} * y {number|string|Decimal} * */ function add(x, y) { return new this(x).plus(y); } /* * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function asin(x) { return new this(x).asin(); } /* * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to * `precision` significant digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function asinh(x) { return new this(x).asinh(); } /* * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function atan(x) { return new this(x).atan(); } /* * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to * `precision` significant digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function atanh(x) { return new this(x).atanh(); } /* * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`. * * Domain: [-Infinity, Infinity] * Range: [-pi, pi] * * y {number|string|Decimal} The y-coordinate. * x {number|string|Decimal} The x-coordinate. * * atan2(±0, -0) = ±pi * atan2(±0, +0) = ±0 * atan2(±0, -x) = ±pi for x > 0 * atan2(±0, x) = ±0 for x > 0 * atan2(-y, ±0) = -pi/2 for y > 0 * atan2(y, ±0) = pi/2 for y > 0 * atan2(±y, -Infinity) = ±pi for finite y > 0 * atan2(±y, +Infinity) = ±0 for finite y > 0 * atan2(±Infinity, x) = ±pi/2 for finite x * atan2(±Infinity, -Infinity) = ±3*pi/4 * atan2(±Infinity, +Infinity) = ±pi/4 * atan2(NaN, x) = NaN * atan2(y, NaN) = NaN * */ function atan2(y, x) { y = new this(y); x = new this(x); var r, pr = this.precision, rm = this.rounding, wpr = pr + 4; // Either NaN if (!y.s || !x.s) { r = new this(NaN); // Both ±Infinity } else if (!y.d && !x.d) { r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75); r.s = y.s; // x is ±Infinity or y is ±0 } else if (!x.d || y.isZero()) { r = x.s < 0 ? getPi(this, pr, rm) : new this(0); r.s = y.s; // y is ±Infinity or x is ±0 } else if (!y.d || x.isZero()) { r = getPi(this, wpr, 1).times(0.5); r.s = y.s; // Both non-zero and finite } else if (x.s < 0) { this.precision = wpr; this.rounding = 1; r = this.atan(divide(y, x, wpr, 1)); x = getPi(this, wpr, 1); this.precision = pr; this.rounding = rm; r = y.s < 0 ? r.minus(x) : r.plus(x); } else { r = this.atan(divide(y, x, wpr, 1)); } return r; } /* * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function cbrt(x) { return new this(x).cbrt(); } /* * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`. * * x {number|string|Decimal} * */ function ceil(x) { return finalise(x = new this(x), x.e + 1, 2); } /* * Configure global settings for a Decimal constructor. * * `obj` is an object with one or more of the following properties, * * precision {number} * rounding {number} * toExpNeg {number} * toExpPos {number} * maxE {number} * minE {number} * modulo {number} * crypto {boolean|number} * defaults {true} * * E.g. Decimal.config({ precision: 20, rounding: 4 }) * */ function config(obj) { if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected'); var i, p, v, useDefaults = obj.defaults === true, ps = [ 'precision', 1, MAX_DIGITS, 'rounding', 0, 8, 'toExpNeg', -EXP_LIMIT, 0, 'toExpPos', 0, EXP_LIMIT, 'maxE', 0, EXP_LIMIT, 'minE', -EXP_LIMIT, 0, 'modulo', 0, 9 ]; for (i = 0; i < ps.length; i += 3) { if (p = ps[i], useDefaults) this[p] = DEFAULTS[p]; if ((v = obj[p]) !== void 0) { if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v; else throw Error(invalidArgument + p + ': ' + v); } } if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p]; if ((v = obj[p]) !== void 0) { if (v === true || v === false || v === 0 || v === 1) { if (v) { if (typeof crypto != 'undefined' && crypto && (crypto.getRandomValues || crypto.randomBytes)) { this[p] = true; } else { throw Error(cryptoUnavailable); } } else { this[p] = false; } } else { throw Error(invalidArgument + p + ': ' + v); } } return this; } /* * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function cos(x) { return new this(x).cos(); } /* * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function cosh(x) { return new this(x).cosh(); } /* * Create and return a Decimal constructor with the same configuration properties as this Decimal * constructor. * */ function clone(obj) { var i, p, ps; /* * The Decimal constructor and exported function. * Return a new Decimal instance. * * v {number|string|Decimal} A numeric value. * */ function Decimal(v) { var e, i, t, x = this; // Decimal called without new. if (!(x instanceof Decimal)) return new Decimal(v); // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor // which points to Object. x.constructor = Decimal; // Duplicate. if (v instanceof Decimal) { x.s = v.s; if (external) { if (!v.d || v.e > Decimal.maxE) { // Infinity. x.e = NaN; x.d = null; } else if (v.e < Decimal.minE) { // Zero. x.e = 0; x.d = [0]; } else { x.e = v.e; x.d = v.d.slice(); } } else { x.e = v.e; x.d = v.d ? v.d.slice() : v.d; } return; } t = typeof v; if (t === 'number') { if (v === 0) { x.s = 1 / v < 0 ? -1 : 1; x.e = 0; x.d = [0]; return; } if (v < 0) { v = -v; x.s = -1; } else { x.s = 1; } // Fast path for small integers. if (v === ~~v && v < 1e7) { for (e = 0, i = v; i >= 10; i /= 10) e++; if (external) { if (e > Decimal.maxE) { x.e = NaN; x.d = null; } else if (e < Decimal.minE) { x.e = 0; x.d = [0]; } else { x.e = e; x.d = [v]; } } else { x.e = e; x.d = [v]; } return; // Infinity, NaN. } else if (v * 0 !== 0) { if (!v) x.s = NaN; x.e = NaN; x.d = null; return; } return parseDecimal(x, v.toString()); } else if (t !== 'string') { throw Error(invalidArgument + v); } // Minus sign? if ((i = v.charCodeAt(0)) === 45) { v = v.slice(1); x.s = -1; } else { // Plus sign? if (i === 43) v = v.slice(1); x.s = 1; } return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v); } Decimal.prototype = P; Decimal.ROUND_UP = 0; Decimal.ROUND_DOWN = 1; Decimal.ROUND_CEIL = 2; Decimal.ROUND_FLOOR = 3; Decimal.ROUND_HALF_UP = 4; Decimal.ROUND_HALF_DOWN = 5; Decimal.ROUND_HALF_EVEN = 6; Decimal.ROUND_HALF_CEIL = 7; Decimal.ROUND_HALF_FLOOR = 8; Decimal.EUCLID = 9; Decimal.config = Decimal.set = config; Decimal.clone = clone; Decimal.isDecimal = isDecimalInstance; Decimal.abs = abs; Decimal.acos = acos; Decimal.acosh = acosh; // ES6 Decimal.add = add; Decimal.asin = asin; Decimal.asinh = asinh; // ES6 Decimal.atan = atan; Decimal.atanh = atanh; // ES6 Decimal.atan2 = atan2; Decimal.cbrt = cbrt; // ES6 Decimal.ceil = ceil; Decimal.cos = cos; Decimal.cosh = cosh; // ES6 Decimal.div = div; Decimal.exp = exp; Decimal.floor = floor; Decimal.hypot = hypot; // ES6 Decimal.ln = ln; Decimal.log = log; Decimal.log10 = log10; // ES6 Decimal.log2 = log2; // ES6 Decimal.max = max; Decimal.min = min; Decimal.mod = mod; Decimal.mul = mul; Decimal.pow = pow; Decimal.random = random; Decimal.round = round; Decimal.sign = sign; // ES6 Decimal.sin = sin; Decimal.sinh = sinh; // ES6 Decimal.sqrt = sqrt; Decimal.sub = sub; Decimal.tan = tan; Decimal.tanh = tanh; // ES6 Decimal.trunc = trunc; // ES6 if (obj === void 0) obj = {}; if (obj) { if (obj.defaults !== true) { ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto']; for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p]; } } Decimal.config(obj); return Decimal; } /* * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} * y {number|string|Decimal} * */ function div(x, y) { return new this(x).div(y); } /* * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} The power to which to raise the base of the natural log. * */ function exp(x) { return new this(x).exp(); } /* * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`. * * x {number|string|Decimal} * */ function floor(x) { return finalise(x = new this(x), x.e + 1, 3); } /* * Return a new Decimal whose value is the square root of the sum of the squares of the arguments, * rounded to `precision` significant digits using rounding mode `rounding`. * * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...) * * arguments {number|string|Decimal} * */ function hypot() { var i, n, t = new this(0); external = false; for (i = 0; i < arguments.length;) { n = new this(arguments[i++]); if (!n.d) { if (n.s) { external = true; return new this(1 / 0); } t = n; } else if (t.d) { t = t.plus(n.times(n)); } } external = true; return t.sqrt(); } /* * Return true if object is a Decimal instance (where Decimal is any Decimal constructor), * otherwise return false. * */ function isDecimalInstance(obj) { return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false; } /* * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function ln(x) { return new this(x).ln(); } /* * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base * is specified, rounded to `precision` significant digits using rounding mode `rounding`. * * log[y](x) * * x {number|string|Decimal} The argument of the logarithm. * y {number|string|Decimal} The base of the logarithm. * */ function log(x, y) { return new this(x).log(y); } /* * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function log2(x) { return new this(x).log(2); } /* * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function log10(x) { return new this(x).log(10); } /* * Return a new Decimal whose value is the maximum of the arguments. * * arguments {number|string|Decimal} * */ function max() { return maxOrMin(this, arguments, 'lt'); } /* * Return a new Decimal whose value is the minimum of the arguments. * * arguments {number|string|Decimal} * */ function min() { return maxOrMin(this, arguments, 'gt'); } /* * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits * using rounding mode `rounding`. * * x {number|string|Decimal} * y {number|string|Decimal} * */ function mod(x, y) { return new this(x).mod(y); } /* * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} * y {number|string|Decimal} * */ function mul(x, y) { return new this(x).mul(y); } /* * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} The base. * y {number|string|Decimal} The exponent. * */ function pow(x, y) { return new this(x).pow(y); } /* * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros * are produced). * * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive. * */ function random(sd) { var d, e, k, n, i = 0, r = new this(1), rd = []; if (sd === void 0) sd = this.precision; else checkInt32(sd, 1, MAX_DIGITS); k = Math.ceil(sd / LOG_BASE); if (!this.crypto) { for (; i < k;) rd[i++] = Math.random() * 1e7 | 0; // Browsers supporting crypto.getRandomValues. } else if (crypto.getRandomValues) { d = crypto.getRandomValues(new Uint32Array(k)); for (; i < k;) { n = d[i]; // 0 <= n < 4294967296 // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865). if (n >= 4.29e9) { d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; } else { // 0 <= n <= 4289999999 // 0 <= (n % 1e7) <= 9999999 rd[i++] = n % 1e7; } } // Node.js supporting crypto.randomBytes. } else if (crypto.randomBytes) { // buffer d = crypto.randomBytes(k *= 4); for (; i < k;) { // 0 <= n < 2147483648 n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). if (n >= 2.14e9) { crypto.randomBytes(4).copy(d, i); } else { // 0 <= n <= 2139999999 // 0 <= (n % 1e7) <= 9999999 rd.push(n % 1e7); i += 4; } } i = k / 4; } else { throw Error(cryptoUnavailable); } k = rd[--i]; sd %= LOG_BASE; // Convert trailing digits to zeros according to sd. if (k && sd) { n = mathpow(10, LOG_BASE - sd); rd[i] = (k / n | 0) * n; } // Remove trailing words which are zero. for (; rd[i] === 0; i--) rd.pop(); // Zero? if (i < 0) { e = 0; rd = [0]; } else { e = -1; // Remove leading words which are zero and adjust exponent accordingly. for (; rd[0] === 0; e -= LOG_BASE) rd.shift(); // Count the digits of the first word of rd to determine leading zeros. for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; // Adjust the exponent for leading zeros of the first word of rd. if (k < LOG_BASE) e -= LOG_BASE - k; } r.e = e; r.d = rd; return r; } /* * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`. * * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL). * * x {number|string|Decimal} * */ function round(x) { return finalise(x = new this(x), x.e + 1, this.rounding); } /* * Return * 1 if x > 0, * -1 if x < 0, * 0 if x is 0, * -0 if x is -0, * NaN otherwise * * x {number|string|Decimal} * */ function sign(x) { x = new this(x); return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN; } /* * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits * using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function sin(x) { return new this(x).sin(); } /* * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function sinh(x) { return new this(x).sinh(); } /* * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} * */ function sqrt(x) { return new this(x).sqrt(); } /* * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits * using rounding mode `rounding`. * * x {number|string|Decimal} * y {number|string|Decimal} * */ function sub(x, y) { return new this(x).sub(y); } /* * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant * digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function tan(x) { return new this(x).tan(); } /* * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * * x {number|string|Decimal} A value in radians. * */ function tanh(x) { return new this(x).tanh(); } /* * Return a new Decimal whose value is `x` truncated to an integer. * * x {number|string|Decimal} * */ function trunc(x) { return finalise(x = new this(x), x.e + 1, 1); } // Create and configure initial Decimal constructor. Decimal = clone(DEFAULTS); Decimal['default'] = Decimal.Decimal = Decimal; // Create the internal constants from their string values. LN10 = new Decimal(LN10); PI = new Decimal(PI); // Export. // AMD. if (typeof define == 'function' && define.amd) { define(function () { return Decimal; }); // Node and other environments that support module.exports. } else if ( true && module.exports) { if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') { P[Symbol.for('nodejs.util.inspect.custom')] = P.toString; P[Symbol.toStringTag] = 'Decimal'; } module.exports = Decimal; // Browser. } else { if (!globalScope) { globalScope = typeof self != 'undefined' && self && self.self == self ? self : window; } noConflict = globalScope.Decimal; Decimal.noConflict = function () { globalScope.Decimal = noConflict; return Decimal; }; globalScope.Decimal = Decimal; } })(this); /***/ }), /***/ 18611: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Stream = __webpack_require__(92413).Stream; var util = __webpack_require__(31669); 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)); }; /***/ }), /***/ 85589: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; const legacyErrorCodes = __webpack_require__(37297); const idlUtils = __webpack_require__(69497); exports.implementation = class DOMExceptionImpl { constructor(globalObject, [message, name]) { this.name = name; this.message = message; } get code() { return legacyErrorCodes[this.name] || 0; } }; // A proprietary V8 extension that causes the stack property to appear. exports.init = impl => { if (Error.captureStackTrace) { const wrapper = idlUtils.wrapperForImpl(impl); Error.captureStackTrace(wrapper, wrapper.constructor); } }; /***/ }), /***/ 37561: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const conversions = __webpack_require__(19463); const utils = __webpack_require__(69497); const impl = utils.implSymbol; const ctorRegistry = utils.ctorRegistrySymbol; const iface = { // When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()` // method into this array. It allows objects that directly implements *those* interfaces to be recognized as // implementing this mixin interface. _mixedIntoPredicates: [], is(obj) { if (obj) { if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) { return true; } for (const isMixedInto of module.exports._mixedIntoPredicates) { if (isMixedInto(obj)) { return true; } } } return false; }, isImpl(obj) { if (obj) { if (obj instanceof Impl.implementation) { return true; } const wrapper = utils.wrapperForImpl(obj); for (const isMixedInto of module.exports._mixedIntoPredicates) { if (isMixedInto(wrapper)) { return true; } } } return false; }, convert(obj, { context = "The provided value" } = {}) { if (module.exports.is(obj)) { return utils.implForWrapper(obj); } throw new TypeError(`${context} is not of type 'DOMException'.`); }, create(globalObject, constructorArgs, privateData) { if (globalObject[ctorRegistry] === undefined) { throw new Error("Internal error: invalid global object"); } const ctor = globalObject[ctorRegistry]["DOMException"]; if (ctor === undefined) { throw new Error("Internal error: constructor DOMException is not installed on the passed global object"); } let obj = Object.create(ctor.prototype); obj = iface.setup(obj, globalObject, constructorArgs, privateData); return obj; }, createImpl(globalObject, constructorArgs, privateData) { const obj = iface.create(globalObject, constructorArgs, privateData); return utils.implForWrapper(obj); }, _internalSetup(obj) {}, setup(obj, globalObject, constructorArgs = [], privateData = {}) { privateData.wrapper = obj; iface._internalSetup(obj); Object.defineProperty(obj, impl, { value: new Impl.implementation(globalObject, constructorArgs, privateData), configurable: true }); obj[impl][utils.wrapperSymbol] = obj; if (Impl.init) { Impl.init(obj[impl], privateData); } return obj; }, install(globalObject) { class DOMException { constructor() { const args = []; { let curArg = arguments[0]; if (curArg !== undefined) { curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'DOMException': parameter 1" }); } else { curArg = ""; } args.push(curArg); } { let curArg = arguments[1]; if (curArg !== undefined) { curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'DOMException': parameter 2" }); } else { curArg = "Error"; } args.push(curArg); } return iface.setup(Object.create(new.target.prototype), globalObject, args); } get name() { if (!this || !module.exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["name"]; } get message() { if (!this || !module.exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["message"]; } get code() { if (!this || !module.exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["code"]; } } Object.defineProperties(DOMException.prototype, { name: { enumerable: true }, message: { enumerable: true }, code: { enumerable: true }, [Symbol.toStringTag]: { value: "DOMException", configurable: true }, INDEX_SIZE_ERR: { value: 1, enumerable: true }, DOMSTRING_SIZE_ERR: { value: 2, enumerable: true }, HIERARCHY_REQUEST_ERR: { value: 3, enumerable: true }, WRONG_DOCUMENT_ERR: { value: 4, enumerable: true }, INVALID_CHARACTER_ERR: { value: 5, enumerable: true }, NO_DATA_ALLOWED_ERR: { value: 6, enumerable: true }, NO_MODIFICATION_ALLOWED_ERR: { value: 7, enumerable: true }, NOT_FOUND_ERR: { value: 8, enumerable: true }, NOT_SUPPORTED_ERR: { value: 9, enumerable: true }, INUSE_ATTRIBUTE_ERR: { value: 10, enumerable: true }, INVALID_STATE_ERR: { value: 11, enumerable: true }, SYNTAX_ERR: { value: 12, enumerable: true }, INVALID_MODIFICATION_ERR: { value: 13, enumerable: true }, NAMESPACE_ERR: { value: 14, enumerable: true }, INVALID_ACCESS_ERR: { value: 15, enumerable: true }, VALIDATION_ERR: { value: 16, enumerable: true }, TYPE_MISMATCH_ERR: { value: 17, enumerable: true }, SECURITY_ERR: { value: 18, enumerable: true }, NETWORK_ERR: { value: 19, enumerable: true }, ABORT_ERR: { value: 20, enumerable: true }, URL_MISMATCH_ERR: { value: 21, enumerable: true }, QUOTA_EXCEEDED_ERR: { value: 22, enumerable: true }, TIMEOUT_ERR: { value: 23, enumerable: true }, INVALID_NODE_TYPE_ERR: { value: 24, enumerable: true }, DATA_CLONE_ERR: { value: 25, enumerable: true } }); Object.defineProperties(DOMException, { INDEX_SIZE_ERR: { value: 1, enumerable: true }, DOMSTRING_SIZE_ERR: { value: 2, enumerable: true }, HIERARCHY_REQUEST_ERR: { value: 3, enumerable: true }, WRONG_DOCUMENT_ERR: { value: 4, enumerable: true }, INVALID_CHARACTER_ERR: { value: 5, enumerable: true }, NO_DATA_ALLOWED_ERR: { value: 6, enumerable: true }, NO_MODIFICATION_ALLOWED_ERR: { value: 7, enumerable: true }, NOT_FOUND_ERR: { value: 8, enumerable: true }, NOT_SUPPORTED_ERR: { value: 9, enumerable: true }, INUSE_ATTRIBUTE_ERR: { value: 10, enumerable: true }, INVALID_STATE_ERR: { value: 11, enumerable: true }, SYNTAX_ERR: { value: 12, enumerable: true }, INVALID_MODIFICATION_ERR: { value: 13, enumerable: true }, NAMESPACE_ERR: { value: 14, enumerable: true }, INVALID_ACCESS_ERR: { value: 15, enumerable: true }, VALIDATION_ERR: { value: 16, enumerable: true }, TYPE_MISMATCH_ERR: { value: 17, enumerable: true }, SECURITY_ERR: { value: 18, enumerable: true }, NETWORK_ERR: { value: 19, enumerable: true }, ABORT_ERR: { value: 20, enumerable: true }, URL_MISMATCH_ERR: { value: 21, enumerable: true }, QUOTA_EXCEEDED_ERR: { value: 22, enumerable: true }, TIMEOUT_ERR: { value: 23, enumerable: true }, INVALID_NODE_TYPE_ERR: { value: 24, enumerable: true }, DATA_CLONE_ERR: { value: 25, enumerable: true } }); if (globalObject[ctorRegistry] === undefined) { globalObject[ctorRegistry] = Object.create(null); } globalObject[ctorRegistry]["DOMException"] = DOMException; Object.defineProperty(globalObject, "DOMException", { configurable: true, writable: true, value: DOMException }); } }; // iface module.exports = iface; const Impl = __webpack_require__(85589); /***/ }), /***/ 69497: /***/ ((module, exports) => { "use strict"; // Returns "Type(value) is Object" in ES terminology. function isObject(value) { return typeof value === "object" && value !== null || typeof value === "function"; } function hasOwn(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } const wrapperSymbol = Symbol("wrapper"); const implSymbol = Symbol("impl"); const sameObjectCaches = Symbol("SameObject caches"); const ctorRegistrySymbol = Symbol.for("[webidl2js] constructor registry"); function getSameObject(wrapper, prop, creator) { if (!wrapper[sameObjectCaches]) { wrapper[sameObjectCaches] = Object.create(null); } if (prop in wrapper[sameObjectCaches]) { return wrapper[sameObjectCaches][prop]; } wrapper[sameObjectCaches][prop] = creator(); return wrapper[sameObjectCaches][prop]; } function wrapperForImpl(impl) { return impl ? impl[wrapperSymbol] : null; } function implForWrapper(wrapper) { return wrapper ? wrapper[implSymbol] : null; } function tryWrapperForImpl(impl) { const wrapper = wrapperForImpl(impl); return wrapper ? wrapper : impl; } function tryImplForWrapper(wrapper) { const impl = implForWrapper(wrapper); return impl ? impl : wrapper; } const iterInternalSymbol = Symbol("internal"); const IteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); function isArrayIndexPropName(P) { if (typeof P !== "string") { return false; } const i = P >>> 0; if (i === Math.pow(2, 32) - 1) { return false; } const s = `${i}`; if (P !== s) { return false; } return true; } const byteLengthGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get; function isArrayBuffer(value) { try { byteLengthGetter.call(value); return true; } catch (e) { return false; } } const supportsPropertyIndex = Symbol("supports property index"); const supportedPropertyIndices = Symbol("supported property indices"); const supportsPropertyName = Symbol("supports property name"); const supportedPropertyNames = Symbol("supported property names"); const indexedGet = Symbol("indexed property get"); const indexedSetNew = Symbol("indexed property set new"); const indexedSetExisting = Symbol("indexed property set existing"); const namedGet = Symbol("named property get"); const namedSetNew = Symbol("named property set new"); const namedSetExisting = Symbol("named property set existing"); const namedDelete = Symbol("named property delete"); module.exports = exports = { isObject, hasOwn, wrapperSymbol, implSymbol, getSameObject, ctorRegistrySymbol, wrapperForImpl, implForWrapper, tryWrapperForImpl, tryImplForWrapper, iterInternalSymbol, IteratorPrototype, isArrayBuffer, isArrayIndexPropName, supportsPropertyIndex, supportedPropertyIndices, supportsPropertyName, supportedPropertyNames, indexedGet, indexedSetNew, indexedSetExisting, namedGet, namedSetNew, namedSetExisting, namedDelete }; /***/ }), /***/ 19463: /***/ ((__unused_webpack_module, exports) => { "use strict"; function _(message, opts) { return `${opts && opts.context ? opts.context : "Value"} ${message}.`; } function type(V) { if (V === null) { return "Null"; } switch (typeof V) { case "undefined": return "Undefined"; case "boolean": return "Boolean"; case "number": return "Number"; case "string": return "String"; case "symbol": return "Symbol"; case "object": // Falls through case "function": // Falls through default: // Per ES spec, typeof returns an implemention-defined value that is not any of the existing ones for // uncallable non-standard exotic objects. Yet Type() which the Web IDL spec depends on returns Object for // such cases. So treat the default case as an object. return "Object"; } } // Round x to the nearest integer, choosing the even integer if it lies halfway between two. function evenRound(x) { // There are four cases for numbers with fractional part being .5: // // case | x | floor(x) | round(x) | expected | x <> 0 | x % 1 | x & 1 | example // 1 | 2n + 0.5 | 2n | 2n + 1 | 2n | > | 0.5 | 0 | 0.5 -> 0 // 2 | 2n + 1.5 | 2n + 1 | 2n + 2 | 2n + 2 | > | 0.5 | 1 | 1.5 -> 2 // 3 | -2n - 0.5 | -2n - 1 | -2n | -2n | < | -0.5 | 0 | -0.5 -> 0 // 4 | -2n - 1.5 | -2n - 2 | -2n - 1 | -2n - 2 | < | -0.5 | 1 | -1.5 -> -2 // (where n is a non-negative integer) // // Branch here for cases 1 and 4 if ((x > 0 && (x % 1) === +0.5 && (x & 1) === 0) || (x < 0 && (x % 1) === -0.5 && (x & 1) === 1)) { return censorNegativeZero(Math.floor(x)); } return censorNegativeZero(Math.round(x)); } function integerPart(n) { return censorNegativeZero(Math.trunc(n)); } function sign(x) { return x < 0 ? -1 : 1; } function modulo(x, y) { // https://tc39.github.io/ecma262/#eqn-modulo // Note that http://stackoverflow.com/a/4467559/3191 does NOT work for large modulos const signMightNotMatch = x % y; if (sign(y) !== sign(signMightNotMatch)) { return signMightNotMatch + y; } return signMightNotMatch; } function censorNegativeZero(x) { return x === 0 ? 0 : x; } function createIntegerConversion(bitLength, typeOpts) { const isSigned = !typeOpts.unsigned; let lowerBound; let upperBound; if (bitLength === 64) { upperBound = Math.pow(2, 53) - 1; lowerBound = !isSigned ? 0 : -Math.pow(2, 53) + 1; } else if (!isSigned) { lowerBound = 0; upperBound = Math.pow(2, bitLength) - 1; } else { lowerBound = -Math.pow(2, bitLength - 1); upperBound = Math.pow(2, bitLength - 1) - 1; } const twoToTheBitLength = Math.pow(2, bitLength); const twoToOneLessThanTheBitLength = Math.pow(2, bitLength - 1); return (V, opts) => { if (opts === undefined) { opts = {}; } let x = +V; x = censorNegativeZero(x); // Spec discussion ongoing: https://github.com/heycam/webidl/issues/306 if (opts.enforceRange) { if (!Number.isFinite(x)) { throw new TypeError(_("is not a finite number", opts)); } x = integerPart(x); if (x < lowerBound || x > upperBound) { throw new TypeError(_( `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, opts)); } return x; } if (!Number.isNaN(x) && opts.clamp) { x = Math.min(Math.max(x, lowerBound), upperBound); x = evenRound(x); return x; } if (!Number.isFinite(x) || x === 0) { return 0; } x = integerPart(x); // Math.pow(2, 64) is not accurately representable in JavaScript, so try to avoid these per-spec operations if // possible. Hopefully it's an optimization for the non-64-bitLength cases too. if (x >= lowerBound && x <= upperBound) { return x; } // These will not work great for bitLength of 64, but oh well. See the README for more details. x = modulo(x, twoToTheBitLength); if (isSigned && x >= twoToOneLessThanTheBitLength) { return x - twoToTheBitLength; } return x; }; } exports.any = V => { return V; }; exports.void = function () { return undefined; }; exports.boolean = function (val) { return !!val; }; exports.byte = createIntegerConversion(8, { unsigned: false }); exports.octet = createIntegerConversion(8, { unsigned: true }); exports.short = createIntegerConversion(16, { unsigned: false }); exports["unsigned short"] = createIntegerConversion(16, { unsigned: true }); exports.long = createIntegerConversion(32, { unsigned: false }); exports["unsigned long"] = createIntegerConversion(32, { unsigned: true }); exports["long long"] = createIntegerConversion(64, { unsigned: false }); exports["unsigned long long"] = createIntegerConversion(64, { unsigned: true }); exports.double = (V, opts) => { const x = +V; if (!Number.isFinite(x)) { throw new TypeError(_("is not a finite floating-point value", opts)); } return x; }; exports["unrestricted double"] = V => { const x = +V; return x; }; exports.float = (V, opts) => { const x = +V; if (!Number.isFinite(x)) { throw new TypeError(_("is not a finite floating-point value", opts)); } if (Object.is(x, -0)) { return x; } const y = Math.fround(x); if (!Number.isFinite(y)) { throw new TypeError(_("is outside the range of a single-precision floating-point value", opts)); } return y; }; exports["unrestricted float"] = V => { const x = +V; if (isNaN(x)) { return x; } if (Object.is(x, -0)) { return x; } return Math.fround(x); }; exports.DOMString = function (V, opts) { if (opts === undefined) { opts = {}; } if (opts.treatNullAsEmptyString && V === null) { return ""; } if (typeof V === "symbol") { throw new TypeError(_("is a symbol, which cannot be converted to a string", opts)); } return String(V); }; exports.ByteString = (V, opts) => { const x = exports.DOMString(V, opts); let c; for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { if (c > 255) { throw new TypeError(_("is not a valid ByteString", opts)); } } return x; }; exports.USVString = (V, opts) => { const S = exports.DOMString(V, opts); const n = S.length; const U = []; for (let i = 0; i < n; ++i) { const c = S.charCodeAt(i); if (c < 0xD800 || c > 0xDFFF) { U.push(String.fromCodePoint(c)); } else if (0xDC00 <= c && c <= 0xDFFF) { U.push(String.fromCodePoint(0xFFFD)); } else if (i === n - 1) { U.push(String.fromCodePoint(0xFFFD)); } else { const d = S.charCodeAt(i + 1); if (0xDC00 <= d && d <= 0xDFFF) { const a = c & 0x3FF; const b = d & 0x3FF; U.push(String.fromCodePoint((2 << 15) + ((2 << 9) * a) + b)); ++i; } else { U.push(String.fromCodePoint(0xFFFD)); } } } return U.join(""); }; exports.object = (V, opts) => { if (type(V) !== "Object") { throw new TypeError(_("is not an object", opts)); } return V; }; // Not exported, but used in Function and VoidFunction. // Neither Function nor VoidFunction is defined with [TreatNonObjectAsNull], so // handling for that is omitted. function convertCallbackFunction(V, opts) { if (typeof V !== "function") { throw new TypeError(_("is not a function", opts)); } return V; } const abByteLengthGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get; function isArrayBuffer(V) { try { abByteLengthGetter.call(V); return true; } catch (e) { return false; } } // I don't think we can reliably detect detached ArrayBuffers. exports.ArrayBuffer = (V, opts) => { if (!isArrayBuffer(V)) { throw new TypeError(_("is not a view on an ArrayBuffer object", opts)); } return V; }; const dvByteLengthGetter = Object.getOwnPropertyDescriptor(DataView.prototype, "byteLength").get; exports.DataView = (V, opts) => { try { dvByteLengthGetter.call(V); return V; } catch (e) { throw new TypeError(_("is not a view on an DataView object", opts)); } }; [ Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, Uint32Array, Uint8ClampedArray, Float32Array, Float64Array ].forEach(func => { const name = func.name; const article = /^[AEIOU]/.test(name) ? "an" : "a"; exports[name] = (V, opts) => { if (!ArrayBuffer.isView(V) || V.constructor.name !== name) { throw new TypeError(_(`is not ${article} ${name} object`, opts)); } return V; }; }); // Common definitions exports.ArrayBufferView = (V, opts) => { if (!ArrayBuffer.isView(V)) { throw new TypeError(_("is not a view on an ArrayBuffer object", opts)); } return V; }; exports.BufferSource = (V, opts) => { if (!ArrayBuffer.isView(V) && !isArrayBuffer(V)) { throw new TypeError(_("is not an ArrayBuffer object or a view on one", opts)); } return V; }; exports.DOMTimeStamp = exports["unsigned long long"]; exports.Function = convertCallbackFunction; exports.VoidFunction = convertCallbackFunction; /***/ }), /***/ 57617: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const DOMException = __webpack_require__(37561); // Special install function to make the DOMException inherit from Error. // https://heycam.github.io/webidl/#es-DOMException-specialness function installOverride(globalObject) { if (typeof globalObject.Error !== "function") { throw new Error("Internal error: Error constructor is not present on the given global object."); } DOMException.install(globalObject); Object.setPrototypeOf(globalObject.DOMException.prototype, globalObject.Error.prototype); } module.exports = {...DOMException, install: installOverride }; /***/ }), /***/ 49865: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var crypto = __webpack_require__(76417); var BigInteger = __webpack_require__(85587).BigInteger; var ECPointFp = __webpack_require__(3943).ECPointFp; var Buffer = __webpack_require__(15118).Buffer; exports.ECCurves = __webpack_require__(41452); // 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"); } } } /***/ }), /***/ 3943: /***/ ((module, __unused_webpack_exports, __webpack_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 = __webpack_require__(85587).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 /***/ }), /***/ 41452: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Named EC curves // Requires ec.js, jsbn.js, and jsbn2.js var BigInteger = __webpack_require__(85587).BigInteger var ECCurveFp = __webpack_require__(3943).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 } /***/ }), /***/ 81205: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var once = __webpack_require__(1223); 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; /***/ }), /***/ 55447: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const childProcess = __webpack_require__(63129); const crossSpawn = __webpack_require__(1678); const stripEof = __webpack_require__(85515); const npmRunPath = __webpack_require__(33459); const isStream = __webpack_require__(81657); const _getStream = __webpack_require__(71336); const pFinally = __webpack_require__(31330); const onExit = __webpack_require__(24931); const errname = __webpack_require__(64689); const stdio = __webpack_require__(10166); const TEN_MEGABYTES = 1000 * 1000 * 10; function handleArgs(cmd, args, opts) { let parsed; opts = Object.assign({ extendEnv: true, env: {} }, opts); if (opts.extendEnv) { opts.env = Object.assign({}, process.env, opts.env); } if (opts.__winShell === true) { delete opts.__winShell; parsed = { command: cmd, args, options: opts, file: cmd, original: { cmd, args } }; } else { parsed = crossSpawn._parse(cmd, args, opts); } opts = Object.assign({ maxBuffer: TEN_MEGABYTES, buffer: true, stripEof: true, preferLocal: true, localDir: parsed.options.cwd || process.cwd(), encoding: 'utf8', reject: true, cleanup: true }, parsed.options); opts.stdio = stdio(opts); if (opts.preferLocal) { opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); } if (opts.detached) { // #115 opts.cleanup = false; } if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { // #116 parsed.args.unshift('/q'); } return { cmd: parsed.command, args: parsed.args, opts, parsed }; } function handleInput(spawned, input) { if (input === null || input === undefined) { return; } if (isStream(input)) { input.pipe(spawned.stdin); } else { spawned.stdin.end(input); } } function handleOutput(opts, val) { if (val && opts.stripEof) { val = stripEof(val); } return val; } function handleShell(fn, cmd, opts) { let file = '/bin/sh'; let args = ['-c', cmd]; opts = Object.assign({}, opts); if (process.platform === 'win32') { opts.__winShell = true; file = process.env.comspec || 'cmd.exe'; args = ['/s', '/c', `"${cmd}"`]; opts.windowsVerbatimArguments = true; } if (opts.shell) { file = opts.shell; delete opts.shell; } return fn(file, args, opts); } function getStream(process, stream, {encoding, buffer, maxBuffer}) { if (!process[stream]) { return null; } let ret; if (!buffer) { // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 ret = new Promise((resolve, reject) => { process[stream] .once('end', resolve) .once('error', reject); }); } else if (encoding) { ret = _getStream(process[stream], { encoding, maxBuffer }); } else { ret = _getStream.buffer(process[stream], {maxBuffer}); } return ret.catch(err => { err.stream = stream; err.message = `${stream} ${err.message}`; throw err; }); } function makeError(result, options) { const {stdout, stderr} = result; let err = result.error; const {code, signal} = result; const {parsed, joinedCmd} = options; const timedOut = options.timedOut || false; if (!err) { let output = ''; if (Array.isArray(parsed.opts.stdio)) { if (parsed.opts.stdio[2] !== 'inherit') { output += output.length > 0 ? stderr : `\n${stderr}`; } if (parsed.opts.stdio[1] !== 'inherit') { output += `\n${stdout}`; } } else if (parsed.opts.stdio !== 'inherit') { output = `\n${stderr}${stdout}`; } err = new Error(`Command failed: ${joinedCmd}${output}`); err.code = code < 0 ? errname(code) : code; } err.stdout = stdout; err.stderr = stderr; err.failed = true; err.signal = signal || null; err.cmd = joinedCmd; err.timedOut = timedOut; return err; } function joinCmd(cmd, args) { let joinedCmd = cmd; if (Array.isArray(args) && args.length > 0) { joinedCmd += ' ' + args.join(' '); } return joinedCmd; } module.exports = (cmd, args, opts) => { const parsed = handleArgs(cmd, args, opts); const {encoding, buffer, maxBuffer} = parsed.opts; const joinedCmd = joinCmd(cmd, args); let spawned; try { spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); } catch (err) { return Promise.reject(err); } let removeExitHandler; if (parsed.opts.cleanup) { removeExitHandler = onExit(() => { spawned.kill(); }); } let timeoutId = null; let timedOut = false; const cleanup = () => { if (timeoutId) { clearTimeout(timeoutId); timeoutId = null; } if (removeExitHandler) { removeExitHandler(); } }; if (parsed.opts.timeout > 0) { timeoutId = setTimeout(() => { timeoutId = null; timedOut = true; spawned.kill(parsed.opts.killSignal); }, parsed.opts.timeout); } const processDone = new Promise(resolve => { spawned.on('exit', (code, signal) => { cleanup(); resolve({code, signal}); }); spawned.on('error', err => { cleanup(); resolve({error: err}); }); if (spawned.stdin) { spawned.stdin.on('error', err => { cleanup(); resolve({error: err}); }); } }); function destroy() { if (spawned.stdout) { spawned.stdout.destroy(); } if (spawned.stderr) { spawned.stderr.destroy(); } } const handlePromise = () => pFinally(Promise.all([ processDone, getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) ]).then(arr => { const result = arr[0]; result.stdout = arr[1]; result.stderr = arr[2]; if (result.error || result.code !== 0 || result.signal !== null) { const err = makeError(result, { joinedCmd, parsed, timedOut }); // TODO: missing some timeout logic for killed // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 // err.killed = spawned.killed || killed; err.killed = err.killed || spawned.killed; if (!parsed.opts.reject) { return err; } throw err; } return { stdout: handleOutput(parsed.opts, result.stdout), stderr: handleOutput(parsed.opts, result.stderr), code: 0, failed: false, killed: false, signal: null, cmd: joinedCmd, timedOut: false }; }), destroy); crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); handleInput(spawned, parsed.opts.input); spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); spawned.catch = onrejected => handlePromise().catch(onrejected); return spawned; }; // TODO: set `stderr: 'ignore'` when that option is implemented module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); // TODO: set `stdout: 'ignore'` when that option is implemented module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); module.exports.sync = (cmd, args, opts) => { const parsed = handleArgs(cmd, args, opts); const joinedCmd = joinCmd(cmd, args); if (isStream(parsed.opts.input)) { throw new TypeError('The `input` option cannot be a stream in sync mode'); } const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); result.code = result.status; if (result.error || result.status !== 0 || result.signal !== null) { const err = makeError(result, { joinedCmd, parsed }); if (!parsed.opts.reject) { return err; } throw err; } return { stdout: handleOutput(parsed.opts, result.stdout), stderr: handleOutput(parsed.opts, result.stderr), code: 0, failed: false, signal: null, cmd: joinedCmd, timedOut: false }; }; module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); /***/ }), /***/ 64689: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // Older verions of Node.js might not have `util.getSystemErrorName()`. // In that case, fall back to a deprecated internal. const util = __webpack_require__(31669); let uv; if (typeof util.getSystemErrorName === 'function') { module.exports = util.getSystemErrorName; } else { try { uv = process.binding('uv'); if (typeof uv.errname !== 'function') { throw new TypeError('uv.errname is not a function'); } } catch (err) { console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); uv = null; } module.exports = code => errname(uv, code); } // Used for testing the fallback behavior module.exports.__test__ = errname; function errname(uv, code) { if (uv) { return uv.errname(code); } if (!(code < 0)) { throw new Error('err >= 0'); } return `Unknown system error ${code}`; } /***/ }), /***/ 10166: /***/ ((module) => { "use strict"; const alias = ['stdin', 'stdout', 'stderr']; const hasAlias = opts => alias.some(x => Boolean(opts[x])); module.exports = opts => { if (!opts) { return null; } if (opts.stdio && hasAlias(opts)) { throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); } if (typeof opts.stdio === 'string') { return opts.stdio; } const stdio = opts.stdio || []; if (!Array.isArray(stdio)) { throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); } const result = []; const len = Math.max(stdio.length, alias.length); for (let i = 0; i < len; i++) { let value = null; if (stdio[i] !== undefined) { value = stdio[i]; } else if (opts[alias[i]] !== undefined) { value = opts[alias[i]]; } result[i] = value; } return result; }; /***/ }), /***/ 1678: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const cp = __webpack_require__(63129); const parse = __webpack_require__(73756); const enoent = __webpack_require__(35419); 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; /***/ }), /***/ 35419: /***/ ((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, }; /***/ }), /***/ 73756: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const niceTry = __webpack_require__(38560); const resolveCommand = __webpack_require__(19727); const escape = __webpack_require__(79482); const readShebang = __webpack_require__(17295); const semver = __webpack_require__(55232); const isWin = process.platform === 'win32'; const isExecutableRegExp = /\.(?:com|exe)$/i; const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; // `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; function detectShebang(parsed) { parsed.file = resolveCommand(parsed); const shebang = parsed.file && readShebang(parsed.file); if (shebang) { parsed.args.unshift(parsed.file); parsed.command = shebang; return resolveCommand(parsed); } return parsed.file; } function parseNonShell(parsed) { if (!isWin) { return parsed; } // Detect & add support for shebangs const commandFile = detectShebang(parsed); // We don't need a shell if the command filename is an executable const needsShell = !isExecutableRegExp.test(commandFile); // If a shell is required, use cmd.exe and take care of escaping everything correctly // Note that `forceShell` is an hidden option used only in tests if (parsed.options.forceShell || needsShell) { // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, // we need to double escape them const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) // This is necessary otherwise it will always fail with ENOENT in those cases parsed.command = path.normalize(parsed.command); // Escape command & arguments parsed.command = escape.command(parsed.command); parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); const shellCommand = [parsed.command].concat(parsed.args).join(' '); parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; parsed.command = process.env.comspec || 'cmd.exe'; parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped } return parsed; } function parseShell(parsed) { // If node supports the shell option, there's no need to mimic its behavior if (supportsShellOption) { return parsed; } // Mimic node shell option // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 const shellCommand = [parsed.command].concat(parsed.args).join(' '); if (isWin) { parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped } else { if (typeof parsed.options.shell === 'string') { parsed.command = parsed.options.shell; } else if (process.platform === 'android') { parsed.command = '/system/bin/sh'; } else { parsed.command = '/bin/sh'; } parsed.args = ['-c', shellCommand]; } return parsed; } function parse(command, args, options) { // Normalize arguments, similar to nodejs if (args && !Array.isArray(args)) { options = args; args = null; } args = args ? args.slice(0) : []; // Clone array to avoid changing the original options = Object.assign({}, options); // Clone object to avoid changing the original // Build our parsed object const parsed = { command, args, options, file: undefined, original: { command, args, }, }; // Delegate further parsing to shell or non-shell return options.shell ? parseShell(parsed) : parseNonShell(parsed); } module.exports = parse; /***/ }), /***/ 79482: /***/ ((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; /***/ }), /***/ 17295: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fs = __webpack_require__(35747); const shebangCommand = __webpack_require__(52665); function readShebang(command) { // Read the first 150 bytes from the file const size = 150; let buffer; if (Buffer.alloc) { // Node.js v4.5+ / v5.10+ buffer = Buffer.alloc(size); } else { // Old Node.js API buffer = new Buffer(size); buffer.fill(0); // zero-fill } let fd; try { fd = fs.openSync(command, 'r'); fs.readSync(fd, buffer, 0, size, 0); fs.closeSync(fd); } catch (e) { /* Empty */ } // Attempt to extract shebang (null is returned if not a shebang) return shebangCommand(buffer.toString()); } module.exports = readShebang; /***/ }), /***/ 19727: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const which = __webpack_require__(93008); const pathKey = __webpack_require__(20539)(); function resolveCommandAttempt(parsed, withoutPathExt) { const cwd = process.cwd(); const hasCustomCwd = parsed.options.cwd != null; // If a custom `cwd` was specified, we need to change the process cwd // because `which` will do stat calls but does not support a custom cwd if (hasCustomCwd) { try { process.chdir(parsed.options.cwd); } catch (err) { /* Empty */ } } let resolved; try { resolved = which.sync(parsed.command, { path: (parsed.options.env || process.env)[pathKey], pathExt: withoutPathExt ? path.delimiter : undefined, }); } catch (e) { /* Empty */ } finally { process.chdir(cwd); } // If we successfully resolved, ensure that an absolute path is returned // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it if (resolved) { resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); } return resolved; } function resolveCommand(parsed) { return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); } module.exports = resolveCommand; /***/ }), /***/ 7740: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {PassThrough} = __webpack_require__(92413); module.exports = options => { options = Object.assign({}, options); const {array} = options; let {encoding} = options; const buffer = encoding === 'buffer'; let objectMode = false; if (array) { objectMode = !(encoding || buffer); } else { encoding = encoding || 'utf8'; } if (buffer) { encoding = null; } let len = 0; const ret = []; const stream = new PassThrough({objectMode}); if (encoding) { stream.setEncoding(encoding); } stream.on('data', chunk => { ret.push(chunk); if (objectMode) { len = ret.length; } else { len += chunk.length; } }); stream.getBufferedValue = () => { if (array) { return ret; } return buffer ? Buffer.concat(ret, len) : ret.join(''); }; stream.getBufferedLength = () => len; return stream; }; /***/ }), /***/ 71336: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const pump = __webpack_require__(18341); const bufferStream = __webpack_require__(7740); class MaxBufferError extends Error { constructor() { super('maxBuffer exceeded'); this.name = 'MaxBufferError'; } } function getStream(inputStream, options) { if (!inputStream) { return Promise.reject(new Error('Expected a stream')); } options = Object.assign({maxBuffer: Infinity}, options); const {maxBuffer} = options; let stream; return new Promise((resolve, reject) => { const rejectPromise = error => { if (error) { // A null check error.bufferedData = stream.getBufferedValue(); } reject(error); }; stream = pump(inputStream, bufferStream(options), error => { if (error) { rejectPromise(error); return; } resolve(); }); stream.on('data', () => { if (stream.getBufferedLength() > maxBuffer) { rejectPromise(new MaxBufferError()); } }); }).then(() => stream.getBufferedValue()); } module.exports = getStream; module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); module.exports.MaxBufferError = MaxBufferError; /***/ }), /***/ 81657: /***/ ((module) => { "use strict"; var isStream = module.exports = function (stream) { return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; }; isStream.writable = function (stream) { return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; }; isStream.readable = function (stream) { return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; }; isStream.duplex = function (stream) { return isStream.writable(stream) && isStream.readable(stream); }; isStream.transform = function (stream) { return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; }; /***/ }), /***/ 33459: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const pathKey = __webpack_require__(20539); module.exports = opts => { opts = Object.assign({ cwd: process.cwd(), path: process.env[pathKey()] }, opts); let prev; let pth = path.resolve(opts.cwd); const ret = []; while (prev !== pth) { ret.push(path.join(pth, 'node_modules/.bin')); prev = pth; pth = path.resolve(pth, '..'); } // ensure the running `node` binary is used ret.push(path.dirname(process.execPath)); return ret.concat(opts.path).join(path.delimiter); }; module.exports.env = opts => { opts = Object.assign({ env: process.env }, opts); const env = Object.assign({}, opts.env); const path = pathKey({env}); opts.path = env[path]; env[path] = module.exports(opts); return env; }; /***/ }), /***/ 55232: /***/ ((module, exports) => { exports = module.exports = SemVer var debug /* istanbul ignore next */ if (typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = function () { var args = Array.prototype.slice.call(arguments, 0) args.unshift('SEMVER') console.log.apply(console, args) } } else { debug = function () {} } // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. exports.SEMVER_SPEC_VERSION = '2.0.0' var MAX_LENGTH = 256 var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. var MAX_SAFE_COMPONENT_LENGTH = 16 // The actual regexps go on exports.re var re = exports.re = [] var src = exports.src = [] var R = 0 // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. var NUMERICIDENTIFIER = R++ src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' var NUMERICIDENTIFIERLOOSE = R++ src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. var NONNUMERICIDENTIFIER = R++ src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' // ## Main Version // Three dot-separated numeric identifiers. var MAINVERSION = R++ src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')' var MAINVERSIONLOOSE = R++ src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. var PRERELEASEIDENTIFIER = R++ src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')' var PRERELEASEIDENTIFIERLOOSE = R++ src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. var PRERELEASE = R++ src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' var PRERELEASELOOSE = R++ src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. var BUILDIDENTIFIER = R++ src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. var BUILD = R++ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and // build metadata. // Note that the only major, minor, patch, and pre-release sections of // the version string are capturing groups. The build metadata is not a // capturing group, because it should not ever be used in version // comparison. var FULL = R++ var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?' src[FULL] = '^' + FULLPLAIN + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?' var LOOSE = R++ src[LOOSE] = '^' + LOOSEPLAIN + '$' var GTLT = R++ src[GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. var XRANGEIDENTIFIERLOOSE = R++ src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' var XRANGEIDENTIFIER = R++ src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' var XRANGEPLAIN = R++ src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?' var XRANGEPLAINLOOSE = R++ src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?' var XRANGE = R++ src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' var XRANGELOOSE = R++ src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver var COERCE = R++ src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' // Tilde ranges. // Meaning is "reasonably at or greater than" var LONETILDE = R++ src[LONETILDE] = '(?:~>?)' var TILDETRIM = R++ src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') var tildeTrimReplace = '$1~' var TILDE = R++ src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' var TILDELOOSE = R++ src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" var LONECARET = R++ src[LONECARET] = '(?:\\^)' var CARETTRIM = R++ src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') var caretTrimReplace = '$1^' var CARET = R++ src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' var CARETLOOSE = R++ src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" var COMPARATORLOOSE = R++ src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' var COMPARATOR = R++ src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` var COMPARATORTRIM = R++ src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' // this one has to use the /g flag re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. var HYPHENRANGE = R++ src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$' var HYPHENRANGELOOSE = R++ src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$' // Star ranges basically just allow anything at all. var STAR = R++ src[STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. for (var i = 0; i < R; i++) { debug(i, src[i]) if (!re[i]) { re[i] = new RegExp(src[i]) } } exports.parse = parse function parse (version, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } if (version.length > MAX_LENGTH) { return null } var r = options.loose ? re[LOOSE] : re[FULL] if (!r.test(version)) { return null } try { return new SemVer(version, options) } catch (er) { return null } } exports.valid = valid function valid (version, options) { var v = parse(version, options) return v ? v.version : null } exports.clean = clean function clean (version, options) { var s = parse(version.trim().replace(/^[=v]+/, ''), options) return s ? s.version : null } exports.SemVer = SemVer function SemVer (version, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (version instanceof SemVer) { if (version.loose === options.loose) { return version } else { version = version.version } } else if (typeof version !== 'string') { throw new TypeError('Invalid Version: ' + version) } if (version.length > MAX_LENGTH) { throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') } if (!(this instanceof SemVer)) { return new SemVer(version, options) } debug('SemVer', version, options) this.options = options this.loose = !!options.loose var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) if (!m) { throw new TypeError('Invalid Version: ' + version) } this.raw = version // these are actually numbers this.major = +m[1] this.minor = +m[2] this.patch = +m[3] if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError('Invalid major version') } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError('Invalid minor version') } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError('Invalid patch version') } // numberify any prerelease numeric ids if (!m[4]) { this.prerelease = [] } else { this.prerelease = m[4].split('.').map(function (id) { if (/^[0-9]+$/.test(id)) { var num = +id if (num >= 0 && num < MAX_SAFE_INTEGER) { return num } } return id }) } this.build = m[5] ? m[5].split('.') : [] this.format() } SemVer.prototype.format = function () { this.version = this.major + '.' + this.minor + '.' + this.patch if (this.prerelease.length) { this.version += '-' + this.prerelease.join('.') } return this.version } SemVer.prototype.toString = function () { return this.version } SemVer.prototype.compare = function (other) { debug('SemVer.compare', this.version, this.options, other) if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } return this.compareMain(other) || this.comparePre(other) } SemVer.prototype.compareMain = function (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch) } SemVer.prototype.comparePre = function (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } // NOT having a prerelease is > having one if (this.prerelease.length && !other.prerelease.length) { return -1 } else if (!this.prerelease.length && other.prerelease.length) { return 1 } else if (!this.prerelease.length && !other.prerelease.length) { return 0 } var i = 0 do { var a = this.prerelease[i] var b = other.prerelease[i] debug('prerelease compare', i, a, b) if (a === undefined && b === undefined) { return 0 } else if (b === undefined) { return 1 } else if (a === undefined) { return -1 } else if (a === b) { continue } else { return compareIdentifiers(a, b) } } while (++i) } // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { switch (release) { case 'premajor': this.prerelease.length = 0 this.patch = 0 this.minor = 0 this.major++ this.inc('pre', identifier) break case 'preminor': this.prerelease.length = 0 this.patch = 0 this.minor++ this.inc('pre', identifier) break case 'prepatch': // If this is already a prerelease, it will bump to the next version // drop any prereleases that might already exist, since they are not // relevant at this point. this.prerelease.length = 0 this.inc('patch', identifier) this.inc('pre', identifier) break // If the input is a non-prerelease version, this acts the same as // prepatch. case 'prerelease': if (this.prerelease.length === 0) { this.inc('patch', identifier) } this.inc('pre', identifier) break case 'major': // If this is a pre-major version, bump up to the same major version. // Otherwise increment major. // 1.0.0-5 bumps to 1.0.0 // 1.1.0 bumps to 2.0.0 if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++ } this.minor = 0 this.patch = 0 this.prerelease = [] break case 'minor': // If this is a pre-minor version, bump up to the same minor version. // Otherwise increment minor. // 1.2.0-5 bumps to 1.2.0 // 1.2.1 bumps to 1.3.0 if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++ } this.patch = 0 this.prerelease = [] break case 'patch': // If this is not a pre-release version, it will increment the patch. // If it is a pre-release it will bump up to the same patch version. // 1.2.0-5 patches to 1.2.0 // 1.2.0 patches to 1.2.1 if (this.prerelease.length === 0) { this.patch++ } this.prerelease = [] break // This probably shouldn't be used publicly. // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. case 'pre': if (this.prerelease.length === 0) { this.prerelease = [0] } else { var i = this.prerelease.length while (--i >= 0) { if (typeof this.prerelease[i] === 'number') { this.prerelease[i]++ i = -2 } } if (i === -1) { // didn't increment anything this.prerelease.push(0) } } if (identifier) { // 1.2.0-beta.1 bumps to 1.2.0-beta.2, // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0] } } else { this.prerelease = [identifier, 0] } } break default: throw new Error('invalid increment argument: ' + release) } this.format() this.raw = this.version return this } exports.inc = inc function inc (version, release, loose, identifier) { if (typeof (loose) === 'string') { identifier = loose loose = undefined } try { return new SemVer(version, loose).inc(release, identifier).version } catch (er) { return null } } exports.diff = diff function diff (version1, version2) { if (eq(version1, version2)) { return null } else { var v1 = parse(version1) var v2 = parse(version2) var prefix = '' if (v1.prerelease.length || v2.prerelease.length) { prefix = 'pre' var defaultResult = 'prerelease' } for (var key in v1) { if (key === 'major' || key === 'minor' || key === 'patch') { if (v1[key] !== v2[key]) { return prefix + key } } } return defaultResult // may be undefined } } exports.compareIdentifiers = compareIdentifiers var numeric = /^[0-9]+$/ function compareIdentifiers (a, b) { var anum = numeric.test(a) var bnum = numeric.test(b) if (anum && bnum) { a = +a b = +b } return a === b ? 0 : (anum && !bnum) ? -1 : (bnum && !anum) ? 1 : a < b ? -1 : 1 } exports.rcompareIdentifiers = rcompareIdentifiers function rcompareIdentifiers (a, b) { return compareIdentifiers(b, a) } exports.major = major function major (a, loose) { return new SemVer(a, loose).major } exports.minor = minor function minor (a, loose) { return new SemVer(a, loose).minor } exports.patch = patch function patch (a, loose) { return new SemVer(a, loose).patch } exports.compare = compare function compare (a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)) } exports.compareLoose = compareLoose function compareLoose (a, b) { return compare(a, b, true) } exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) } exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { return exports.compare(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { return exports.rcompare(a, b, loose) }) } exports.gt = gt function gt (a, b, loose) { return compare(a, b, loose) > 0 } exports.lt = lt function lt (a, b, loose) { return compare(a, b, loose) < 0 } exports.eq = eq function eq (a, b, loose) { return compare(a, b, loose) === 0 } exports.neq = neq function neq (a, b, loose) { return compare(a, b, loose) !== 0 } exports.gte = gte function gte (a, b, loose) { return compare(a, b, loose) >= 0 } exports.lte = lte function lte (a, b, loose) { return compare(a, b, loose) <= 0 } exports.cmp = cmp function cmp (a, op, b, loose) { switch (op) { case '===': if (typeof a === 'object') a = a.version if (typeof b === 'object') b = b.version return a === b case '!==': if (typeof a === 'object') a = a.version if (typeof b === 'object') b = b.version return a !== b case '': case '=': case '==': return eq(a, b, loose) case '!=': return neq(a, b, loose) case '>': return gt(a, b, loose) case '>=': return gte(a, b, loose) case '<': return lt(a, b, loose) case '<=': return lte(a, b, loose) default: throw new TypeError('Invalid operator: ' + op) } } exports.Comparator = Comparator function Comparator (comp, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp } else { comp = comp.value } } if (!(this instanceof Comparator)) { return new Comparator(comp, options) } debug('comparator', comp, options) this.options = options this.loose = !!options.loose this.parse(comp) if (this.semver === ANY) { this.value = '' } else { this.value = this.operator + this.semver.version } debug('comp', this) } var ANY = {} Comparator.prototype.parse = function (comp) { var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] var m = comp.match(r) if (!m) { throw new TypeError('Invalid comparator: ' + comp) } this.operator = m[1] if (this.operator === '=') { this.operator = '' } // if it literally is just '>' or '' then allow anything. if (!m[2]) { this.semver = ANY } else { this.semver = new SemVer(m[2], this.options.loose) } } Comparator.prototype.toString = function () { return this.value } Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) if (this.semver === ANY) { return true } if (typeof version === 'string') { version = new SemVer(version, this.options) } return cmp(version, this.operator, this.semver, this.options) } Comparator.prototype.intersects = function (comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError('a Comparator is required') } if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } var rangeTmp if (this.operator === '') { rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>') var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<') var sameSemVer = this.semver.version === comp.semver.version var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=') var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && ((this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<')) var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && ((this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>')) return sameDirectionIncreasing || sameDirectionDecreasing || (sameSemVer && differentDirectionsInclusive) || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan } exports.Range = Range function Range (range, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range } else { return new Range(range.raw, options) } } if (range instanceof Comparator) { return new Range(range.value, options) } if (!(this instanceof Range)) { return new Range(range, options) } this.options = options this.loose = !!options.loose this.includePrerelease = !!options.includePrerelease // First, split based on boolean or || this.raw = range this.set = range.split(/\s*\|\|\s*/).map(function (range) { return this.parseRange(range.trim()) }, this).filter(function (c) { // throw out any that are not relevant for whatever reason return c.length }) if (!this.set.length) { throw new TypeError('Invalid SemVer Range: ' + range) } this.format() } Range.prototype.format = function () { this.range = this.set.map(function (comps) { return comps.join(' ').trim() }).join('||').trim() return this.range } Range.prototype.toString = function () { return this.range } Range.prototype.parseRange = function (range) { var loose = this.options.loose range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] range = range.replace(hr, hyphenReplace) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) debug('comparator trim', range, re[COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` range = range.replace(re[TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` range = range.replace(re[CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') // At this point, the range is completely trimmed and // ready to be split into comparators. var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] var set = range.split(' ').map(function (comp) { return parseComparator(comp, this.options) }, this).join(' ').split(/\s+/) if (this.options.loose) { // in loose mode, throw out any that are not valid comparators set = set.filter(function (comp) { return !!comp.match(compRe) }) } set = set.map(function (comp) { return new Comparator(comp, this.options) }, this) return set } Range.prototype.intersects = function (range, options) { if (!(range instanceof Range)) { throw new TypeError('a Range is required') } return this.set.some(function (thisComparators) { return thisComparators.every(function (thisComparator) { return range.set.some(function (rangeComparators) { return rangeComparators.every(function (rangeComparator) { return thisComparator.intersects(rangeComparator, options) }) }) }) }) } // Mostly just for testing and legacy API reasons exports.toComparators = toComparators function toComparators (range, options) { return new Range(range, options).set.map(function (comp) { return comp.map(function (c) { return c.value }).join(' ').trim().split(' ') }) } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. function parseComparator (comp, options) { debug('comp', comp, options) comp = replaceCarets(comp, options) debug('caret', comp) comp = replaceTildes(comp, options) debug('tildes', comp) comp = replaceXRanges(comp, options) debug('xrange', comp) comp = replaceStars(comp, options) debug('stars', comp) return comp } function isX (id) { return !id || id.toLowerCase() === 'x' || id === '*' } // ~, ~> --> * (any, kinda silly) // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 function replaceTildes (comp, options) { return comp.trim().split(/\s+/).map(function (comp) { return replaceTilde(comp, options) }).join(' ') } function replaceTilde (comp, options) { var r = options.loose ? re[TILDELOOSE] : re[TILDE] return comp.replace(r, function (_, M, m, p, pr) { debug('tilde', comp, _, M, m, p, pr) var ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (isX(p)) { // ~1.2 == >=1.2.0 <1.3.0 ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } else if (pr) { debug('replaceTilde pr', pr) ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0' } else { // ~1.2.3 == >=1.2.3 <1.3.0 ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0' } debug('tilde return', ret) return ret }) } // ^ --> * (any, kinda silly) // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 // ^1.2.3 --> >=1.2.3 <2.0.0 // ^1.2.0 --> >=1.2.0 <2.0.0 function replaceCarets (comp, options) { return comp.trim().split(/\s+/).map(function (comp) { return replaceCaret(comp, options) }).join(' ') } function replaceCaret (comp, options) { debug('caret', comp, options) var r = options.loose ? re[CARETLOOSE] : re[CARET] return comp.replace(r, function (_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr) var ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (isX(p)) { if (M === '0') { ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } else { ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' } } else if (pr) { debug('replaceCaret pr', pr) if (M === '0') { if (m === '0') { ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1) } else { ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0' } } else { ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0' } } else { debug('no pr') if (M === '0') { if (m === '0') { ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1) } else { ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0' } } else { ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0' } } debug('caret return', ret) return ret }) } function replaceXRanges (comp, options) { debug('replaceXRanges', comp, options) return comp.split(/\s+/).map(function (comp) { return replaceXRange(comp, options) }).join(' ') } function replaceXRange (comp, options) { comp = comp.trim() var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] return comp.replace(r, function (ret, gtlt, M, m, p, pr) { debug('xRange', comp, ret, gtlt, M, m, p, pr) var xM = isX(M) var xm = xM || isX(m) var xp = xm || isX(p) var anyX = xp if (gtlt === '=' && anyX) { gtlt = '' } if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed ret = '<0.0.0' } else { // nothing is forbidden ret = '*' } } else if (gtlt && anyX) { // we know patch is an x, because we have any x at all. // replace X with 0 if (xm) { m = 0 } p = 0 if (gtlt === '>') { // >1 => >=2.0.0 // >1.2 => >=1.3.0 // >1.2.3 => >= 1.2.4 gtlt = '>=' if (xm) { M = +M + 1 m = 0 p = 0 } else { m = +m + 1 p = 0 } } else if (gtlt === '<=') { // <=0.7.x is actually <0.8.0, since any 0.7.x should // pass. Similarly, <=7.x is actually <8.0.0, etc. gtlt = '<' if (xm) { M = +M + 1 } else { m = +m + 1 } } ret = gtlt + M + '.' + m + '.' + p } else if (xm) { ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (xp) { ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } debug('xRange return', ret) return ret }) } // Because * is AND-ed with everything else in the comparator, // and '' means "any version", just remove the *s entirely. function replaceStars (comp, options) { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! return comp.trim().replace(re[STAR], '') } // This function is passed to string.replace(re[HYPHENRANGE]) // M, m, patch, prerelease, build // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do // 1.2 - 3.4 => >=1.2.0 <3.5.0 function hyphenReplace ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = '' } else if (isX(fm)) { from = '>=' + fM + '.0.0' } else if (isX(fp)) { from = '>=' + fM + '.' + fm + '.0' } else { from = '>=' + from } if (isX(tM)) { to = '' } else if (isX(tm)) { to = '<' + (+tM + 1) + '.0.0' } else if (isX(tp)) { to = '<' + tM + '.' + (+tm + 1) + '.0' } else if (tpr) { to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr } else { to = '<=' + to } return (from + ' ' + to).trim() } // if ANY of the sets match ALL of its comparators, then pass Range.prototype.test = function (version) { if (!version) { return false } if (typeof version === 'string') { version = new SemVer(version, this.options) } for (var i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true } } return false } function testSet (set, version, options) { for (var i = 0; i < set.length; i++) { if (!set[i].test(version)) { return false } } if (version.prerelease.length && !options.includePrerelease) { // Find the set of versions that are allowed to have prereleases // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 // That should allow `1.2.3-pr.2` to pass. // However, `1.2.4-alpha.notready` should NOT be allowed, // even though it's within the range set by the comparators. for (i = 0; i < set.length; i++) { debug(set[i].semver) if (set[i].semver === ANY) { continue } if (set[i].semver.prerelease.length > 0) { var allowed = set[i].semver if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true } } } // Version has a -pre, but it's not one of the ones we like. return false } return true } exports.satisfies = satisfies function satisfies (version, range, options) { try { range = new Range(range, options) } catch (er) { return false } return range.test(version) } exports.maxSatisfying = maxSatisfying function maxSatisfying (versions, range, options) { var max = null var maxSV = null try { var rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach(function (v) { if (rangeObj.test(v)) { // satisfies(v, range, options) if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) max = v maxSV = new SemVer(max, options) } } }) return max } exports.minSatisfying = minSatisfying function minSatisfying (versions, range, options) { var min = null var minSV = null try { var rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach(function (v) { if (rangeObj.test(v)) { // satisfies(v, range, options) if (!min || minSV.compare(v) === 1) { // compare(min, v, true) min = v minSV = new SemVer(min, options) } } }) return min } exports.minVersion = minVersion function minVersion (range, loose) { range = new Range(range, loose) var minver = new SemVer('0.0.0') if (range.test(minver)) { return minver } minver = new SemVer('0.0.0-0') if (range.test(minver)) { return minver } minver = null for (var i = 0; i < range.set.length; ++i) { var comparators = range.set[i] comparators.forEach(function (comparator) { // Clone to avoid manipulating the comparator's semver object. var compver = new SemVer(comparator.semver.version) switch (comparator.operator) { case '>': if (compver.prerelease.length === 0) { compver.patch++ } else { compver.prerelease.push(0) } compver.raw = compver.format() /* fallthrough */ case '': case '>=': if (!minver || gt(minver, compver)) { minver = compver } break case '<': case '<=': /* Ignore maximum versions */ break /* istanbul ignore next */ default: throw new Error('Unexpected operation: ' + comparator.operator) } }) } if (minver && range.test(minver)) { return minver } return null } exports.validRange = validRange function validRange (range, options) { try { // Return '*' instead of '' so that truthiness works. // This will throw if it's invalid anyway return new Range(range, options).range || '*' } catch (er) { return null } } // Determine if version is less than all the versions possible in the range exports.ltr = ltr function ltr (version, range, options) { return outside(version, range, '<', options) } // Determine if version is greater than all the versions possible in the range. exports.gtr = gtr function gtr (version, range, options) { return outside(version, range, '>', options) } exports.outside = outside function outside (version, range, hilo, options) { version = new SemVer(version, options) range = new Range(range, options) var gtfn, ltefn, ltfn, comp, ecomp switch (hilo) { case '>': gtfn = gt ltefn = lte ltfn = lt comp = '>' ecomp = '>=' break case '<': gtfn = lt ltefn = gte ltfn = gt comp = '<' ecomp = '<=' break default: throw new TypeError('Must provide a hilo val of "<" or ">"') } // If it satisifes the range it is not outside if (satisfies(version, range, options)) { return false } // From now on, variable terms are as if we're in "gtr" mode. // but note that everything is flipped for the "ltr" function. for (var i = 0; i < range.set.length; ++i) { var comparators = range.set[i] var high = null var low = null comparators.forEach(function (comparator) { if (comparator.semver === ANY) { comparator = new Comparator('>=0.0.0') } high = high || comparator low = low || comparator if (gtfn(comparator.semver, high.semver, options)) { high = comparator } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator } }) // If the edge version comparator has a operator then our version // isn't outside it if (high.operator === comp || high.operator === ecomp) { return false } // If the lowest version comparator has an operator and our version // is less than it then it isn't higher than the range if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false } } return true } exports.prerelease = prerelease function prerelease (version, options) { var parsed = parse(version, options) return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } exports.intersects = intersects function intersects (r1, r2, options) { r1 = new Range(r1, options) r2 = new Range(r2, options) return r1.intersects(r2) } exports.coerce = coerce function coerce (version) { if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } var match = version.match(re[COERCE]) if (match == null) { return null } return parse(match[1] + '.' + (match[2] || '0') + '.' + (match[3] || '0')) } /***/ }), /***/ 52665: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var shebangRegex = __webpack_require__(27433); module.exports = function (str) { var match = str.match(shebangRegex); if (!match) { return null; } var arr = match[0].replace(/#! ?/, '').split(' '); var bin = arr[0].split('/').pop(); var arg = arr[1]; return (bin === 'env' ? arg : bin + (arg ? ' ' + arg : '') ); }; /***/ }), /***/ 27433: /***/ ((module) => { "use strict"; module.exports = /^#!.*/; /***/ }), /***/ 93008: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = which which.sync = whichSync var isWindows = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys' var path = __webpack_require__(85622) var COLON = isWindows ? ';' : ':' var isexe = __webpack_require__(97126) function getNotFoundError (cmd) { var er = new Error('not found: ' + cmd) er.code = 'ENOENT' return er } function getPathInfo (cmd, opt) { var colon = opt.colon || COLON var pathEnv = opt.path || process.env.PATH || '' var pathExt = [''] pathEnv = pathEnv.split(colon) var pathExtExe = '' if (isWindows) { pathEnv.unshift(process.cwd()) pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') pathExt = pathExtExe.split(colon) // Always test the cmd itself first. isexe will check to make sure // it's found in the pathExt set. if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('') } // If it has a slash, then we don't bother searching the pathenv. // just check the file itself, and that's it. if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) pathEnv = [''] return { env: pathEnv, ext: pathExt, extExe: pathExtExe } } function which (cmd, opt, cb) { if (typeof opt === 'function') { cb = opt opt = {} } var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext var pathExtExe = info.extExe var found = [] ;(function F (i, l) { if (i === l) { if (opt.all && found.length) return cb(null, found) else return cb(getNotFoundError(cmd)) } var pathPart = pathEnv[i] if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1) var p = path.join(pathPart, cmd) if (!pathPart && (/^\.[\\\/]/).test(cmd)) { p = cmd.slice(0, 2) + p } ;(function E (ii, ll) { if (ii === ll) return F(i + 1, l) var ext = pathExt[ii] isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { if (!er && is) { if (opt.all) found.push(p + ext) else return cb(null, p + ext) } return E(ii + 1, ll) }) })(0, pathExt.length) })(0, pathEnv.length) } function whichSync (cmd, opt) { opt = opt || {} var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext var pathExtExe = info.extExe var found = [] for (var i = 0, l = pathEnv.length; i < l; i ++) { var pathPart = pathEnv[i] if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1) var p = path.join(pathPart, cmd) if (!pathPart && /^\.[\\\/]/.test(cmd)) { p = cmd.slice(0, 2) + p } for (var j = 0, ll = pathExt.length; j < ll; j ++) { var cur = p + pathExt[j] var is try { is = isexe.sync(cur, { pathExt: pathExtExe }) if (is) { if (opt.all) found.push(cur) else return cur } } catch (ex) {} } } if (opt.all && found.length) return found if (opt.nothrow) return null throw getNotFoundError(cmd) } /***/ }), /***/ 38171: /***/ ((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; }; /***/ }), /***/ 87264: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { /* * extsprintf.js: extended POSIX-style sprintf */ var mod_assert = __webpack_require__(42357); var mod_util = __webpack_require__(31669); /* * 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); } /***/ }), /***/ 28206: /***/ ((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; }; /***/ }), /***/ 30969: /***/ ((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); }; /***/ }), /***/ 47568: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = ForeverAgent ForeverAgent.SSL = ForeverAgentSSL var util = __webpack_require__(31669) , Agent = __webpack_require__(98605).Agent , net = __webpack_require__(11631) , tls = __webpack_require__(4016) , AgentSSL = __webpack_require__(57211).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); } /***/ }), /***/ 27714: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; const MiniPass = __webpack_require__(41077) const EE = __webpack_require__(28614).EventEmitter const fs = __webpack_require__(35747) 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 /***/ }), /***/ 46863: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = realpath realpath.realpath = realpath realpath.sync = realpathSync realpath.realpathSync = realpathSync realpath.monkeypatch = monkeypatch realpath.unmonkeypatch = unmonkeypatch var fs = __webpack_require__(35747) var origRealpath = fs.realpath var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) var old = __webpack_require__(71734) 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 } /***/ }), /***/ 71734: /***/ ((__unused_webpack_module, exports, __webpack_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 = __webpack_require__(85622); var isWindows = process.platform === 'win32'; var fs = __webpack_require__(35747); // 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(); } }; /***/ }), /***/ 91585: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {PassThrough: PassThroughStream} = __webpack_require__(92413); 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; }; /***/ }), /***/ 21766: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {constants: BufferConstants} = __webpack_require__(64293); const pump = __webpack_require__(18341); const bufferStream = __webpack_require__(91585); 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; /***/ }), /***/ 47625: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { 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 fs = __webpack_require__(35747) var path = __webpack_require__(85622) var minimatch = __webpack_require__(83973) var isAbsolute = __webpack_require__(38714) var Minimatch = minimatch.Minimatch function alphasort (a, b) { return a.localeCompare(b, 'en') } 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.fs = options.fs || fs 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(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)) }) } /***/ }), /***/ 91957: /***/ ((module, __unused_webpack_exports, __webpack_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 rp = __webpack_require__(46863) var minimatch = __webpack_require__(83973) var Minimatch = minimatch.Minimatch var inherits = __webpack_require__(44124) var EE = __webpack_require__(28614).EventEmitter var path = __webpack_require__(85622) var assert = __webpack_require__(42357) var isAbsolute = __webpack_require__(38714) var globSync = __webpack_require__(29010) var common = __webpack_require__(47625) var setopts = common.setopts var ownProp = common.ownProp var inflight = __webpack_require__(52492) var util = __webpack_require__(31669) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored var once = __webpack_require__(1223) 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) self.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 self.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) self.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 self.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) } /***/ }), /***/ 29010: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = globSync globSync.GlobSync = GlobSync var rp = __webpack_require__(46863) var minimatch = __webpack_require__(83973) var Minimatch = minimatch.Minimatch var Glob = __webpack_require__(91957).Glob var util = __webpack_require__(31669) var path = __webpack_require__(85622) var assert = __webpack_require__(42357) var isAbsolute = __webpack_require__(38714) var common = __webpack_require__(47625) 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 = this.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, this.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 = this.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 = this.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) } /***/ }), /***/ 26457: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const types_1 = __webpack_require__(64597); 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; /***/ }), /***/ 36056: /***/ (function(__unused_webpack_module, exports, __webpack_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 = __webpack_require__(28614); const is_1 = __webpack_require__(68977); const PCancelable = __webpack_require__(19072); const types_1 = __webpack_require__(64597); const parse_body_1 = __webpack_require__(88220); const core_1 = __webpack_require__(60094); const proxy_events_1 = __webpack_require__(53021); const get_buffer_1 = __webpack_require__(34500); const is_response_ok_1 = __webpack_require__(49298); 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(__webpack_require__(64597), exports); /***/ }), /***/ 41048: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(68977); 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; /***/ }), /***/ 88220: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const types_1 = __webpack_require__(64597); 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; /***/ }), /***/ 64597: /***/ (function(__unused_webpack_module, exports, __webpack_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 = __webpack_require__(60094); /** 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(__webpack_require__(60094), exports); /***/ }), /***/ 93462: /***/ ((__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; /***/ }), /***/ 60094: /***/ ((__unused_webpack_module, exports, __webpack_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 = __webpack_require__(31669); const stream_1 = __webpack_require__(92413); const fs_1 = __webpack_require__(35747); const url_1 = __webpack_require__(78835); const http = __webpack_require__(98605); const http_1 = __webpack_require__(98605); const https = __webpack_require__(57211); const http_timer_1 = __webpack_require__(76234); const cacheable_lookup_1 = __webpack_require__(2286); const CacheableRequest = __webpack_require__(69016); const decompressResponse = __webpack_require__(22490); // @ts-expect-error Missing types const http2wrapper = __webpack_require__(54645); const lowercaseKeys = __webpack_require__(9662); const is_1 = __webpack_require__(68977); const get_body_size_1 = __webpack_require__(94564); const is_form_data_1 = __webpack_require__(90040); const proxy_events_1 = __webpack_require__(53021); const timed_out_1 = __webpack_require__(52454); const url_to_options_1 = __webpack_require__(8026); const options_to_url_1 = __webpack_require__(9219); const weakable_map_1 = __webpack_require__(7288); const get_buffer_1 = __webpack_require__(34500); const dns_ip_version_1 = __webpack_require__(94993); const is_response_ok_1 = __webpack_require__(49298); const deprecation_warning_1 = __webpack_require__(397); const normalize_arguments_1 = __webpack_require__(41048); const calculate_retry_delay_1 = __webpack_require__(93462); 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; /***/ }), /***/ 94993: /***/ ((__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'); }; /***/ }), /***/ 94564: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs_1 = __webpack_require__(35747); const util_1 = __webpack_require__(31669); const is_1 = __webpack_require__(68977); const is_form_data_1 = __webpack_require__(90040); 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; }; /***/ }), /***/ 34500: /***/ ((__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; /***/ }), /***/ 90040: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(68977); exports.default = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); /***/ }), /***/ 49298: /***/ ((__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; }; /***/ }), /***/ 9219: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* istanbul ignore file: deprecated */ const url_1 = __webpack_require__(78835); 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; }; /***/ }), /***/ 53021: /***/ ((__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; /***/ }), /***/ 52454: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TimeoutError = void 0; const net = __webpack_require__(11631); const unhandle_1 = __webpack_require__(81593); 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; }; /***/ }), /***/ 81593: /***/ ((__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; } }; }; /***/ }), /***/ 8026: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(68977); 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; }; /***/ }), /***/ 7288: /***/ ((__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; /***/ }), /***/ 34337: /***/ (function(__unused_webpack_module, exports, __webpack_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 = __webpack_require__(68977); const as_promise_1 = __webpack_require__(36056); const create_rejection_1 = __webpack_require__(26457); const core_1 = __webpack_require__(60094); const deep_freeze_1 = __webpack_require__(70285); 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(__webpack_require__(72613), exports); /***/ }), /***/ 93061: /***/ (function(module, exports, __webpack_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 = __webpack_require__(78835); const create_1 = __webpack_require__(34337); 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(__webpack_require__(34337), exports); __exportStar(__webpack_require__(36056), exports); /***/ }), /***/ 72613: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), /***/ 70285: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(68977); 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; /***/ }), /***/ 397: /***/ ((__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' }); }; /***/ }), /***/ 68977: /***/ ((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', '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; 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), // 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; /***/ }), /***/ 76234: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const defer_to_connect_1 = __webpack_require__(98183); const nodejsMajorVersion = Number(process.versions.node.split('.')[0]); const timer = (request) => { 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); request.prependOnceListener('abort', () => { 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; } }); const onSocket = (socket) => { timings.socket = Date.now(); timings.phases.wait = timings.socket - timings.start; 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, (_a !== 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; }); }); return timings; }; exports.default = timer; // For CommonJS default export support module.exports = timer; module.exports.default = timer; /***/ }), /***/ 69016: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const urlLib = __webpack_require__(78835); const normalizeUrl = __webpack_require__(17952); const getStream = __webpack_require__(21766); const CachePolicy = __webpack_require__(61002); const Response = __webpack_require__(9004); const lowercaseKeys = __webpack_require__(9662); const cloneResponse = __webpack_require__(81312); const Keyv = __webpack_require__(94432); 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; /***/ }), /***/ 22490: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Transform, PassThrough} = __webpack_require__(92413); const zlib = __webpack_require__(78761); const mimicResponse = __webpack_require__(35039); 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; }; /***/ }), /***/ 98183: /***/ ((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; /***/ }), /***/ 11460: /***/ ((__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 }) } /***/ }), /***/ 94432: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const JSONB = __webpack_require__(11460); const loadStore = opts => { const adapters = { redis: '@keyv/redis', mongodb: '@keyv/mongo', mongo: '@keyv/mongo', sqlite: '@keyv/sqlite', postgresql: '@keyv/postgres', postgres: '@keyv/postgres', mysql: '@keyv/mysql' }; if (opts.adapter || opts.uri) { const adapter = opts.adapter || /^[^:]*/.exec(opts.uri)[0]; return new (require(adapters[adapter]))(opts); } return new Map(); }; class Keyv extends EventEmitter { constructor(uri, opts) { super(); this.opts = Object.assign( { namespace: 'keyv', serialize: JSONB.stringify, deserialize: JSONB.parse }, (typeof uri === 'string') ? { uri } : uri, opts ); if (!this.opts.store) { const adapterOpts = Object.assign({}, this.opts); this.opts.store = loadStore(adapterOpts); } if (typeof this.opts.store.on === 'function') { this.opts.store.on('error', err => this.emit('error', err)); } this.opts.store.namespace = this.opts.namespace; } _getKeyPrefix(key) { return `${this.opts.namespace}:${key}`; } get(key, opts) { const keyPrefixed = this._getKeyPrefix(key); const { store } = this.opts; return Promise.resolve() .then(() => store.get(keyPrefixed)) .then(data => { return (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 (opts && opts.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; /***/ }), /***/ 35039: /***/ ((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; }; /***/ }), /***/ 13679: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = { afterRequest: __webpack_require__(24391), beforeRequest: __webpack_require__(94440), browser: __webpack_require__(99850), cache: __webpack_require__(77654), content: __webpack_require__(73656), cookie: __webpack_require__(67948), creator: __webpack_require__(33412), entry: __webpack_require__(32525), har: __webpack_require__(84943), header: __webpack_require__(68344), log: __webpack_require__(69142), page: __webpack_require__(29075), pageTimings: __webpack_require__(15096), postData: __webpack_require__(73697), query: __webpack_require__(70877), request: __webpack_require__(92084), response: __webpack_require__(20702), timings: __webpack_require__(36941) } /***/ }), /***/ 74944: /***/ ((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 /***/ }), /***/ 75697: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var Ajv = __webpack_require__(64941) var HARError = __webpack_require__(74944) var schemas = __webpack_require__(13679) var ajv function createAjvInstance () { var ajv = new Ajv({ allErrors: true }) ajv.addMetaSchema(__webpack_require__(81030)) 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) } /***/ }), /***/ 15487: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const whatwgEncoding = __webpack_require__(49967); // https://html.spec.whatwg.org/#encoding-sniffing-algorithm module.exports = (buffer, { transportLayerEncodingLabel, defaultEncoding = "windows-1252" } = {}) => { let encoding = whatwgEncoding.getBOMEncoding(buffer); // see https://github.com/whatwg/html/issues/1910 if (encoding === null && transportLayerEncodingLabel !== undefined) { encoding = whatwgEncoding.labelToName(transportLayerEncodingLabel); } if (encoding === null) { encoding = prescanMetaCharset(buffer); } if (encoding === null) { encoding = defaultEncoding; } return encoding; }; // https://html.spec.whatwg.org/multipage/syntax.html#prescan-a-byte-stream-to-determine-its-encoding function prescanMetaCharset(buffer) { const l = Math.min(buffer.length, 1024); for (let i = 0; i < l; i++) { let c = buffer[i]; if (c === 0x3C) { // "<" const c1 = buffer[i + 1]; const c2 = buffer[i + 2]; const c3 = buffer[i + 3]; const c4 = buffer[i + 4]; const c5 = buffer[i + 5]; // !-- (comment start) if (c1 === 0x21 && c2 === 0x2D && c3 === 0x2D) { i += 4; for (; i < l; i++) { c = buffer[i]; const cMinus1 = buffer[i - 1]; const cMinus2 = buffer[i - 2]; // --> (comment end) if (c === 0x3E && cMinus1 === 0x2D && cMinus2 === 0x2D) { break; } } } else if ((c1 === 0x4D || c1 === 0x6D) && (c2 === 0x45 || c2 === 0x65) && (c3 === 0x54 || c3 === 0x74) && (c4 === 0x41 || c4 === 0x61) && (isSpaceCharacter(c5) || c5 === 0x2F)) { // "meta" + space or / i += 6; const attributeList = new Set(); let gotPragma = false; let needPragma = null; let charset = null; let attrRes; do { attrRes = getAttribute(buffer, i, l); if (attrRes.attr && !attributeList.has(attrRes.attr.name)) { attributeList.add(attrRes.attr.name); if (attrRes.attr.name === "http-equiv") { gotPragma = attrRes.attr.value === "content-type"; } else if (attrRes.attr.name === "content" && !charset) { charset = extractCharacterEncodingFromMeta(attrRes.attr.value); if (charset !== null) { needPragma = true; } } else if (attrRes.attr.name === "charset") { charset = whatwgEncoding.labelToName(attrRes.attr.value); needPragma = false; } } i = attrRes.i; } while (attrRes.attr); if (needPragma === null) { continue; } if (needPragma === true && gotPragma === false) { continue; } if (charset === null) { continue; } if (charset === "UTF-16LE" || charset === "UTF-16BE") { charset = "UTF-8"; } if (charset === "x-user-defined") { charset = "windows-1252"; } return charset; } else if ((c1 >= 0x41 && c1 <= 0x5A) || (c1 >= 0x61 && c1 <= 0x7A)) { // a-z or A-Z for (i += 2; i < l; i++) { c = buffer[i]; // space or > if (isSpaceCharacter(c) || c === 0x3E) { break; } } let attrRes; do { attrRes = getAttribute(buffer, i, l); i = attrRes.i; } while (attrRes.attr); } else if (c1 === 0x21 || c1 === 0x2F || c1 === 0x3F) { // ! or / or ? for (i += 2; i < l; i++) { c = buffer[i]; // > if (c === 0x3E) { break; } } } } } return null; } // https://html.spec.whatwg.org/multipage/syntax.html#concept-get-attributes-when-sniffing function getAttribute(buffer, i, l) { for (; i < l; i++) { let c = buffer[i]; // space or / if (isSpaceCharacter(c) || c === 0x2F) { continue; } // ">" if (c === 0x3E) { break; } let name = ""; let value = ""; nameLoop:for (; i < l; i++) { c = buffer[i]; // "=" if (c === 0x3D && name !== "") { i++; break; } // space if (isSpaceCharacter(c)) { for (i++; i < l; i++) { c = buffer[i]; // space if (isSpaceCharacter(c)) { continue; } // not "=" if (c !== 0x3D) { return { attr: { name, value }, i }; } i++; break nameLoop; } break; } // / or > if (c === 0x2F || c === 0x3E) { return { attr: { name, value }, i }; } // A-Z if (c >= 0x41 && c <= 0x5A) { name += String.fromCharCode(c + 0x20); // lowercase } else { name += String.fromCharCode(c); } } c = buffer[i]; // space if (isSpaceCharacter(c)) { for (i++; i < l; i++) { c = buffer[i]; // space if (isSpaceCharacter(c)) { continue; } else { break; } } } // " or ' if (c === 0x22 || c === 0x27) { const quote = c; for (i++; i < l; i++) { c = buffer[i]; if (c === quote) { i++; return { attr: { name, value }, i }; } // A-Z if (c >= 0x41 && c <= 0x5A) { value += String.fromCharCode(c + 0x20); // lowercase } else { value += String.fromCharCode(c); } } } // > if (c === 0x3E) { return { attr: { name, value }, i }; } // A-Z if (c >= 0x41 && c <= 0x5A) { value += String.fromCharCode(c + 0x20); // lowercase } else { value += String.fromCharCode(c); } for (i++; i < l; i++) { c = buffer[i]; // space or > if (isSpaceCharacter(c) || c === 0x3E) { return { attr: { name, value }, i }; } // A-Z if (c >= 0x41 && c <= 0x5A) { value += String.fromCharCode(c + 0x20); // lowercase } else { value += String.fromCharCode(c); } } } return { i }; } function extractCharacterEncodingFromMeta(string) { let position = 0; while (true) { const indexOfCharset = string.substring(position).search(/charset/i); if (indexOfCharset === -1) { return null; } let subPosition = position + indexOfCharset + "charset".length; while (isSpaceCharacter(string[subPosition].charCodeAt(0))) { ++subPosition; } if (string[subPosition] !== "=") { position = subPosition - 1; continue; } ++subPosition; while (isSpaceCharacter(string[subPosition].charCodeAt(0))) { ++subPosition; } position = subPosition; break; } if (string[position] === "\"" || string[position] === "'") { const nextIndex = string.indexOf(string[position], position + 1); if (nextIndex !== -1) { return whatwgEncoding.labelToName(string.substring(position + 1, nextIndex)); } // It is an unmatched quotation mark return null; } if (string.length === position + 1) { return null; } const indexOfASCIIWhitespaceOrSemicolon = string.substring(position + 1).search(/\x09|\x0A|\x0C|\x0D|\x20|;/); const end = indexOfASCIIWhitespaceOrSemicolon === -1 ? string.length : position + indexOfASCIIWhitespaceOrSemicolon + 1; return whatwgEncoding.labelToName(string.substring(position, end)); } function isSpaceCharacter(c) { return c === 0x09 || c === 0x0A || c === 0x0C || c === 0x0D || c === 0x20; } /***/ }), /***/ 61002: /***/ ((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, }; } }; /***/ }), /***/ 42479: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. var parser = __webpack_require__(95086); var signer = __webpack_require__(38143); var verify = __webpack_require__(51227); var utils = __webpack_require__(65689); ///--- 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 }; /***/ }), /***/ 95086: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2012 Joyent, Inc. All rights reserved. var assert = __webpack_require__(66631); var util = __webpack_require__(31669); var utils = __webpack_require__(65689); ///--- 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; } }; /***/ }), /***/ 38143: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2012 Joyent, Inc. All rights reserved. var assert = __webpack_require__(66631); var crypto = __webpack_require__(76417); var http = __webpack_require__(98605); var util = __webpack_require__(31669); var sshpk = __webpack_require__(87022); var jsprim = __webpack_require__(6287); var utils = __webpack_require__(65689); var sprintf = __webpack_require__(31669).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; } }; /***/ }), /***/ 65689: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2012 Joyent, Inc. All rights reserved. var assert = __webpack_require__(66631); var sshpk = __webpack_require__(87022); var util = __webpack_require__(31669); 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')); } }; /***/ }), /***/ 51227: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. var assert = __webpack_require__(66631); var crypto = __webpack_require__(76417); var sshpk = __webpack_require__(87022); var utils = __webpack_require__(65689); 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)); } }; /***/ }), /***/ 79898: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const tls = __webpack_require__(4016); const http2 = __webpack_require__(97565); const QuickLRU = __webpack_require__(49273); 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() }; /***/ }), /***/ 97167: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const http = __webpack_require__(98605); const https = __webpack_require__(57211); const resolveALPN = __webpack_require__(46624); const QuickLRU = __webpack_require__(49273); const Http2ClientRequest = __webpack_require__(59632); const calculateServerName = __webpack_require__(51982); const urlToOptions = __webpack_require__(92686); 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; /***/ }), /***/ 59632: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const http2 = __webpack_require__(97565); const {Writable} = __webpack_require__(92413); const {Agent, globalAgent} = __webpack_require__(79898); const IncomingMessage = __webpack_require__(82575); const urlToOptions = __webpack_require__(92686); const proxyEvents = __webpack_require__(81818); const isRequestPseudoHeader = __webpack_require__(11199); const { ERR_INVALID_ARG_TYPE, ERR_INVALID_PROTOCOL, ERR_HTTP_HEADERS_SENT, ERR_INVALID_HTTP_TOKEN, ERR_HTTP_INVALID_HEADER_VALUE, ERR_INVALID_CHAR } = __webpack_require__(7087); 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; /***/ }), /***/ 82575: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Readable} = __webpack_require__(92413); 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; /***/ }), /***/ 54645: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const http2 = __webpack_require__(97565); const agent = __webpack_require__(79898); const ClientRequest = __webpack_require__(59632); const IncomingMessage = __webpack_require__(82575); const auto = __webpack_require__(97167); 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 }; /***/ }), /***/ 51982: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const net = __webpack_require__(11631); /* 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; }; /***/ }), /***/ 7087: /***/ ((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]}]`; }); /***/ }), /***/ 11199: /***/ ((module) => { "use strict"; module.exports = header => { switch (header) { case ':method': case ':scheme': case ':authority': case ':path': return true; default: return false; } }; /***/ }), /***/ 81818: /***/ ((module) => { "use strict"; module.exports = (from, to, events) => { for (const event of events) { from.on(event, (...args) => to.emit(event, ...args)); } }; /***/ }), /***/ 92686: /***/ ((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; }; /***/ }), /***/ 39695: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(15118).Buffer; // Multibyte codec. In this scheme, a character is represented by 1 or more bytes. // Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. // To save memory and loading time, we read table files only when requested. exports._dbcs = DBCSCodec; var UNASSIGNED = -1, GB18030_CODE = -2, SEQ_START = -10, NODE_START = -1000, UNASSIGNED_NODE = new Array(0x100), DEF_CHAR = -1; for (var i = 0; i < 0x100; i++) UNASSIGNED_NODE[i] = UNASSIGNED; // Class DBCSCodec reads and initializes mapping tables. function DBCSCodec(codecOptions, iconv) { this.encodingName = codecOptions.encodingName; if (!codecOptions) throw new Error("DBCS codec is called without the data.") if (!codecOptions.table) throw new Error("Encoding '" + this.encodingName + "' has no data."); // Load tables. var mappingTable = codecOptions.table(); // Decode tables: MBCS -> Unicode. // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. // Trie root is decodeTables[0]. // Values: >= 0 -> unicode character code. can be > 0xFFFF // == UNASSIGNED -> unknown/unassigned sequence. // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. // <= NODE_START -> index of the next node in our trie to process next byte. // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. this.decodeTables = []; this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. this.decodeTableSeq = []; // Actual mapping tables consist of chunks. Use them to fill up decode tables. for (var i = 0; i < mappingTable.length; i++) this._addDecodeChunk(mappingTable[i]); this.defaultCharUnicode = iconv.defaultCharUnicode; // Encode tables: Unicode -> DBCS. // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). // == UNASSIGNED -> no conversion found. Output a default char. // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. this.encodeTable = []; // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key // means end of sequence (needed when one sequence is a strict subsequence of another). // Objects are kept separately from encodeTable to increase performance. this.encodeTableSeq = []; // Some chars can be decoded, but need not be encoded. var skipEncodeChars = {}; if (codecOptions.encodeSkipVals) for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { var val = codecOptions.encodeSkipVals[i]; if (typeof val === 'number') skipEncodeChars[val] = true; else for (var j = val.from; j <= val.to; j++) skipEncodeChars[j] = true; } // Use decode trie to recursively fill out encode tables. this._fillEncodeTable(0, 0, skipEncodeChars); // Add more encoding pairs when needed. if (codecOptions.encodeAdd) { for (var uChar in codecOptions.encodeAdd) if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); } this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); // Load & create GB18030 tables when needed. if (typeof codecOptions.gb18030 === 'function') { this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. // Add GB18030 decode tables. var thirdByteNodeIdx = this.decodeTables.length; var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); var fourthByteNodeIdx = this.decodeTables.length; var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); for (var i = 0x81; i <= 0xFE; i++) { var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; var secondByteNode = this.decodeTables[secondByteNodeIdx]; for (var j = 0x30; j <= 0x39; j++) secondByteNode[j] = NODE_START - thirdByteNodeIdx; } for (var i = 0x81; i <= 0xFE; i++) thirdByteNode[i] = NODE_START - fourthByteNodeIdx; for (var i = 0x30; i <= 0x39; i++) fourthByteNode[i] = GB18030_CODE } } DBCSCodec.prototype.encoder = DBCSEncoder; DBCSCodec.prototype.decoder = DBCSDecoder; // Decoder helpers DBCSCodec.prototype._getDecodeTrieNode = function(addr) { var bytes = []; for (; addr > 0; addr >>= 8) bytes.push(addr & 0xFF); if (bytes.length == 0) bytes.push(0); var node = this.decodeTables[0]; for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. var val = node[bytes[i]]; if (val == UNASSIGNED) { // Create new node. node[bytes[i]] = NODE_START - this.decodeTables.length; this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); } else if (val <= NODE_START) { // Existing node. node = this.decodeTables[NODE_START - val]; } else throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); } return node; } DBCSCodec.prototype._addDecodeChunk = function(chunk) { // First element of chunk is the hex mbcs code where we start. var curAddr = parseInt(chunk[0], 16); // Choose the decoding node where we'll write our chars. var writeTable = this._getDecodeTrieNode(curAddr); curAddr = curAddr & 0xFF; // Write all other elements of the chunk to the table. for (var k = 1; k < chunk.length; k++) { var part = chunk[k]; if (typeof part === "string") { // String, write as-is. for (var l = 0; l < part.length;) { var code = part.charCodeAt(l++); if (0xD800 <= code && code < 0xDC00) { // Decode surrogate var codeTrail = part.charCodeAt(l++); if (0xDC00 <= codeTrail && codeTrail < 0xE000) writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); else throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); } else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) var len = 0xFFF - code + 2; var seq = []; for (var m = 0; m < len; m++) seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; this.decodeTableSeq.push(seq); } else writeTable[curAddr++] = code; // Basic char } } else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. var charCode = writeTable[curAddr - 1] + 1; for (var l = 0; l < part; l++) writeTable[curAddr++] = charCode++; } else throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); } if (curAddr > 0xFF) throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); } // Encoder helpers DBCSCodec.prototype._getEncodeBucket = function(uCode) { var high = uCode >> 8; // This could be > 0xFF because of astral characters. if (this.encodeTable[high] === undefined) this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. return this.encodeTable[high]; } DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { var bucket = this._getEncodeBucket(uCode); var low = uCode & 0xFF; if (bucket[low] <= SEQ_START) this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. else if (bucket[low] == UNASSIGNED) bucket[low] = dbcsCode; } DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { // Get the root of character tree according to first character of the sequence. var uCode = seq[0]; var bucket = this._getEncodeBucket(uCode); var low = uCode & 0xFF; var node; if (bucket[low] <= SEQ_START) { // There's already a sequence with - use it. node = this.encodeTableSeq[SEQ_START-bucket[low]]; } else { // There was no sequence object - allocate a new one. node = {}; if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. bucket[low] = SEQ_START - this.encodeTableSeq.length; this.encodeTableSeq.push(node); } // Traverse the character tree, allocating new nodes as needed. for (var j = 1; j < seq.length-1; j++) { var oldVal = node[uCode]; if (typeof oldVal === 'object') node = oldVal; else { node = node[uCode] = {} if (oldVal !== undefined) node[DEF_CHAR] = oldVal } } // Set the leaf to given dbcsCode. uCode = seq[seq.length-1]; node[uCode] = dbcsCode; } DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { var node = this.decodeTables[nodeIdx]; for (var i = 0; i < 0x100; i++) { var uCode = node[i]; var mbCode = prefix + i; if (skipEncodeChars[mbCode]) continue; if (uCode >= 0) this._setEncodeChar(uCode, mbCode); else if (uCode <= NODE_START) this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); else if (uCode <= SEQ_START) this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); } } // == Encoder ================================================================== function DBCSEncoder(options, codec) { // Encoder state this.leadSurrogate = -1; this.seqObj = undefined; // Static data this.encodeTable = codec.encodeTable; this.encodeTableSeq = codec.encodeTableSeq; this.defaultCharSingleByte = codec.defCharSB; this.gb18030 = codec.gb18030; } DBCSEncoder.prototype.write = function(str) { var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i = 0, j = 0; while (true) { // 0. Get next character. if (nextChar === -1) { if (i == str.length) break; var uCode = str.charCodeAt(i++); } else { var uCode = nextChar; nextChar = -1; } // 1. Handle surrogates. if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. if (uCode < 0xDC00) { // We've got lead surrogate. if (leadSurrogate === -1) { leadSurrogate = uCode; continue; } else { leadSurrogate = uCode; // Double lead surrogate found. uCode = UNASSIGNED; } } else { // We've got trail surrogate. if (leadSurrogate !== -1) { uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); leadSurrogate = -1; } else { // Incomplete surrogate pair - only trail surrogate found. uCode = UNASSIGNED; } } } else if (leadSurrogate !== -1) { // Incomplete surrogate pair - only lead surrogate found. nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. leadSurrogate = -1; } // 2. Convert uCode character. var dbcsCode = UNASSIGNED; if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence var resCode = seqObj[uCode]; if (typeof resCode === 'object') { // Sequence continues. seqObj = resCode; continue; } else if (typeof resCode == 'number') { // Sequence finished. Write it. dbcsCode = resCode; } else if (resCode == undefined) { // Current character is not part of the sequence. // Try default character for this sequence resCode = seqObj[DEF_CHAR]; if (resCode !== undefined) { dbcsCode = resCode; // Found. Write it. nextChar = uCode; // Current character will be written too in the next iteration. } else { // TODO: What if we have no default? (resCode == undefined) // Then, we should write first char of the sequence as-is and try the rest recursively. // Didn't do it for now because no encoding has this situation yet. // Currently, just skip the sequence and write current char. } } seqObj = undefined; } else if (uCode >= 0) { // Regular character var subtable = this.encodeTable[uCode >> 8]; if (subtable !== undefined) dbcsCode = subtable[uCode & 0xFF]; if (dbcsCode <= SEQ_START) { // Sequence start seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; continue; } if (dbcsCode == UNASSIGNED && this.gb18030) { // Use GB18030 algorithm to find character(s) to write. var idx = findIdx(this.gb18030.uChars, uCode); if (idx != -1) { var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; newBuf[j++] = 0x30 + dbcsCode; continue; } } } // 3. Write dbcsCode character. if (dbcsCode === UNASSIGNED) dbcsCode = this.defaultCharSingleByte; if (dbcsCode < 0x100) { newBuf[j++] = dbcsCode; } else if (dbcsCode < 0x10000) { newBuf[j++] = dbcsCode >> 8; // high byte newBuf[j++] = dbcsCode & 0xFF; // low byte } else { newBuf[j++] = dbcsCode >> 16; newBuf[j++] = (dbcsCode >> 8) & 0xFF; newBuf[j++] = dbcsCode & 0xFF; } } this.seqObj = seqObj; this.leadSurrogate = leadSurrogate; return newBuf.slice(0, j); } DBCSEncoder.prototype.end = function() { if (this.leadSurrogate === -1 && this.seqObj === undefined) return; // All clean. Most often case. var newBuf = Buffer.alloc(10), j = 0; if (this.seqObj) { // We're in the sequence. var dbcsCode = this.seqObj[DEF_CHAR]; if (dbcsCode !== undefined) { // Write beginning of the sequence. if (dbcsCode < 0x100) { newBuf[j++] = dbcsCode; } else { newBuf[j++] = dbcsCode >> 8; // high byte newBuf[j++] = dbcsCode & 0xFF; // low byte } } else { // See todo above. } this.seqObj = undefined; } if (this.leadSurrogate !== -1) { // Incomplete surrogate pair - only lead surrogate found. newBuf[j++] = this.defaultCharSingleByte; this.leadSurrogate = -1; } return newBuf.slice(0, j); } // Export for testing DBCSEncoder.prototype.findIdx = findIdx; // == Decoder ================================================================== function DBCSDecoder(options, codec) { // Decoder state this.nodeIdx = 0; this.prevBuf = Buffer.alloc(0); // Static data this.decodeTables = codec.decodeTables; this.decodeTableSeq = codec.decodeTableSeq; this.defaultCharUnicode = codec.defaultCharUnicode; this.gb18030 = codec.gb18030; } DBCSDecoder.prototype.write = function(buf) { var newBuf = Buffer.alloc(buf.length*2), nodeIdx = this.nodeIdx, prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. uCode; if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); for (var i = 0, j = 0; i < buf.length; i++) { var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; // Lookup in current trie node. var uCode = this.decodeTables[nodeIdx][curByte]; if (uCode >= 0) { // Normal character, just use it. } else if (uCode === UNASSIGNED) { // Unknown char. // TODO: Callback with seq. //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). uCode = this.defaultCharUnicode.charCodeAt(0); } else if (uCode === GB18030_CODE) { var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); var idx = findIdx(this.gb18030.gbChars, ptr); uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; } else if (uCode <= NODE_START) { // Go to next trie node. nodeIdx = NODE_START - uCode; continue; } else if (uCode <= SEQ_START) { // Output a sequence of chars. var seq = this.decodeTableSeq[SEQ_START - uCode]; for (var k = 0; k < seq.length - 1; k++) { uCode = seq[k]; newBuf[j++] = uCode & 0xFF; newBuf[j++] = uCode >> 8; } uCode = seq[seq.length-1]; } else throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); // Write the character to buffer, handling higher planes using surrogate pair. if (uCode > 0xFFFF) { uCode -= 0x10000; var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); newBuf[j++] = uCodeLead & 0xFF; newBuf[j++] = uCodeLead >> 8; uCode = 0xDC00 + uCode % 0x400; } newBuf[j++] = uCode & 0xFF; newBuf[j++] = uCode >> 8; // Reset trie node. nodeIdx = 0; seqStart = i+1; } this.nodeIdx = nodeIdx; this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); return newBuf.slice(0, j).toString('ucs2'); } DBCSDecoder.prototype.end = function() { var ret = ''; // Try to parse all remaining chars. while (this.prevBuf.length > 0) { // Skip 1 character in the buffer. ret += this.defaultCharUnicode; var buf = this.prevBuf.slice(1); // Parse remaining as usual. this.prevBuf = Buffer.alloc(0); this.nodeIdx = 0; if (buf.length > 0) ret += this.write(buf); } this.nodeIdx = 0; return ret; } // Binary search for GB18030. Returns largest i such that table[i] <= val. function findIdx(table, val) { if (table[0] > val) return -1; var l = 0, r = table.length; while (l < r-1) { // always table[l] <= val < table[r] var mid = l + Math.floor((r-l+1)/2); if (table[mid] <= val) l = mid; else r = mid; } return l; } /***/ }), /***/ 91386: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // Description of supported double byte encodings and aliases. // Tables are not require()-d until they are needed to speed up library load. // require()-s are direct to support Browserify. module.exports = { // == Japanese/ShiftJIS ==================================================== // All japanese encodings are based on JIS X set of standards: // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. // Has several variations in 1978, 1983, 1990 and 1997. // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. // 2 planes, first is superset of 0208, second - revised 0212. // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) // Byte encodings are: // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. // 0x00-0x7F - lower part of 0201 // 0x8E, 0xA1-0xDF - upper part of 0201 // (0xA1-0xFE)x2 - 0208 plane (94x94). // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. // Used as-is in ISO2022 family. // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, // 0201-1976 Roman, 0208-1978, 0208-1983. // * ISO2022-JP-1: Adds esc seq for 0212-1990. // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. // // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. // // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html 'shiftjis': { type: '_dbcs', table: function() { return __webpack_require__(64108) }, encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, encodeSkipVals: [{from: 0xED40, to: 0xF940}], }, 'csshiftjis': 'shiftjis', 'mskanji': 'shiftjis', 'sjis': 'shiftjis', 'windows31j': 'shiftjis', 'ms31j': 'shiftjis', 'xsjis': 'shiftjis', 'windows932': 'shiftjis', 'ms932': 'shiftjis', '932': 'shiftjis', 'cp932': 'shiftjis', 'eucjp': { type: '_dbcs', table: function() { return __webpack_require__(72417) }, encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, }, // TODO: KDDI extension to Shift_JIS // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. // == Chinese/GBK ========================================================== // http://en.wikipedia.org/wiki/GBK // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 'gb2312': 'cp936', 'gb231280': 'cp936', 'gb23121980': 'cp936', 'csgb2312': 'cp936', 'csiso58gb231280': 'cp936', 'euccn': 'cp936', // Microsoft's CP936 is a subset and approximation of GBK. 'windows936': 'cp936', 'ms936': 'cp936', '936': 'cp936', 'cp936': { type: '_dbcs', table: function() { return __webpack_require__(97803) }, }, // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. 'gbk': { type: '_dbcs', table: function() { return __webpack_require__(97803).concat(__webpack_require__(37419)) }, }, 'xgbk': 'gbk', 'isoir58': 'gbk', // GB18030 is an algorithmic extension of GBK. // Main source: https://www.w3.org/TR/encoding/#gbk-encoder // http://icu-project.org/docs/papers/gb18030.html // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 'gb18030': { type: '_dbcs', table: function() { return __webpack_require__(97803).concat(__webpack_require__(37419)) }, gb18030: function() { return __webpack_require__(86351) }, encodeSkipVals: [0x80], encodeAdd: {'€': 0xA2E3}, }, 'chinese': 'gb18030', // == Korean =============================================================== // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. 'windows949': 'cp949', 'ms949': 'cp949', '949': 'cp949', 'cp949': { type: '_dbcs', table: function() { return __webpack_require__(87013) }, }, 'cseuckr': 'cp949', 'csksc56011987': 'cp949', 'euckr': 'cp949', 'isoir149': 'cp949', 'korean': 'cp949', 'ksc56011987': 'cp949', 'ksc56011989': 'cp949', 'ksc5601': 'cp949', // == Big5/Taiwan/Hong Kong ================================================ // There are lots of tables for Big5 and cp950. Please see the following links for history: // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html // Variations, in roughly number of defined chars: // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ // * Big5-2003 (Taiwan standard) almost superset of cp950. // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. // Plus, it has 4 combining sequences. // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. // Implementations are not consistent within browsers; sometimes labeled as just big5. // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt // // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. 'windows950': 'cp950', 'ms950': 'cp950', '950': 'cp950', 'cp950': { type: '_dbcs', table: function() { return __webpack_require__(33104) }, }, // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. 'big5': 'big5hkscs', 'big5hkscs': { type: '_dbcs', table: function() { return __webpack_require__(33104).concat(__webpack_require__(43612)) }, encodeSkipVals: [0xa2cc], }, 'cnbig5': 'big5hkscs', 'csbig5': 'big5hkscs', 'xxbig5': 'big5hkscs', }; /***/ }), /***/ 82733: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; // Update this array if you add/rename/remove files in this directory. // We support Browserify by skipping automatic module discovery and requiring modules directly. var modules = [ __webpack_require__(12376), __webpack_require__(11155), __webpack_require__(51644), __webpack_require__(26657), __webpack_require__(41080), __webpack_require__(21012), __webpack_require__(39695), __webpack_require__(91386), ]; // Put all encoding/alias/codec definitions to single object and export it. for (var i = 0; i < modules.length; i++) { var module = modules[i]; for (var enc in module) if (Object.prototype.hasOwnProperty.call(module, enc)) exports[enc] = module[enc]; } /***/ }), /***/ 12376: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(15118).Buffer; // Export Node.js internal encodings. module.exports = { // Encodings utf8: { type: "_internal", bomAware: true}, cesu8: { type: "_internal", bomAware: true}, unicode11utf8: "utf8", ucs2: { type: "_internal", bomAware: true}, utf16le: "ucs2", binary: { type: "_internal" }, base64: { type: "_internal" }, hex: { type: "_internal" }, // Codec. _internal: InternalCodec, }; //------------------------------------------------------------------------------ function InternalCodec(codecOptions, iconv) { this.enc = codecOptions.encodingName; this.bomAware = codecOptions.bomAware; if (this.enc === "base64") this.encoder = InternalEncoderBase64; else if (this.enc === "cesu8") { this.enc = "utf8"; // Use utf8 for decoding. this.encoder = InternalEncoderCesu8; // Add decoder for versions of Node not supporting CESU-8 if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { this.decoder = InternalDecoderCesu8; this.defaultCharUnicode = iconv.defaultCharUnicode; } } } InternalCodec.prototype.encoder = InternalEncoder; InternalCodec.prototype.decoder = InternalDecoder; //------------------------------------------------------------------------------ // We use node.js internal decoder. Its signature is the same as ours. var StringDecoder = __webpack_require__(24304).StringDecoder; if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. StringDecoder.prototype.end = function() {}; function InternalDecoder(options, codec) { StringDecoder.call(this, codec.enc); } InternalDecoder.prototype = StringDecoder.prototype; //------------------------------------------------------------------------------ // Encoder is mostly trivial function InternalEncoder(options, codec) { this.enc = codec.enc; } InternalEncoder.prototype.write = function(str) { return Buffer.from(str, this.enc); } InternalEncoder.prototype.end = function() { } //------------------------------------------------------------------------------ // Except base64 encoder, which must keep its state. function InternalEncoderBase64(options, codec) { this.prevStr = ''; } InternalEncoderBase64.prototype.write = function(str) { str = this.prevStr + str; var completeQuads = str.length - (str.length % 4); this.prevStr = str.slice(completeQuads); str = str.slice(0, completeQuads); return Buffer.from(str, "base64"); } InternalEncoderBase64.prototype.end = function() { return Buffer.from(this.prevStr, "base64"); } //------------------------------------------------------------------------------ // CESU-8 encoder is also special. function InternalEncoderCesu8(options, codec) { } InternalEncoderCesu8.prototype.write = function(str) { var buf = Buffer.alloc(str.length * 3), bufIdx = 0; for (var i = 0; i < str.length; i++) { var charCode = str.charCodeAt(i); // Naive implementation, but it works because CESU-8 is especially easy // to convert from UTF-16 (which all JS strings are encoded in). if (charCode < 0x80) buf[bufIdx++] = charCode; else if (charCode < 0x800) { buf[bufIdx++] = 0xC0 + (charCode >>> 6); buf[bufIdx++] = 0x80 + (charCode & 0x3f); } else { // charCode will always be < 0x10000 in javascript. buf[bufIdx++] = 0xE0 + (charCode >>> 12); buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); buf[bufIdx++] = 0x80 + (charCode & 0x3f); } } return buf.slice(0, bufIdx); } InternalEncoderCesu8.prototype.end = function() { } //------------------------------------------------------------------------------ // CESU-8 decoder is not implemented in Node v4.0+ function InternalDecoderCesu8(options, codec) { this.acc = 0; this.contBytes = 0; this.accBytes = 0; this.defaultCharUnicode = codec.defaultCharUnicode; } InternalDecoderCesu8.prototype.write = function(buf) { var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, res = ''; for (var i = 0; i < buf.length; i++) { var curByte = buf[i]; if ((curByte & 0xC0) !== 0x80) { // Leading byte if (contBytes > 0) { // Previous code is invalid res += this.defaultCharUnicode; contBytes = 0; } if (curByte < 0x80) { // Single-byte code res += String.fromCharCode(curByte); } else if (curByte < 0xE0) { // Two-byte code acc = curByte & 0x1F; contBytes = 1; accBytes = 1; } else if (curByte < 0xF0) { // Three-byte code acc = curByte & 0x0F; contBytes = 2; accBytes = 1; } else { // Four or more are not supported for CESU-8. res += this.defaultCharUnicode; } } else { // Continuation byte if (contBytes > 0) { // We're waiting for it. acc = (acc << 6) | (curByte & 0x3f); contBytes--; accBytes++; if (contBytes === 0) { // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) if (accBytes === 2 && acc < 0x80 && acc > 0) res += this.defaultCharUnicode; else if (accBytes === 3 && acc < 0x800) res += this.defaultCharUnicode; else // Actually add character. res += String.fromCharCode(acc); } } else { // Unexpected continuation byte res += this.defaultCharUnicode; } } } this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; return res; } InternalDecoderCesu8.prototype.end = function() { var res = 0; if (this.contBytes > 0) res += this.defaultCharUnicode; return res; } /***/ }), /***/ 26657: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(15118).Buffer; // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that // correspond to encoded bytes (if 128 - then lower half is ASCII). exports._sbcs = SBCSCodec; function SBCSCodec(codecOptions, iconv) { if (!codecOptions) throw new Error("SBCS codec is called without the data.") // Prepare char buffer for decoding. if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); if (codecOptions.chars.length === 128) { var asciiString = ""; for (var i = 0; i < 128; i++) asciiString += String.fromCharCode(i); codecOptions.chars = asciiString + codecOptions.chars; } this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); // Encoding buffer. var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); for (var i = 0; i < codecOptions.chars.length; i++) encodeBuf[codecOptions.chars.charCodeAt(i)] = i; this.encodeBuf = encodeBuf; } SBCSCodec.prototype.encoder = SBCSEncoder; SBCSCodec.prototype.decoder = SBCSDecoder; function SBCSEncoder(options, codec) { this.encodeBuf = codec.encodeBuf; } SBCSEncoder.prototype.write = function(str) { var buf = Buffer.alloc(str.length); for (var i = 0; i < str.length; i++) buf[i] = this.encodeBuf[str.charCodeAt(i)]; return buf; } SBCSEncoder.prototype.end = function() { } function SBCSDecoder(options, codec) { this.decodeBuf = codec.decodeBuf; } SBCSDecoder.prototype.write = function(buf) { // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. var decodeBuf = this.decodeBuf; var newBuf = Buffer.alloc(buf.length*2); var idx1 = 0, idx2 = 0; for (var i = 0; i < buf.length; i++) { idx1 = buf[i]*2; idx2 = i*2; newBuf[idx2] = decodeBuf[idx1]; newBuf[idx2+1] = decodeBuf[idx1+1]; } return newBuf.toString('ucs2'); } SBCSDecoder.prototype.end = function() { } /***/ }), /***/ 21012: /***/ ((module) => { "use strict"; // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. module.exports = { "437": "cp437", "737": "cp737", "775": "cp775", "850": "cp850", "852": "cp852", "855": "cp855", "856": "cp856", "857": "cp857", "858": "cp858", "860": "cp860", "861": "cp861", "862": "cp862", "863": "cp863", "864": "cp864", "865": "cp865", "866": "cp866", "869": "cp869", "874": "windows874", "922": "cp922", "1046": "cp1046", "1124": "cp1124", "1125": "cp1125", "1129": "cp1129", "1133": "cp1133", "1161": "cp1161", "1162": "cp1162", "1163": "cp1163", "1250": "windows1250", "1251": "windows1251", "1252": "windows1252", "1253": "windows1253", "1254": "windows1254", "1255": "windows1255", "1256": "windows1256", "1257": "windows1257", "1258": "windows1258", "28591": "iso88591", "28592": "iso88592", "28593": "iso88593", "28594": "iso88594", "28595": "iso88595", "28596": "iso88596", "28597": "iso88597", "28598": "iso88598", "28599": "iso88599", "28600": "iso885910", "28601": "iso885911", "28603": "iso885913", "28604": "iso885914", "28605": "iso885915", "28606": "iso885916", "windows874": { "type": "_sbcs", "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" }, "win874": "windows874", "cp874": "windows874", "windows1250": { "type": "_sbcs", "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" }, "win1250": "windows1250", "cp1250": "windows1250", "windows1251": { "type": "_sbcs", "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" }, "win1251": "windows1251", "cp1251": "windows1251", "windows1252": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "win1252": "windows1252", "cp1252": "windows1252", "windows1253": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" }, "win1253": "windows1253", "cp1253": "windows1253", "windows1254": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" }, "win1254": "windows1254", "cp1254": "windows1254", "windows1255": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" }, "win1255": "windows1255", "cp1255": "windows1255", "windows1256": { "type": "_sbcs", "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" }, "win1256": "windows1256", "cp1256": "windows1256", "windows1257": { "type": "_sbcs", "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" }, "win1257": "windows1257", "cp1257": "windows1257", "windows1258": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" }, "win1258": "windows1258", "cp1258": "windows1258", "iso88591": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "cp28591": "iso88591", "iso88592": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" }, "cp28592": "iso88592", "iso88593": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" }, "cp28593": "iso88593", "iso88594": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" }, "cp28594": "iso88594", "iso88595": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" }, "cp28595": "iso88595", "iso88596": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" }, "cp28596": "iso88596", "iso88597": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" }, "cp28597": "iso88597", "iso88598": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" }, "cp28598": "iso88598", "iso88599": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" }, "cp28599": "iso88599", "iso885910": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" }, "cp28600": "iso885910", "iso885911": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" }, "cp28601": "iso885911", "iso885913": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" }, "cp28603": "iso885913", "iso885914": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" }, "cp28604": "iso885914", "iso885915": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "cp28605": "iso885915", "iso885916": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Чš©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" }, "cp28606": "iso885916", "cp437": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm437": "cp437", "csibm437": "cp437", "cp737": { "type": "_sbcs", "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " }, "ibm737": "cp737", "csibm737": "cp737", "cp775": { "type": "_sbcs", "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " }, "ibm775": "cp775", "csibm775": "cp775", "cp850": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " }, "ibm850": "cp850", "csibm850": "cp850", "cp852": { "type": "_sbcs", "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " }, "ibm852": "cp852", "csibm852": "cp852", "cp855": { "type": "_sbcs", "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " }, "ibm855": "cp855", "csibm855": "cp855", "cp856": { "type": "_sbcs", "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " }, "ibm856": "cp856", "csibm856": "cp856", "cp857": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " }, "ibm857": "cp857", "csibm857": "cp857", "cp858": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " }, "ibm858": "cp858", "csibm858": "cp858", "cp860": { "type": "_sbcs", "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm860": "cp860", "csibm860": "cp860", "cp861": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm861": "cp861", "csibm861": "cp861", "cp862": { "type": "_sbcs", "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm862": "cp862", "csibm862": "cp862", "cp863": { "type": "_sbcs", "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm863": "cp863", "csibm863": "cp863", "cp864": { "type": "_sbcs", "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" }, "ibm864": "cp864", "csibm864": "cp864", "cp865": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm865": "cp865", "csibm865": "cp865", "cp866": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " }, "ibm866": "cp866", "csibm866": "cp866", "cp869": { "type": "_sbcs", "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " }, "ibm869": "cp869", "csibm869": "cp869", "cp922": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" }, "ibm922": "cp922", "csibm922": "cp922", "cp1046": { "type": "_sbcs", "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" }, "ibm1046": "cp1046", "csibm1046": "cp1046", "cp1124": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" }, "ibm1124": "cp1124", "csibm1124": "cp1124", "cp1125": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " }, "ibm1125": "cp1125", "csibm1125": "cp1125", "cp1129": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" }, "ibm1129": "cp1129", "csibm1129": "cp1129", "cp1133": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" }, "ibm1133": "cp1133", "csibm1133": "cp1133", "cp1161": { "type": "_sbcs", "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " }, "ibm1161": "cp1161", "csibm1161": "cp1161", "cp1162": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" }, "ibm1162": "cp1162", "csibm1162": "cp1162", "cp1163": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" }, "ibm1163": "cp1163", "csibm1163": "cp1163", "maccroatian": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" }, "maccyrillic": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" }, "macgreek": { "type": "_sbcs", "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" }, "maciceland": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "macroman": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "macromania": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "macthai": { "type": "_sbcs", "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" }, "macturkish": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" }, "macukraine": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" }, "koi8r": { "type": "_sbcs", "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "koi8u": { "type": "_sbcs", "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "koi8ru": { "type": "_sbcs", "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "koi8t": { "type": "_sbcs", "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "armscii8": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" }, "rk1048": { "type": "_sbcs", "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" }, "tcvn": { "type": "_sbcs", "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" }, "georgianacademy": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "georgianps": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "pt154": { "type": "_sbcs", "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" }, "viscii": { "type": "_sbcs", "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" }, "iso646cn": { "type": "_sbcs", "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" }, "iso646jp": { "type": "_sbcs", "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" }, "hproman8": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" }, "macintosh": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "ascii": { "type": "_sbcs", "chars": "��������������������������������������������������������������������������������������������������������������������������������" }, "tis620": { "type": "_sbcs", "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" } } /***/ }), /***/ 41080: /***/ ((module) => { "use strict"; // Manually added data to be used by sbcs codec in addition to generated one. module.exports = { // Not supported by iconv, not sure why. "10029": "maccenteuro", "maccenteuro": { "type": "_sbcs", "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" }, "808": "cp808", "ibm808": "cp808", "cp808": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " }, "mik": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, // Aliases of generated encodings. "ascii8bit": "ascii", "usascii": "ascii", "ansix34": "ascii", "ansix341968": "ascii", "ansix341986": "ascii", "csascii": "ascii", "cp367": "ascii", "ibm367": "ascii", "isoir6": "ascii", "iso646us": "ascii", "iso646irv": "ascii", "us": "ascii", "latin1": "iso88591", "latin2": "iso88592", "latin3": "iso88593", "latin4": "iso88594", "latin5": "iso88599", "latin6": "iso885910", "latin7": "iso885913", "latin8": "iso885914", "latin9": "iso885915", "latin10": "iso885916", "csisolatin1": "iso88591", "csisolatin2": "iso88592", "csisolatin3": "iso88593", "csisolatin4": "iso88594", "csisolatincyrillic": "iso88595", "csisolatinarabic": "iso88596", "csisolatingreek" : "iso88597", "csisolatinhebrew": "iso88598", "csisolatin5": "iso88599", "csisolatin6": "iso885910", "l1": "iso88591", "l2": "iso88592", "l3": "iso88593", "l4": "iso88594", "l5": "iso88599", "l6": "iso885910", "l7": "iso885913", "l8": "iso885914", "l9": "iso885915", "l10": "iso885916", "isoir14": "iso646jp", "isoir57": "iso646cn", "isoir100": "iso88591", "isoir101": "iso88592", "isoir109": "iso88593", "isoir110": "iso88594", "isoir144": "iso88595", "isoir127": "iso88596", "isoir126": "iso88597", "isoir138": "iso88598", "isoir148": "iso88599", "isoir157": "iso885910", "isoir166": "tis620", "isoir179": "iso885913", "isoir199": "iso885914", "isoir203": "iso885915", "isoir226": "iso885916", "cp819": "iso88591", "ibm819": "iso88591", "cyrillic": "iso88595", "arabic": "iso88596", "arabic8": "iso88596", "ecma114": "iso88596", "asmo708": "iso88596", "greek" : "iso88597", "greek8" : "iso88597", "ecma118" : "iso88597", "elot928" : "iso88597", "hebrew": "iso88598", "hebrew8": "iso88598", "turkish": "iso88599", "turkish8": "iso88599", "thai": "iso885911", "thai8": "iso885911", "celtic": "iso885914", "celtic8": "iso885914", "isoceltic": "iso885914", "tis6200": "tis620", "tis62025291": "tis620", "tis62025330": "tis620", "10000": "macroman", "10006": "macgreek", "10007": "maccyrillic", "10079": "maciceland", "10081": "macturkish", "cspc8codepage437": "cp437", "cspc775baltic": "cp775", "cspc850multilingual": "cp850", "cspcp852": "cp852", "cspc862latinhebrew": "cp862", "cpgr": "cp869", "msee": "cp1250", "mscyrl": "cp1251", "msansi": "cp1252", "msgreek": "cp1253", "msturk": "cp1254", "mshebr": "cp1255", "msarab": "cp1256", "winbaltrim": "cp1257", "cp20866": "koi8r", "20866": "koi8r", "ibm878": "koi8r", "cskoi8r": "koi8r", "cp21866": "koi8u", "21866": "koi8u", "ibm1168": "koi8u", "strk10482002": "rk1048", "tcvn5712": "tcvn", "tcvn57121": "tcvn", "gb198880": "iso646cn", "cn": "iso646cn", "csiso14jisc6220ro": "iso646jp", "jisc62201969ro": "iso646jp", "jp": "iso646jp", "cshproman8": "hproman8", "r8": "hproman8", "roman8": "hproman8", "xroman8": "hproman8", "ibm1051": "hproman8", "mac": "macintosh", "csmacintosh": "macintosh", }; /***/ }), /***/ 11155: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(15118).Buffer; // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js // == UTF16-BE codec. ========================================================== exports.utf16be = Utf16BECodec; function Utf16BECodec() { } Utf16BECodec.prototype.encoder = Utf16BEEncoder; Utf16BECodec.prototype.decoder = Utf16BEDecoder; Utf16BECodec.prototype.bomAware = true; // -- Encoding function Utf16BEEncoder() { } Utf16BEEncoder.prototype.write = function(str) { var buf = Buffer.from(str, 'ucs2'); for (var i = 0; i < buf.length; i += 2) { var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; } return buf; } Utf16BEEncoder.prototype.end = function() { } // -- Decoding function Utf16BEDecoder() { this.overflowByte = -1; } Utf16BEDecoder.prototype.write = function(buf) { if (buf.length == 0) return ''; var buf2 = Buffer.alloc(buf.length + 1), i = 0, j = 0; if (this.overflowByte !== -1) { buf2[0] = buf[0]; buf2[1] = this.overflowByte; i = 1; j = 2; } for (; i < buf.length-1; i += 2, j+= 2) { buf2[j] = buf[i+1]; buf2[j+1] = buf[i]; } this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; return buf2.slice(0, j).toString('ucs2'); } Utf16BEDecoder.prototype.end = function() { } // == UTF-16 codec ============================================================= // Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. // Defaults to UTF-16LE, as it's prevalent and default in Node. // http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le // Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); // Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). exports.utf16 = Utf16Codec; function Utf16Codec(codecOptions, iconv) { this.iconv = iconv; } Utf16Codec.prototype.encoder = Utf16Encoder; Utf16Codec.prototype.decoder = Utf16Decoder; // -- Encoding (pass-through) function Utf16Encoder(options, codec) { options = options || {}; if (options.addBOM === undefined) options.addBOM = true; this.encoder = codec.iconv.getEncoder('utf-16le', options); } Utf16Encoder.prototype.write = function(str) { return this.encoder.write(str); } Utf16Encoder.prototype.end = function() { return this.encoder.end(); } // -- Decoding function Utf16Decoder(options, codec) { this.decoder = null; this.initialBytes = []; this.initialBytesLen = 0; this.options = options || {}; this.iconv = codec.iconv; } Utf16Decoder.prototype.write = function(buf) { if (!this.decoder) { // Codec is not chosen yet. Accumulate initial bytes. this.initialBytes.push(buf); this.initialBytesLen += buf.length; if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) return ''; // We have enough bytes -> detect endianness. var buf = Buffer.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); this.initialBytes.length = this.initialBytesLen = 0; } return this.decoder.write(buf); } Utf16Decoder.prototype.end = function() { if (!this.decoder) { var buf = Buffer.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); var res = this.decoder.write(buf), trail = this.decoder.end(); return trail ? (res + trail) : res; } return this.decoder.end(); } function detectEncoding(buf, defaultEncoding) { var enc = defaultEncoding || 'utf-16le'; if (buf.length >= 2) { // Check BOM. if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM enc = 'utf-16be'; else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM enc = 'utf-16le'; else { // No BOM found. Try to deduce encoding from initial content. // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. // So, we count ASCII as if it was LE or BE, and decide from that. var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. for (var i = 0; i < _len; i += 2) { if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; } if (asciiCharsBE > asciiCharsLE) enc = 'utf-16be'; else if (asciiCharsBE < asciiCharsLE) enc = 'utf-16le'; } } return enc; } /***/ }), /***/ 51644: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(15118).Buffer; // UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 // See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 exports.utf7 = Utf7Codec; exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 function Utf7Codec(codecOptions, iconv) { this.iconv = iconv; }; Utf7Codec.prototype.encoder = Utf7Encoder; Utf7Codec.prototype.decoder = Utf7Decoder; Utf7Codec.prototype.bomAware = true; // -- Encoding var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; function Utf7Encoder(options, codec) { this.iconv = codec.iconv; } Utf7Encoder.prototype.write = function(str) { // Naive implementation. // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". return Buffer.from(str.replace(nonDirectChars, function(chunk) { return "+" + (chunk === '+' ? '' : this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + "-"; }.bind(this))); } Utf7Encoder.prototype.end = function() { } // -- Decoding function Utf7Decoder(options, codec) { this.iconv = codec.iconv; this.inBase64 = false; this.base64Accum = ''; } var base64Regex = /[A-Za-z0-9\/+]/; var base64Chars = []; for (var i = 0; i < 256; i++) base64Chars[i] = base64Regex.test(String.fromCharCode(i)); var plusChar = '+'.charCodeAt(0), minusChar = '-'.charCodeAt(0), andChar = '&'.charCodeAt(0); Utf7Decoder.prototype.write = function(buf) { var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; // The decoder is more involved as we must handle chunks in stream. for (var i = 0; i < buf.length; i++) { if (!inBase64) { // We're in direct mode. // Write direct chars until '+' if (buf[i] == plusChar) { res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. lastI = i+1; inBase64 = true; } } else { // We decode base64. if (!base64Chars[buf[i]]) { // Base64 ended. if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" res += "+"; } else { var b64str = base64Accum + buf.slice(lastI, i).toString(); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } if (buf[i] != minusChar) // Minus is absorbed after base64. i--; lastI = i+1; inBase64 = false; base64Accum = ''; } } } if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { var b64str = base64Accum + buf.slice(lastI).toString(); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. b64str = b64str.slice(0, canBeDecoded); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } this.inBase64 = inBase64; this.base64Accum = base64Accum; return res; } Utf7Decoder.prototype.end = function() { var res = ""; if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); this.inBase64 = false; this.base64Accum = ''; return res; } // UTF-7-IMAP codec. // RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) // Differences: // * Base64 part is started by "&" instead of "+" // * Direct characters are 0x20-0x7E, except "&" (0x26) // * In Base64, "," is used instead of "/" // * Base64 must not be used to represent direct characters. // * No implicit shift back from Base64 (should always end with '-') // * String must end in non-shifted position. // * "-&" while in base64 is not allowed. exports.utf7imap = Utf7IMAPCodec; function Utf7IMAPCodec(codecOptions, iconv) { this.iconv = iconv; }; Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; Utf7IMAPCodec.prototype.bomAware = true; // -- Encoding function Utf7IMAPEncoder(options, codec) { this.iconv = codec.iconv; this.inBase64 = false; this.base64Accum = Buffer.alloc(6); this.base64AccumIdx = 0; } Utf7IMAPEncoder.prototype.write = function(str) { var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; for (var i = 0; i < str.length; i++) { var uChar = str.charCodeAt(i); if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. if (inBase64) { if (base64AccumIdx > 0) { bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); base64AccumIdx = 0; } buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. inBase64 = false; } if (!inBase64) { buf[bufIdx++] = uChar; // Write direct character if (uChar === andChar) // Ampersand -> '&-' buf[bufIdx++] = minusChar; } } else { // Non-direct character if (!inBase64) { buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. inBase64 = true; } if (inBase64) { base64Accum[base64AccumIdx++] = uChar >> 8; base64Accum[base64AccumIdx++] = uChar & 0xFF; if (base64AccumIdx == base64Accum.length) { bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); base64AccumIdx = 0; } } } } this.inBase64 = inBase64; this.base64AccumIdx = base64AccumIdx; return buf.slice(0, bufIdx); } Utf7IMAPEncoder.prototype.end = function() { var buf = Buffer.alloc(10), bufIdx = 0; if (this.inBase64) { if (this.base64AccumIdx > 0) { bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); this.base64AccumIdx = 0; } buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. this.inBase64 = false; } return buf.slice(0, bufIdx); } // -- Decoding function Utf7IMAPDecoder(options, codec) { this.iconv = codec.iconv; this.inBase64 = false; this.base64Accum = ''; } var base64IMAPChars = base64Chars.slice(); base64IMAPChars[','.charCodeAt(0)] = true; Utf7IMAPDecoder.prototype.write = function(buf) { var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; // The decoder is more involved as we must handle chunks in stream. // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). for (var i = 0; i < buf.length; i++) { if (!inBase64) { // We're in direct mode. // Write direct chars until '&' if (buf[i] == andChar) { res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. lastI = i+1; inBase64 = true; } } else { // We decode base64. if (!base64IMAPChars[buf[i]]) { // Base64 ended. if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" res += "&"; } else { var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } if (buf[i] != minusChar) // Minus may be absorbed after base64. i--; lastI = i+1; inBase64 = false; base64Accum = ''; } } } if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. b64str = b64str.slice(0, canBeDecoded); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } this.inBase64 = inBase64; this.base64Accum = base64Accum; return res; } Utf7IMAPDecoder.prototype.end = function() { var res = ""; if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); this.inBase64 = false; this.base64Accum = ''; return res; } /***/ }), /***/ 67961: /***/ ((__unused_webpack_module, exports) => { "use strict"; var BOMChar = '\uFEFF'; exports.PrependBOM = PrependBOMWrapper function PrependBOMWrapper(encoder, options) { this.encoder = encoder; this.addBOM = true; } PrependBOMWrapper.prototype.write = function(str) { if (this.addBOM) { str = BOMChar + str; this.addBOM = false; } return this.encoder.write(str); } PrependBOMWrapper.prototype.end = function() { return this.encoder.end(); } //------------------------------------------------------------------------------ exports.StripBOM = StripBOMWrapper; function StripBOMWrapper(decoder, options) { this.decoder = decoder; this.pass = false; this.options = options || {}; } StripBOMWrapper.prototype.write = function(buf) { var res = this.decoder.write(buf); if (this.pass || !res) return res; if (res[0] === BOMChar) { res = res.slice(1); if (typeof this.options.stripBOM === 'function') this.options.stripBOM(); } this.pass = true; return res; } StripBOMWrapper.prototype.end = function() { return this.decoder.end(); } /***/ }), /***/ 30393: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(64293).Buffer; // Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer // == Extend Node primitives to use iconv-lite ================================= module.exports = function (iconv) { var original = undefined; // Place to keep original methods. // Node authors rewrote Buffer internals to make it compatible with // Uint8Array and we cannot patch key functions since then. // Note: this does use older Buffer API on a purpose iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array); iconv.extendNodeEncodings = function extendNodeEncodings() { if (original) return; original = {}; if (!iconv.supportsNodeEncodingsExtension) { console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); return; } var nodeNativeEncodings = { 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, }; Buffer.isNativeEncoding = function(enc) { return enc && nodeNativeEncodings[enc.toLowerCase()]; } // -- SlowBuffer ----------------------------------------------------------- var SlowBuffer = __webpack_require__(64293).SlowBuffer; original.SlowBufferToString = SlowBuffer.prototype.toString; SlowBuffer.prototype.toString = function(encoding, start, end) { encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferToString.call(this, encoding, start, end); // Otherwise, use our decoding method. if (typeof start == 'undefined') start = 0; if (typeof end == 'undefined') end = this.length; return iconv.decode(this.slice(start, end), encoding); } original.SlowBufferWrite = SlowBuffer.prototype.write; SlowBuffer.prototype.write = function(string, offset, length, encoding) { // Support both (string, offset, length, encoding) // and the legacy (string, encoding, offset, length) if (isFinite(offset)) { if (!isFinite(length)) { encoding = length; length = undefined; } } else { // legacy var swap = encoding; encoding = offset; offset = length; length = swap; } offset = +offset || 0; var remaining = this.length - offset; if (!length) { length = remaining; } else { length = +length; if (length > remaining) { length = remaining; } } encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferWrite.call(this, string, offset, length, encoding); if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError('attempt to write beyond buffer bounds'); // Otherwise, use our encoding method. var buf = iconv.encode(string, encoding); if (buf.length < length) length = buf.length; buf.copy(this, offset, 0, length); return length; } // -- Buffer --------------------------------------------------------------- original.BufferIsEncoding = Buffer.isEncoding; Buffer.isEncoding = function(encoding) { return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); } original.BufferByteLength = Buffer.byteLength; Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.BufferByteLength.call(this, str, encoding); // Slow, I know, but we don't have a better way yet. return iconv.encode(str, encoding).length; } original.BufferToString = Buffer.prototype.toString; Buffer.prototype.toString = function(encoding, start, end) { encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.BufferToString.call(this, encoding, start, end); // Otherwise, use our decoding method. if (typeof start == 'undefined') start = 0; if (typeof end == 'undefined') end = this.length; return iconv.decode(this.slice(start, end), encoding); } original.BufferWrite = Buffer.prototype.write; Buffer.prototype.write = function(string, offset, length, encoding) { var _offset = offset, _length = length, _encoding = encoding; // Support both (string, offset, length, encoding) // and the legacy (string, encoding, offset, length) if (isFinite(offset)) { if (!isFinite(length)) { encoding = length; length = undefined; } } else { // legacy var swap = encoding; encoding = offset; offset = length; length = swap; } encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.BufferWrite.call(this, string, _offset, _length, _encoding); offset = +offset || 0; var remaining = this.length - offset; if (!length) { length = remaining; } else { length = +length; if (length > remaining) { length = remaining; } } if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError('attempt to write beyond buffer bounds'); // Otherwise, use our encoding method. var buf = iconv.encode(string, encoding); if (buf.length < length) length = buf.length; buf.copy(this, offset, 0, length); return length; // TODO: Set _charsWritten. } // -- Readable ------------------------------------------------------------- if (iconv.supportsStreams) { var Readable = __webpack_require__(92413).Readable; original.ReadableSetEncoding = Readable.prototype.setEncoding; Readable.prototype.setEncoding = function setEncoding(enc, options) { // Use our own decoder, it has the same interface. // We cannot use original function as it doesn't handle BOM-s. this._readableState.decoder = iconv.getDecoder(enc, options); this._readableState.encoding = enc; } Readable.prototype.collect = iconv._collect; } } // Remove iconv-lite Node primitive extensions. iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { if (!iconv.supportsNodeEncodingsExtension) return; if (!original) throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") delete Buffer.isNativeEncoding; var SlowBuffer = __webpack_require__(64293).SlowBuffer; SlowBuffer.prototype.toString = original.SlowBufferToString; SlowBuffer.prototype.write = original.SlowBufferWrite; Buffer.isEncoding = original.BufferIsEncoding; Buffer.byteLength = original.BufferByteLength; Buffer.prototype.toString = original.BufferToString; Buffer.prototype.write = original.BufferWrite; if (iconv.supportsStreams) { var Readable = __webpack_require__(92413).Readable; Readable.prototype.setEncoding = original.ReadableSetEncoding; delete Readable.prototype.collect; } original = undefined; } } /***/ }), /***/ 19032: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // Some environments don't have global Buffer (e.g. React Native). // Solution would be installing npm modules "buffer" and "stream" explicitly. var Buffer = __webpack_require__(15118).Buffer; var bomHandling = __webpack_require__(67961), iconv = module.exports; // All codecs and aliases are kept here, keyed by encoding name/alias. // They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. iconv.encodings = null; // Characters emitted in case of error. iconv.defaultCharUnicode = '�'; iconv.defaultCharSingleByte = '?'; // Public API. iconv.encode = function encode(str, encoding, options) { str = "" + (str || ""); // Ensure string. var encoder = iconv.getEncoder(encoding, options); var res = encoder.write(str); var trail = encoder.end(); return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; } iconv.decode = function decode(buf, encoding, options) { if (typeof buf === 'string') { if (!iconv.skipDecodeWarning) { console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); iconv.skipDecodeWarning = true; } buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. } var decoder = iconv.getDecoder(encoding, options); var res = decoder.write(buf); var trail = decoder.end(); return trail ? (res + trail) : res; } iconv.encodingExists = function encodingExists(enc) { try { iconv.getCodec(enc); return true; } catch (e) { return false; } } // Legacy aliases to convert functions iconv.toEncoding = iconv.encode; iconv.fromEncoding = iconv.decode; // Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. iconv._codecDataCache = {}; iconv.getCodec = function getCodec(encoding) { if (!iconv.encodings) iconv.encodings = __webpack_require__(82733); // Lazy load all encoding definitions. // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. var enc = iconv._canonicalizeEncoding(encoding); // Traverse iconv.encodings to find actual codec. var codecOptions = {}; while (true) { var codec = iconv._codecDataCache[enc]; if (codec) return codec; var codecDef = iconv.encodings[enc]; switch (typeof codecDef) { case "string": // Direct alias to other encoding. enc = codecDef; break; case "object": // Alias with options. Can be layered. for (var key in codecDef) codecOptions[key] = codecDef[key]; if (!codecOptions.encodingName) codecOptions.encodingName = enc; enc = codecDef.type; break; case "function": // Codec itself. if (!codecOptions.encodingName) codecOptions.encodingName = enc; // The codec function must load all tables and return object with .encoder and .decoder methods. // It'll be called only once (for each different options object). codec = new codecDef(codecOptions, iconv); iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. return codec; default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); } } } iconv._canonicalizeEncoding = function(encoding) { // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); } iconv.getEncoder = function getEncoder(encoding, options) { var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec); if (codec.bomAware && options && options.addBOM) encoder = new bomHandling.PrependBOM(encoder, options); return encoder; } iconv.getDecoder = function getDecoder(encoding, options) { var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec); if (codec.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options); return decoder; } // Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; if (nodeVer) { // Load streaming support in Node v0.10+ var nodeVerArr = nodeVer.split(".").map(Number); if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { __webpack_require__(76409)(iconv); } // Load Node primitive extensions. __webpack_require__(30393)(iconv); } if (false) {} /***/ }), /***/ 76409: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(64293).Buffer, Transform = __webpack_require__(92413).Transform; // == Exports ================================================================== module.exports = function(iconv) { // Additional Public API. iconv.encodeStream = function encodeStream(encoding, options) { return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); } iconv.decodeStream = function decodeStream(encoding, options) { return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); } iconv.supportsStreams = true; // Not published yet. iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; iconv._collect = IconvLiteDecoderStream.prototype.collect; }; // == Encoder stream ======================================================= function IconvLiteEncoderStream(conv, options) { this.conv = conv; options = options || {}; options.decodeStrings = false; // We accept only strings, so we don't need to decode them. Transform.call(this, options); } IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteEncoderStream } }); IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { if (typeof chunk != 'string') return done(new Error("Iconv encoding stream needs strings as its input.")); try { var res = this.conv.write(chunk); if (res && res.length) this.push(res); done(); } catch (e) { done(e); } } IconvLiteEncoderStream.prototype._flush = function(done) { try { var res = this.conv.end(); if (res && res.length) this.push(res); done(); } catch (e) { done(e); } } IconvLiteEncoderStream.prototype.collect = function(cb) { var chunks = []; this.on('error', cb); this.on('data', function(chunk) { chunks.push(chunk); }); this.on('end', function() { cb(null, Buffer.concat(chunks)); }); return this; } // == Decoder stream ======================================================= function IconvLiteDecoderStream(conv, options) { this.conv = conv; options = options || {}; options.encoding = this.encoding = 'utf8'; // We output strings. Transform.call(this, options); } IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteDecoderStream } }); IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { if (!Buffer.isBuffer(chunk)) return done(new Error("Iconv decoding stream needs buffers as its input.")); try { var res = this.conv.write(chunk); if (res && res.length) this.push(res, this.encoding); done(); } catch (e) { done(e); } } IconvLiteDecoderStream.prototype._flush = function(done) { try { var res = this.conv.end(); if (res && res.length) this.push(res, this.encoding); done(); } catch (e) { done(e); } } IconvLiteDecoderStream.prototype.collect = function(cb) { var res = ''; this.on('error', cb); this.on('data', function(chunk) { res += chunk; }); this.on('end', function() { cb(null, res); }); return this; } /***/ }), /***/ 98043: /***/ ((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)); }; /***/ }), /***/ 52492: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var wrappy = __webpack_require__(62940) var reqs = Object.create(null) var once = __webpack_require__(1223) 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 } /***/ }), /***/ 44124: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { try { var util = __webpack_require__(31669); /* istanbul ignore next */ if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ module.exports = __webpack_require__(8544); } /***/ }), /***/ 8544: /***/ ((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 } } } /***/ }), /***/ 42469: /***/ ((module) => { // Generated using `npm run build`. Do not edit. var regex = /^[a-z](?:[\.0-9_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*-(?:[\x2D\.0-9_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; var isPotentialCustomElementName = function(string) { return regex.test(string); }; module.exports = isPotentialCustomElementName; /***/ }), /***/ 10657: /***/ ((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)] } /***/ }), /***/ 97126: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var fs = __webpack_require__(35747) var core if (process.platform === 'win32' || global.TESTING_WINDOWS) { core = __webpack_require__(42001) } else { core = __webpack_require__(9728) } 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 } } } /***/ }), /***/ 9728: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = isexe isexe.sync = sync var fs = __webpack_require__(35747) 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 } /***/ }), /***/ 42001: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = isexe isexe.sync = sync var fs = __webpack_require__(35747) 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) } /***/ }), /***/ 64713: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__(88867); /***/ }), /***/ 83362: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var stream = __webpack_require__(92413) 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 /***/ }), /***/ 87783: /***/ ((__unused_webpack_module, exports) => { (function(exports) { "use strict"; function isArray(obj) { if (obj !== null) { return Object.prototype.toString.call(obj) === "[object Array]"; } else { return false; } } function isObject(obj) { if (obj !== null) { return Object.prototype.toString.call(obj) === "[object Object]"; } else { return false; } } function strictDeepEqual(first, second) { // Check the scalar case first. if (first === second) { return true; } // Check if they are the same type. var firstType = Object.prototype.toString.call(first); if (firstType !== Object.prototype.toString.call(second)) { return false; } // We know that first and second have the same type so we can just check the // first type from now on. if (isArray(first) === true) { // Short circuit if they're not the same length; if (first.length !== second.length) { return false; } for (var i = 0; i < first.length; i++) { if (strictDeepEqual(first[i], second[i]) === false) { return false; } } return true; } if (isObject(first) === true) { // An object is equal if it has the same key/value pairs. var keysSeen = {}; for (var key in first) { if (hasOwnProperty.call(first, key)) { if (strictDeepEqual(first[key], second[key]) === false) { return false; } keysSeen[key] = true; } } // Now check that there aren't any keys in second that weren't // in first. for (var key2 in second) { if (hasOwnProperty.call(second, key2)) { if (keysSeen[key2] !== true) { return false; } } } return true; } return false; } function isFalse(obj) { // From the spec: // A false value corresponds to the following values: // Empty list // Empty object // Empty string // False boolean // null value // First check the scalar values. if (obj === "" || obj === false || obj === null) { return true; } else if (isArray(obj) && obj.length === 0) { // Check for an empty array. return true; } else if (isObject(obj)) { // Check for an empty object. for (var key in obj) { // If there are any keys, then // the object is not empty so the object // is not false. if (obj.hasOwnProperty(key)) { return false; } } return true; } else { return false; } } function objValues(obj) { var keys = Object.keys(obj); var values = []; for (var i = 0; i < keys.length; i++) { values.push(obj[keys[i]]); } return values; } function merge(a, b) { var merged = {}; for (var key in a) { merged[key] = a[key]; } for (var key2 in b) { merged[key2] = b[key2]; } return merged; } var trimLeft; if (typeof String.prototype.trimLeft === "function") { trimLeft = function(str) { return str.trimLeft(); }; } else { trimLeft = function(str) { return str.match(/^\s*(.*)/)[1]; }; } // Type constants used to define functions. var TYPE_NUMBER = 0; var TYPE_ANY = 1; var TYPE_STRING = 2; var TYPE_ARRAY = 3; var TYPE_OBJECT = 4; var TYPE_BOOLEAN = 5; var TYPE_EXPREF = 6; var TYPE_NULL = 7; var TYPE_ARRAY_NUMBER = 8; var TYPE_ARRAY_STRING = 9; var TOK_EOF = "EOF"; var TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier"; var TOK_QUOTEDIDENTIFIER = "QuotedIdentifier"; var TOK_RBRACKET = "Rbracket"; var TOK_RPAREN = "Rparen"; var TOK_COMMA = "Comma"; var TOK_COLON = "Colon"; var TOK_RBRACE = "Rbrace"; var TOK_NUMBER = "Number"; var TOK_CURRENT = "Current"; var TOK_EXPREF = "Expref"; var TOK_PIPE = "Pipe"; var TOK_OR = "Or"; var TOK_AND = "And"; var TOK_EQ = "EQ"; var TOK_GT = "GT"; var TOK_LT = "LT"; var TOK_GTE = "GTE"; var TOK_LTE = "LTE"; var TOK_NE = "NE"; var TOK_FLATTEN = "Flatten"; var TOK_STAR = "Star"; var TOK_FILTER = "Filter"; var TOK_DOT = "Dot"; var TOK_NOT = "Not"; var TOK_LBRACE = "Lbrace"; var TOK_LBRACKET = "Lbracket"; var TOK_LPAREN= "Lparen"; var TOK_LITERAL= "Literal"; // The "&", "[", "<", ">" tokens // are not in basicToken because // there are two token variants // ("&&", "[?", "<=", ">="). This is specially handled // below. var basicTokens = { ".": TOK_DOT, "*": TOK_STAR, ",": TOK_COMMA, ":": TOK_COLON, "{": TOK_LBRACE, "}": TOK_RBRACE, "]": TOK_RBRACKET, "(": TOK_LPAREN, ")": TOK_RPAREN, "@": TOK_CURRENT }; var operatorStartToken = { "<": true, ">": true, "=": true, "!": true }; var skipChars = { " ": true, "\t": true, "\n": true }; function isAlpha(ch) { return (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z") || ch === "_"; } function isNum(ch) { return (ch >= "0" && ch <= "9") || ch === "-"; } function isAlphaNum(ch) { return (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z") || (ch >= "0" && ch <= "9") || ch === "_"; } function Lexer() { } Lexer.prototype = { tokenize: function(stream) { var tokens = []; this._current = 0; var start; var identifier; var token; while (this._current < stream.length) { if (isAlpha(stream[this._current])) { start = this._current; identifier = this._consumeUnquotedIdentifier(stream); tokens.push({type: TOK_UNQUOTEDIDENTIFIER, value: identifier, start: start}); } else if (basicTokens[stream[this._current]] !== undefined) { tokens.push({type: basicTokens[stream[this._current]], value: stream[this._current], start: this._current}); this._current++; } else if (isNum(stream[this._current])) { token = this._consumeNumber(stream); tokens.push(token); } else if (stream[this._current] === "[") { // No need to increment this._current. This happens // in _consumeLBracket token = this._consumeLBracket(stream); tokens.push(token); } else if (stream[this._current] === "\"") { start = this._current; identifier = this._consumeQuotedIdentifier(stream); tokens.push({type: TOK_QUOTEDIDENTIFIER, value: identifier, start: start}); } else if (stream[this._current] === "'") { start = this._current; identifier = this._consumeRawStringLiteral(stream); tokens.push({type: TOK_LITERAL, value: identifier, start: start}); } else if (stream[this._current] === "`") { start = this._current; var literal = this._consumeLiteral(stream); tokens.push({type: TOK_LITERAL, value: literal, start: start}); } else if (operatorStartToken[stream[this._current]] !== undefined) { tokens.push(this._consumeOperator(stream)); } else if (skipChars[stream[this._current]] !== undefined) { // Ignore whitespace. this._current++; } else if (stream[this._current] === "&") { start = this._current; this._current++; if (stream[this._current] === "&") { this._current++; tokens.push({type: TOK_AND, value: "&&", start: start}); } else { tokens.push({type: TOK_EXPREF, value: "&", start: start}); } } else if (stream[this._current] === "|") { start = this._current; this._current++; if (stream[this._current] === "|") { this._current++; tokens.push({type: TOK_OR, value: "||", start: start}); } else { tokens.push({type: TOK_PIPE, value: "|", start: start}); } } else { var error = new Error("Unknown character:" + stream[this._current]); error.name = "LexerError"; throw error; } } return tokens; }, _consumeUnquotedIdentifier: function(stream) { var start = this._current; this._current++; while (this._current < stream.length && isAlphaNum(stream[this._current])) { this._current++; } return stream.slice(start, this._current); }, _consumeQuotedIdentifier: function(stream) { var start = this._current; this._current++; var maxLength = stream.length; while (stream[this._current] !== "\"" && this._current < maxLength) { // You can escape a double quote and you can escape an escape. var current = this._current; if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === "\"")) { current += 2; } else { current++; } this._current = current; } this._current++; return JSON.parse(stream.slice(start, this._current)); }, _consumeRawStringLiteral: function(stream) { var start = this._current; this._current++; var maxLength = stream.length; while (stream[this._current] !== "'" && this._current < maxLength) { // You can escape a single quote and you can escape an escape. var current = this._current; if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === "'")) { current += 2; } else { current++; } this._current = current; } this._current++; var literal = stream.slice(start + 1, this._current - 1); return literal.replace("\\'", "'"); }, _consumeNumber: function(stream) { var start = this._current; this._current++; var maxLength = stream.length; while (isNum(stream[this._current]) && this._current < maxLength) { this._current++; } var value = parseInt(stream.slice(start, this._current)); return {type: TOK_NUMBER, value: value, start: start}; }, _consumeLBracket: function(stream) { var start = this._current; this._current++; if (stream[this._current] === "?") { this._current++; return {type: TOK_FILTER, value: "[?", start: start}; } else if (stream[this._current] === "]") { this._current++; return {type: TOK_FLATTEN, value: "[]", start: start}; } else { return {type: TOK_LBRACKET, value: "[", start: start}; } }, _consumeOperator: function(stream) { var start = this._current; var startingChar = stream[start]; this._current++; if (startingChar === "!") { if (stream[this._current] === "=") { this._current++; return {type: TOK_NE, value: "!=", start: start}; } else { return {type: TOK_NOT, value: "!", start: start}; } } else if (startingChar === "<") { if (stream[this._current] === "=") { this._current++; return {type: TOK_LTE, value: "<=", start: start}; } else { return {type: TOK_LT, value: "<", start: start}; } } else if (startingChar === ">") { if (stream[this._current] === "=") { this._current++; return {type: TOK_GTE, value: ">=", start: start}; } else { return {type: TOK_GT, value: ">", start: start}; } } else if (startingChar === "=") { if (stream[this._current] === "=") { this._current++; return {type: TOK_EQ, value: "==", start: start}; } } }, _consumeLiteral: function(stream) { this._current++; var start = this._current; var maxLength = stream.length; var literal; while(stream[this._current] !== "`" && this._current < maxLength) { // You can escape a literal char or you can escape the escape. var current = this._current; if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === "`")) { current += 2; } else { current++; } this._current = current; } var literalString = trimLeft(stream.slice(start, this._current)); literalString = literalString.replace("\\`", "`"); if (this._looksLikeJSON(literalString)) { literal = JSON.parse(literalString); } else { // Try to JSON parse it as "" literal = JSON.parse("\"" + literalString + "\""); } // +1 gets us to the ending "`", +1 to move on to the next char. this._current++; return literal; }, _looksLikeJSON: function(literalString) { var startingChars = "[{\""; var jsonLiterals = ["true", "false", "null"]; var numberLooking = "-0123456789"; if (literalString === "") { return false; } else if (startingChars.indexOf(literalString[0]) >= 0) { return true; } else if (jsonLiterals.indexOf(literalString) >= 0) { return true; } else if (numberLooking.indexOf(literalString[0]) >= 0) { try { JSON.parse(literalString); return true; } catch (ex) { return false; } } else { return false; } } }; var bindingPower = {}; bindingPower[TOK_EOF] = 0; bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0; bindingPower[TOK_QUOTEDIDENTIFIER] = 0; bindingPower[TOK_RBRACKET] = 0; bindingPower[TOK_RPAREN] = 0; bindingPower[TOK_COMMA] = 0; bindingPower[TOK_RBRACE] = 0; bindingPower[TOK_NUMBER] = 0; bindingPower[TOK_CURRENT] = 0; bindingPower[TOK_EXPREF] = 0; bindingPower[TOK_PIPE] = 1; bindingPower[TOK_OR] = 2; bindingPower[TOK_AND] = 3; bindingPower[TOK_EQ] = 5; bindingPower[TOK_GT] = 5; bindingPower[TOK_LT] = 5; bindingPower[TOK_GTE] = 5; bindingPower[TOK_LTE] = 5; bindingPower[TOK_NE] = 5; bindingPower[TOK_FLATTEN] = 9; bindingPower[TOK_STAR] = 20; bindingPower[TOK_FILTER] = 21; bindingPower[TOK_DOT] = 40; bindingPower[TOK_NOT] = 45; bindingPower[TOK_LBRACE] = 50; bindingPower[TOK_LBRACKET] = 55; bindingPower[TOK_LPAREN] = 60; function Parser() { } Parser.prototype = { parse: function(expression) { this._loadTokens(expression); this.index = 0; var ast = this.expression(0); if (this._lookahead(0) !== TOK_EOF) { var t = this._lookaheadToken(0); var error = new Error( "Unexpected token type: " + t.type + ", value: " + t.value); error.name = "ParserError"; throw error; } return ast; }, _loadTokens: function(expression) { var lexer = new Lexer(); var tokens = lexer.tokenize(expression); tokens.push({type: TOK_EOF, value: "", start: expression.length}); this.tokens = tokens; }, expression: function(rbp) { var leftToken = this._lookaheadToken(0); this._advance(); var left = this.nud(leftToken); var currentToken = this._lookahead(0); while (rbp < bindingPower[currentToken]) { this._advance(); left = this.led(currentToken, left); currentToken = this._lookahead(0); } return left; }, _lookahead: function(number) { return this.tokens[this.index + number].type; }, _lookaheadToken: function(number) { return this.tokens[this.index + number]; }, _advance: function() { this.index++; }, nud: function(token) { var left; var right; var expression; switch (token.type) { case TOK_LITERAL: return {type: "Literal", value: token.value}; case TOK_UNQUOTEDIDENTIFIER: return {type: "Field", name: token.value}; case TOK_QUOTEDIDENTIFIER: var node = {type: "Field", name: token.value}; if (this._lookahead(0) === TOK_LPAREN) { throw new Error("Quoted identifier not allowed for function names."); } else { return node; } break; case TOK_NOT: right = this.expression(bindingPower.Not); return {type: "NotExpression", children: [right]}; case TOK_STAR: left = {type: "Identity"}; right = null; if (this._lookahead(0) === TOK_RBRACKET) { // This can happen in a multiselect, // [a, b, *] right = {type: "Identity"}; } else { right = this._parseProjectionRHS(bindingPower.Star); } return {type: "ValueProjection", children: [left, right]}; case TOK_FILTER: return this.led(token.type, {type: "Identity"}); case TOK_LBRACE: return this._parseMultiselectHash(); case TOK_FLATTEN: left = {type: TOK_FLATTEN, children: [{type: "Identity"}]}; right = this._parseProjectionRHS(bindingPower.Flatten); return {type: "Projection", children: [left, right]}; case TOK_LBRACKET: if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) { right = this._parseIndexExpression(); return this._projectIfSlice({type: "Identity"}, right); } else if (this._lookahead(0) === TOK_STAR && this._lookahead(1) === TOK_RBRACKET) { this._advance(); this._advance(); right = this._parseProjectionRHS(bindingPower.Star); return {type: "Projection", children: [{type: "Identity"}, right]}; } else { return this._parseMultiselectList(); } break; case TOK_CURRENT: return {type: TOK_CURRENT}; case TOK_EXPREF: expression = this.expression(bindingPower.Expref); return {type: "ExpressionReference", children: [expression]}; case TOK_LPAREN: var args = []; while (this._lookahead(0) !== TOK_RPAREN) { if (this._lookahead(0) === TOK_CURRENT) { expression = {type: TOK_CURRENT}; this._advance(); } else { expression = this.expression(0); } args.push(expression); } this._match(TOK_RPAREN); return args[0]; default: this._errorToken(token); } }, led: function(tokenName, left) { var right; switch(tokenName) { case TOK_DOT: var rbp = bindingPower.Dot; if (this._lookahead(0) !== TOK_STAR) { right = this._parseDotRHS(rbp); return {type: "Subexpression", children: [left, right]}; } else { // Creating a projection. this._advance(); right = this._parseProjectionRHS(rbp); return {type: "ValueProjection", children: [left, right]}; } break; case TOK_PIPE: right = this.expression(bindingPower.Pipe); return {type: TOK_PIPE, children: [left, right]}; case TOK_OR: right = this.expression(bindingPower.Or); return {type: "OrExpression", children: [left, right]}; case TOK_AND: right = this.expression(bindingPower.And); return {type: "AndExpression", children: [left, right]}; case TOK_LPAREN: var name = left.name; var args = []; var expression, node; while (this._lookahead(0) !== TOK_RPAREN) { if (this._lookahead(0) === TOK_CURRENT) { expression = {type: TOK_CURRENT}; this._advance(); } else { expression = this.expression(0); } if (this._lookahead(0) === TOK_COMMA) { this._match(TOK_COMMA); } args.push(expression); } this._match(TOK_RPAREN); node = {type: "Function", name: name, children: args}; return node; case TOK_FILTER: var condition = this.expression(0); this._match(TOK_RBRACKET); if (this._lookahead(0) === TOK_FLATTEN) { right = {type: "Identity"}; } else { right = this._parseProjectionRHS(bindingPower.Filter); } return {type: "FilterProjection", children: [left, right, condition]}; case TOK_FLATTEN: var leftNode = {type: TOK_FLATTEN, children: [left]}; var rightNode = this._parseProjectionRHS(bindingPower.Flatten); return {type: "Projection", children: [leftNode, rightNode]}; case TOK_EQ: case TOK_NE: case TOK_GT: case TOK_GTE: case TOK_LT: case TOK_LTE: return this._parseComparator(left, tokenName); case TOK_LBRACKET: var token = this._lookaheadToken(0); if (token.type === TOK_NUMBER || token.type === TOK_COLON) { right = this._parseIndexExpression(); return this._projectIfSlice(left, right); } else { this._match(TOK_STAR); this._match(TOK_RBRACKET); right = this._parseProjectionRHS(bindingPower.Star); return {type: "Projection", children: [left, right]}; } break; default: this._errorToken(this._lookaheadToken(0)); } }, _match: function(tokenType) { if (this._lookahead(0) === tokenType) { this._advance(); } else { var t = this._lookaheadToken(0); var error = new Error("Expected " + tokenType + ", got: " + t.type); error.name = "ParserError"; throw error; } }, _errorToken: function(token) { var error = new Error("Invalid token (" + token.type + "): \"" + token.value + "\""); error.name = "ParserError"; throw error; }, _parseIndexExpression: function() { if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) { return this._parseSliceExpression(); } else { var node = { type: "Index", value: this._lookaheadToken(0).value}; this._advance(); this._match(TOK_RBRACKET); return node; } }, _projectIfSlice: function(left, right) { var indexExpr = {type: "IndexExpression", children: [left, right]}; if (right.type === "Slice") { return { type: "Projection", children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)] }; } else { return indexExpr; } }, _parseSliceExpression: function() { // [start:end:step] where each part is optional, as well as the last // colon. var parts = [null, null, null]; var index = 0; var currentToken = this._lookahead(0); while (currentToken !== TOK_RBRACKET && index < 3) { if (currentToken === TOK_COLON) { index++; this._advance(); } else if (currentToken === TOK_NUMBER) { parts[index] = this._lookaheadToken(0).value; this._advance(); } else { var t = this._lookahead(0); var error = new Error("Syntax error, unexpected token: " + t.value + "(" + t.type + ")"); error.name = "Parsererror"; throw error; } currentToken = this._lookahead(0); } this._match(TOK_RBRACKET); return { type: "Slice", children: parts }; }, _parseComparator: function(left, comparator) { var right = this.expression(bindingPower[comparator]); return {type: "Comparator", name: comparator, children: [left, right]}; }, _parseDotRHS: function(rbp) { var lookahead = this._lookahead(0); var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR]; if (exprTokens.indexOf(lookahead) >= 0) { return this.expression(rbp); } else if (lookahead === TOK_LBRACKET) { this._match(TOK_LBRACKET); return this._parseMultiselectList(); } else if (lookahead === TOK_LBRACE) { this._match(TOK_LBRACE); return this._parseMultiselectHash(); } }, _parseProjectionRHS: function(rbp) { var right; if (bindingPower[this._lookahead(0)] < 10) { right = {type: "Identity"}; } else if (this._lookahead(0) === TOK_LBRACKET) { right = this.expression(rbp); } else if (this._lookahead(0) === TOK_FILTER) { right = this.expression(rbp); } else if (this._lookahead(0) === TOK_DOT) { this._match(TOK_DOT); right = this._parseDotRHS(rbp); } else { var t = this._lookaheadToken(0); var error = new Error("Sytanx error, unexpected token: " + t.value + "(" + t.type + ")"); error.name = "ParserError"; throw error; } return right; }, _parseMultiselectList: function() { var expressions = []; while (this._lookahead(0) !== TOK_RBRACKET) { var expression = this.expression(0); expressions.push(expression); if (this._lookahead(0) === TOK_COMMA) { this._match(TOK_COMMA); if (this._lookahead(0) === TOK_RBRACKET) { throw new Error("Unexpected token Rbracket"); } } } this._match(TOK_RBRACKET); return {type: "MultiSelectList", children: expressions}; }, _parseMultiselectHash: function() { var pairs = []; var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER]; var keyToken, keyName, value, node; for (;;) { keyToken = this._lookaheadToken(0); if (identifierTypes.indexOf(keyToken.type) < 0) { throw new Error("Expecting an identifier token, got: " + keyToken.type); } keyName = keyToken.value; this._advance(); this._match(TOK_COLON); value = this.expression(0); node = {type: "KeyValuePair", name: keyName, value: value}; pairs.push(node); if (this._lookahead(0) === TOK_COMMA) { this._match(TOK_COMMA); } else if (this._lookahead(0) === TOK_RBRACE) { this._match(TOK_RBRACE); break; } } return {type: "MultiSelectHash", children: pairs}; } }; function TreeInterpreter(runtime) { this.runtime = runtime; } TreeInterpreter.prototype = { search: function(node, value) { return this.visit(node, value); }, visit: function(node, value) { var matched, current, result, first, second, field, left, right, collected, i; switch (node.type) { case "Field": if (value === null ) { return null; } else if (isObject(value)) { field = value[node.name]; if (field === undefined) { return null; } else { return field; } } else { return null; } break; case "Subexpression": result = this.visit(node.children[0], value); for (i = 1; i < node.children.length; i++) { result = this.visit(node.children[1], result); if (result === null) { return null; } } return result; case "IndexExpression": left = this.visit(node.children[0], value); right = this.visit(node.children[1], left); return right; case "Index": if (!isArray(value)) { return null; } var index = node.value; if (index < 0) { index = value.length + index; } result = value[index]; if (result === undefined) { result = null; } return result; case "Slice": if (!isArray(value)) { return null; } var sliceParams = node.children.slice(0); var computed = this.computeSliceParams(value.length, sliceParams); var start = computed[0]; var stop = computed[1]; var step = computed[2]; result = []; if (step > 0) { for (i = start; i < stop; i += step) { result.push(value[i]); } } else { for (i = start; i > stop; i += step) { result.push(value[i]); } } return result; case "Projection": // Evaluate left child. var base = this.visit(node.children[0], value); if (!isArray(base)) { return null; } collected = []; for (i = 0; i < base.length; i++) { current = this.visit(node.children[1], base[i]); if (current !== null) { collected.push(current); } } return collected; case "ValueProjection": // Evaluate left child. base = this.visit(node.children[0], value); if (!isObject(base)) { return null; } collected = []; var values = objValues(base); for (i = 0; i < values.length; i++) { current = this.visit(node.children[1], values[i]); if (current !== null) { collected.push(current); } } return collected; case "FilterProjection": base = this.visit(node.children[0], value); if (!isArray(base)) { return null; } var filtered = []; var finalResults = []; for (i = 0; i < base.length; i++) { matched = this.visit(node.children[2], base[i]); if (!isFalse(matched)) { filtered.push(base[i]); } } for (var j = 0; j < filtered.length; j++) { current = this.visit(node.children[1], filtered[j]); if (current !== null) { finalResults.push(current); } } return finalResults; case "Comparator": first = this.visit(node.children[0], value); second = this.visit(node.children[1], value); switch(node.name) { case TOK_EQ: result = strictDeepEqual(first, second); break; case TOK_NE: result = !strictDeepEqual(first, second); break; case TOK_GT: result = first > second; break; case TOK_GTE: result = first >= second; break; case TOK_LT: result = first < second; break; case TOK_LTE: result = first <= second; break; default: throw new Error("Unknown comparator: " + node.name); } return result; case TOK_FLATTEN: var original = this.visit(node.children[0], value); if (!isArray(original)) { return null; } var merged = []; for (i = 0; i < original.length; i++) { current = original[i]; if (isArray(current)) { merged.push.apply(merged, current); } else { merged.push(current); } } return merged; case "Identity": return value; case "MultiSelectList": if (value === null) { return null; } collected = []; for (i = 0; i < node.children.length; i++) { collected.push(this.visit(node.children[i], value)); } return collected; case "MultiSelectHash": if (value === null) { return null; } collected = {}; var child; for (i = 0; i < node.children.length; i++) { child = node.children[i]; collected[child.name] = this.visit(child.value, value); } return collected; case "OrExpression": matched = this.visit(node.children[0], value); if (isFalse(matched)) { matched = this.visit(node.children[1], value); } return matched; case "AndExpression": first = this.visit(node.children[0], value); if (isFalse(first) === true) { return first; } return this.visit(node.children[1], value); case "NotExpression": first = this.visit(node.children[0], value); return isFalse(first); case "Literal": return node.value; case TOK_PIPE: left = this.visit(node.children[0], value); return this.visit(node.children[1], left); case TOK_CURRENT: return value; case "Function": var resolvedArgs = []; for (i = 0; i < node.children.length; i++) { resolvedArgs.push(this.visit(node.children[i], value)); } return this.runtime.callFunction(node.name, resolvedArgs); case "ExpressionReference": var refNode = node.children[0]; // Tag the node with a specific attribute so the type // checker verify the type. refNode.jmespathType = TOK_EXPREF; return refNode; default: throw new Error("Unknown node type: " + node.type); } }, computeSliceParams: function(arrayLength, sliceParams) { var start = sliceParams[0]; var stop = sliceParams[1]; var step = sliceParams[2]; var computed = [null, null, null]; if (step === null) { step = 1; } else if (step === 0) { var error = new Error("Invalid slice, step cannot be 0"); error.name = "RuntimeError"; throw error; } var stepValueNegative = step < 0 ? true : false; if (start === null) { start = stepValueNegative ? arrayLength - 1 : 0; } else { start = this.capSliceRange(arrayLength, start, step); } if (stop === null) { stop = stepValueNegative ? -1 : arrayLength; } else { stop = this.capSliceRange(arrayLength, stop, step); } computed[0] = start; computed[1] = stop; computed[2] = step; return computed; }, capSliceRange: function(arrayLength, actualValue, step) { if (actualValue < 0) { actualValue += arrayLength; if (actualValue < 0) { actualValue = step < 0 ? -1 : 0; } } else if (actualValue >= arrayLength) { actualValue = step < 0 ? arrayLength - 1 : arrayLength; } return actualValue; } }; function Runtime(interpreter) { this._interpreter = interpreter; this.functionTable = { // name: [function, ] // The can be: // // { // args: [[type1, type2], [type1, type2]], // variadic: true|false // } // // Each arg in the arg list is a list of valid types // (if the function is overloaded and supports multiple // types. If the type is "any" then no type checking // occurs on the argument. Variadic is optional // and if not provided is assumed to be false. abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]}, avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]}, contains: { _func: this._functionContains, _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}, {types: [TYPE_ANY]}]}, "ends_with": { _func: this._functionEndsWith, _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]}, length: { _func: this._functionLength, _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]}, map: { _func: this._functionMap, _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]}, max: { _func: this._functionMax, _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, "merge": { _func: this._functionMerge, _signature: [{types: [TYPE_OBJECT], variadic: true}] }, "max_by": { _func: this._functionMaxBy, _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] }, sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, "starts_with": { _func: this._functionStartsWith, _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, min: { _func: this._functionMin, _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, "min_by": { _func: this._functionMinBy, _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] }, type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]}, keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]}, values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]}, sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]}, "sort_by": { _func: this._functionSortBy, _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] }, join: { _func: this._functionJoin, _signature: [ {types: [TYPE_STRING]}, {types: [TYPE_ARRAY_STRING]} ] }, reverse: { _func: this._functionReverse, _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]}, "to_array": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]}, "to_string": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]}, "to_number": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]}, "not_null": { _func: this._functionNotNull, _signature: [{types: [TYPE_ANY], variadic: true}] } }; } Runtime.prototype = { callFunction: function(name, resolvedArgs) { var functionEntry = this.functionTable[name]; if (functionEntry === undefined) { throw new Error("Unknown function: " + name + "()"); } this._validateArgs(name, resolvedArgs, functionEntry._signature); return functionEntry._func.call(this, resolvedArgs); }, _validateArgs: function(name, args, signature) { // Validating the args requires validating // the correct arity and the correct type of each arg. // If the last argument is declared as variadic, then we need // a minimum number of args to be required. Otherwise it has to // be an exact amount. var pluralized; if (signature[signature.length - 1].variadic) { if (args.length < signature.length) { pluralized = signature.length === 1 ? " argument" : " arguments"; throw new Error("ArgumentError: " + name + "() " + "takes at least" + signature.length + pluralized + " but received " + args.length); } } else if (args.length !== signature.length) { pluralized = signature.length === 1 ? " argument" : " arguments"; throw new Error("ArgumentError: " + name + "() " + "takes " + signature.length + pluralized + " but received " + args.length); } var currentSpec; var actualType; var typeMatched; for (var i = 0; i < signature.length; i++) { typeMatched = false; currentSpec = signature[i].types; actualType = this._getTypeName(args[i]); for (var j = 0; j < currentSpec.length; j++) { if (this._typeMatches(actualType, currentSpec[j], args[i])) { typeMatched = true; break; } } if (!typeMatched) { throw new Error("TypeError: " + name + "() " + "expected argument " + (i + 1) + " to be type " + currentSpec + " but received type " + actualType + " instead."); } } }, _typeMatches: function(actual, expected, argValue) { if (expected === TYPE_ANY) { return true; } if (expected === TYPE_ARRAY_STRING || expected === TYPE_ARRAY_NUMBER || expected === TYPE_ARRAY) { // The expected type can either just be array, // or it can require a specific subtype (array of numbers). // // The simplest case is if "array" with no subtype is specified. if (expected === TYPE_ARRAY) { return actual === TYPE_ARRAY; } else if (actual === TYPE_ARRAY) { // Otherwise we need to check subtypes. // I think this has potential to be improved. var subtype; if (expected === TYPE_ARRAY_NUMBER) { subtype = TYPE_NUMBER; } else if (expected === TYPE_ARRAY_STRING) { subtype = TYPE_STRING; } for (var i = 0; i < argValue.length; i++) { if (!this._typeMatches( this._getTypeName(argValue[i]), subtype, argValue[i])) { return false; } } return true; } } else { return actual === expected; } }, _getTypeName: function(obj) { switch (Object.prototype.toString.call(obj)) { case "[object String]": return TYPE_STRING; case "[object Number]": return TYPE_NUMBER; case "[object Array]": return TYPE_ARRAY; case "[object Boolean]": return TYPE_BOOLEAN; case "[object Null]": return TYPE_NULL; case "[object Object]": // Check if it's an expref. If it has, it's been // tagged with a jmespathType attr of 'Expref'; if (obj.jmespathType === TOK_EXPREF) { return TYPE_EXPREF; } else { return TYPE_OBJECT; } } }, _functionStartsWith: function(resolvedArgs) { return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0; }, _functionEndsWith: function(resolvedArgs) { var searchStr = resolvedArgs[0]; var suffix = resolvedArgs[1]; return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1; }, _functionReverse: function(resolvedArgs) { var typeName = this._getTypeName(resolvedArgs[0]); if (typeName === TYPE_STRING) { var originalStr = resolvedArgs[0]; var reversedStr = ""; for (var i = originalStr.length - 1; i >= 0; i--) { reversedStr += originalStr[i]; } return reversedStr; } else { var reversedArray = resolvedArgs[0].slice(0); reversedArray.reverse(); return reversedArray; } }, _functionAbs: function(resolvedArgs) { return Math.abs(resolvedArgs[0]); }, _functionCeil: function(resolvedArgs) { return Math.ceil(resolvedArgs[0]); }, _functionAvg: function(resolvedArgs) { var sum = 0; var inputArray = resolvedArgs[0]; for (var i = 0; i < inputArray.length; i++) { sum += inputArray[i]; } return sum / inputArray.length; }, _functionContains: function(resolvedArgs) { return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0; }, _functionFloor: function(resolvedArgs) { return Math.floor(resolvedArgs[0]); }, _functionLength: function(resolvedArgs) { if (!isObject(resolvedArgs[0])) { return resolvedArgs[0].length; } else { // As far as I can tell, there's no way to get the length // of an object without O(n) iteration through the object. return Object.keys(resolvedArgs[0]).length; } }, _functionMap: function(resolvedArgs) { var mapped = []; var interpreter = this._interpreter; var exprefNode = resolvedArgs[0]; var elements = resolvedArgs[1]; for (var i = 0; i < elements.length; i++) { mapped.push(interpreter.visit(exprefNode, elements[i])); } return mapped; }, _functionMerge: function(resolvedArgs) { var merged = {}; for (var i = 0; i < resolvedArgs.length; i++) { var current = resolvedArgs[i]; for (var key in current) { merged[key] = current[key]; } } return merged; }, _functionMax: function(resolvedArgs) { if (resolvedArgs[0].length > 0) { var typeName = this._getTypeName(resolvedArgs[0][0]); if (typeName === TYPE_NUMBER) { return Math.max.apply(Math, resolvedArgs[0]); } else { var elements = resolvedArgs[0]; var maxElement = elements[0]; for (var i = 1; i < elements.length; i++) { if (maxElement.localeCompare(elements[i]) < 0) { maxElement = elements[i]; } } return maxElement; } } else { return null; } }, _functionMin: function(resolvedArgs) { if (resolvedArgs[0].length > 0) { var typeName = this._getTypeName(resolvedArgs[0][0]); if (typeName === TYPE_NUMBER) { return Math.min.apply(Math, resolvedArgs[0]); } else { var elements = resolvedArgs[0]; var minElement = elements[0]; for (var i = 1; i < elements.length; i++) { if (elements[i].localeCompare(minElement) < 0) { minElement = elements[i]; } } return minElement; } } else { return null; } }, _functionSum: function(resolvedArgs) { var sum = 0; var listToSum = resolvedArgs[0]; for (var i = 0; i < listToSum.length; i++) { sum += listToSum[i]; } return sum; }, _functionType: function(resolvedArgs) { switch (this._getTypeName(resolvedArgs[0])) { case TYPE_NUMBER: return "number"; case TYPE_STRING: return "string"; case TYPE_ARRAY: return "array"; case TYPE_OBJECT: return "object"; case TYPE_BOOLEAN: return "boolean"; case TYPE_EXPREF: return "expref"; case TYPE_NULL: return "null"; } }, _functionKeys: function(resolvedArgs) { return Object.keys(resolvedArgs[0]); }, _functionValues: function(resolvedArgs) { var obj = resolvedArgs[0]; var keys = Object.keys(obj); var values = []; for (var i = 0; i < keys.length; i++) { values.push(obj[keys[i]]); } return values; }, _functionJoin: function(resolvedArgs) { var joinChar = resolvedArgs[0]; var listJoin = resolvedArgs[1]; return listJoin.join(joinChar); }, _functionToArray: function(resolvedArgs) { if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) { return resolvedArgs[0]; } else { return [resolvedArgs[0]]; } }, _functionToString: function(resolvedArgs) { if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) { return resolvedArgs[0]; } else { return JSON.stringify(resolvedArgs[0]); } }, _functionToNumber: function(resolvedArgs) { var typeName = this._getTypeName(resolvedArgs[0]); var convertedValue; if (typeName === TYPE_NUMBER) { return resolvedArgs[0]; } else if (typeName === TYPE_STRING) { convertedValue = +resolvedArgs[0]; if (!isNaN(convertedValue)) { return convertedValue; } } return null; }, _functionNotNull: function(resolvedArgs) { for (var i = 0; i < resolvedArgs.length; i++) { if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) { return resolvedArgs[i]; } } return null; }, _functionSort: function(resolvedArgs) { var sortedArray = resolvedArgs[0].slice(0); sortedArray.sort(); return sortedArray; }, _functionSortBy: function(resolvedArgs) { var sortedArray = resolvedArgs[0].slice(0); if (sortedArray.length === 0) { return sortedArray; } var interpreter = this._interpreter; var exprefNode = resolvedArgs[1]; var requiredType = this._getTypeName( interpreter.visit(exprefNode, sortedArray[0])); if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) { throw new Error("TypeError"); } var that = this; // In order to get a stable sort out of an unstable // sort algorithm, we decorate/sort/undecorate (DSU) // by creating a new list of [index, element] pairs. // In the cmp function, if the evaluated elements are // equal, then the index will be used as the tiebreaker. // After the decorated list has been sorted, it will be // undecorated to extract the original elements. var decorated = []; for (var i = 0; i < sortedArray.length; i++) { decorated.push([i, sortedArray[i]]); } decorated.sort(function(a, b) { var exprA = interpreter.visit(exprefNode, a[1]); var exprB = interpreter.visit(exprefNode, b[1]); if (that._getTypeName(exprA) !== requiredType) { throw new Error( "TypeError: expected " + requiredType + ", received " + that._getTypeName(exprA)); } else if (that._getTypeName(exprB) !== requiredType) { throw new Error( "TypeError: expected " + requiredType + ", received " + that._getTypeName(exprB)); } if (exprA > exprB) { return 1; } else if (exprA < exprB) { return -1; } else { // If they're equal compare the items by their // order to maintain relative order of equal keys // (i.e. to get a stable sort). return a[0] - b[0]; } }); // Undecorate: extract out the original list elements. for (var j = 0; j < decorated.length; j++) { sortedArray[j] = decorated[j][1]; } return sortedArray; }, _functionMaxBy: function(resolvedArgs) { var exprefNode = resolvedArgs[1]; var resolvedArray = resolvedArgs[0]; var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); var maxNumber = -Infinity; var maxRecord; var current; for (var i = 0; i < resolvedArray.length; i++) { current = keyFunction(resolvedArray[i]); if (current > maxNumber) { maxNumber = current; maxRecord = resolvedArray[i]; } } return maxRecord; }, _functionMinBy: function(resolvedArgs) { var exprefNode = resolvedArgs[1]; var resolvedArray = resolvedArgs[0]; var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); var minNumber = Infinity; var minRecord; var current; for (var i = 0; i < resolvedArray.length; i++) { current = keyFunction(resolvedArray[i]); if (current < minNumber) { minNumber = current; minRecord = resolvedArray[i]; } } return minRecord; }, createKeyFunction: function(exprefNode, allowedTypes) { var that = this; var interpreter = this._interpreter; var keyFunc = function(x) { var current = interpreter.visit(exprefNode, x); if (allowedTypes.indexOf(that._getTypeName(current)) < 0) { var msg = "TypeError: expected one of " + allowedTypes + ", received " + that._getTypeName(current); throw new Error(msg); } return current; }; return keyFunc; } }; function compile(stream) { var parser = new Parser(); var ast = parser.parse(stream); return ast; } function tokenize(stream) { var lexer = new Lexer(); return lexer.tokenize(stream); } function search(data, expression) { var parser = new Parser(); // This needs to be improved. Both the interpreter and runtime depend on // each other. The runtime needs the interpreter to support exprefs. // There's likely a clean way to avoid the cyclic dependency. var runtime = new Runtime(); var interpreter = new TreeInterpreter(runtime); runtime._interpreter = interpreter; var node = parser.parse(expression); return interpreter.search(node, data); } exports.tokenize = tokenize; exports.compile = compile; exports.search = search; exports.strictDeepEqual = strictDeepEqual; })( false ? 0 : exports); /***/ }), /***/ 21917: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var yaml = __webpack_require__(40916); module.exports = yaml; /***/ }), /***/ 40916: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var loader = __webpack_require__(45190); var dumper = __webpack_require__(73034); function deprecated(name) { return function () { throw new Error('Function ' + name + ' is deprecated and cannot be used.'); }; } module.exports.Type = __webpack_require__(30967); module.exports.Schema = __webpack_require__(66514); module.exports.FAILSAFE_SCHEMA = __webpack_require__(66037); module.exports.JSON_SCHEMA = __webpack_require__(1571); module.exports.CORE_SCHEMA = __webpack_require__(92183); module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(48949); module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(56874); module.exports.load = loader.load; module.exports.loadAll = loader.loadAll; module.exports.safeLoad = loader.safeLoad; module.exports.safeLoadAll = loader.safeLoadAll; module.exports.dump = dumper.dump; module.exports.safeDump = dumper.safeDump; module.exports.YAMLException = __webpack_require__(65199); // Deprecated schema names from JS-YAML 2.0.x module.exports.MINIMAL_SCHEMA = __webpack_require__(66037); module.exports.SAFE_SCHEMA = __webpack_require__(48949); module.exports.DEFAULT_SCHEMA = __webpack_require__(56874); // Deprecated functions from JS-YAML 1.x.x module.exports.scan = deprecated('scan'); module.exports.parse = deprecated('parse'); module.exports.compose = deprecated('compose'); module.exports.addConstructor = deprecated('addConstructor'); /***/ }), /***/ 59136: /***/ ((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; /***/ }), /***/ 73034: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable no-use-before-define*/ var common = __webpack_require__(59136); var YAMLException = __webpack_require__(65199); var DEFAULT_FULL_SCHEMA = __webpack_require__(56874); var DEFAULT_SAFE_SCHEMA = __webpack_require__(48949); var _toString = Object.prototype.toString; var _hasOwnProperty = Object.prototype.hasOwnProperty; 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' ]; 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; } function State(options) { this.schema = options['schema'] || DEFAULT_FULL_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.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 !== 0xFEFF /* 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 // [24] b-line-feed ::= #xA /* LF */ // [25] b-carriage-return ::= #xD /* CR */ // [3] c-byte-order-mark ::= #xFEFF function isNsChar(c) { return isPrintable(c) && !isWhitespace(c) // byte-order-mark && c !== 0xFEFF // b-char && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; } // Simplified test for values allowed after the first character in plain style. function isPlainSafe(c, prev) { // Uses a subset of nb-char - c-flow-indicator - ":" - "#" // where nb-char ::= c-printable - b-char - c-byte-order-mark. return isPrintable(c) && c !== 0xFEFF // - 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 // - ":" - "#" // /* An ns-char preceding */ "#" && c !== CHAR_COLON && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); } // 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. return isPrintable(c) && c !== 0xFEFF && !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; } // 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) { var i; var char, prev_char; 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(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1)); if (singleLineOnly) { // Case: no block styles. // Check for disallowed characters to rule out plain and single. for (i = 0; i < string.length; i++) { char = string.charCodeAt(i); if (!isPrintable(char)) { return STYLE_DOUBLE; } prev_char = i > 0 ? string.charCodeAt(i - 1) : null; plain = plain && isPlainSafe(char, prev_char); } } else { // Case: block styles permitted. for (i = 0; i < string.length; i++) { char = string.charCodeAt(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; } prev_char = i > 0 ? string.charCodeAt(i - 1) : null; plain = plain && isPlainSafe(char, prev_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. return plain && !testAmbiguousType(string) ? STYLE_PLAIN : 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. return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; } // 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) { state.dump = (function () { if (string.length === 0) { return "''"; } if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { return "'" + 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)) { 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, nextChar; var escapeSeq; for (var i = 0; i < string.length; i++) { char = string.charCodeAt(i); // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { nextChar = string.charCodeAt(i + 1); if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { // Combine the surrogate pair and store it escaped. result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); // Advance index one extra since we already used that char here. i++; continue; } } escapeSeq = ESCAPE_SEQUENCES[char]; result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); } return result; } function writeFlowSequence(state, level, object) { var _result = '', _tag = state.tag, index, length; for (index = 0, length = object.length; index < length; index += 1) { // Write only valid elements. if (writeNode(state, level, object[index], false, false)) { if (index !== 0) _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; for (index = 0, length = object.length; index < length; index += 1) { // Write only valid elements. if (writeNode(state, level + 1, object[index], true, true)) { if (!compact || index !== 0) { _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 (index !== 0) pairBuffer += ', '; if (state.condenseFlow) pairBuffer += '"'; objectKey = objectKeyList[index]; objectValue = object[objectKey]; 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 || index !== 0) { pairBuffer += generateNextLine(state, level); } objectKey = objectKeyList[index]; objectValue = object[objectKey]; 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))) { state.tag = explicit ? type.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) { state.tag = null; state.dump = object; if (!detectType(state, object, false)) { detectType(state, object, true); } var type = _toString.call(state.dump); 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]') { var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; if (block && (state.dump.length !== 0)) { writeBlockSequence(state, arrayLevel, state.dump, compact); if (duplicate) { state.dump = '&ref_' + duplicateIndex + state.dump; } } else { writeFlowSequence(state, arrayLevel, state.dump); if (duplicate) { state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; } } } else if (type === '[object String]') { if (state.tag !== '?') { writeScalar(state, state.dump, level, iskey); } } else { if (state.skipInvalid) return false; throw new YAMLException('unacceptable kind of an object to dump ' + type); } if (state.tag !== null && state.tag !== '?') { state.dump = '!<' + state.tag + '> ' + 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); if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; return ''; } function safeDump(input, options) { return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); } module.exports.dump = dump; module.exports.safeDump = safeDump; /***/ }), /***/ 65199: /***/ ((module) => { "use strict"; // YAML error class. http://stackoverflow.com/questions/8458984 // function YAMLException(reason, mark) { // Super constructor Error.call(this); this.name = 'YAMLException'; this.reason = reason; this.mark = mark; this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); // 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) { var result = this.name + ': '; result += this.reason || '(unknown reason)'; if (!compact && this.mark) { result += ' ' + this.mark.toString(); } return result; }; module.exports = YAMLException; /***/ }), /***/ 45190: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable max-len,no-use-before-define*/ var common = __webpack_require__(59136); var YAMLException = __webpack_require__(65199); var Mark = __webpack_require__(55426); var DEFAULT_SAFE_SCHEMA = __webpack_require__(48949); var DEFAULT_FULL_SCHEMA = __webpack_require__(56874); 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_FULL_SCHEMA; this.onWarning = options['onWarning'] || null; 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; this.documents = []; /* this.version; this.checkLineBreaks; this.tagMap; this.anchorMap; this.tag; this.anchor; this.kind; this.result;*/ } function generateError(state, message) { return new YAMLException( message, new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); } 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'); } 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, 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.position = startPos || state.position; throwError(state, 'duplicated mapping key'); } _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; } function skipSeparationSpace(state, allowComments, checkIndent) { var lineBreaks = 0, ch = state.input.charCodeAt(state.position); while (ch !== 0) { while (is_WHITE_SPACE(ch)) { 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, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, 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'); } 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; 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); } else if (isPair) { _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); } 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; if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.position); while (ch !== 0) { 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, _pos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.position); while (ch !== 0) { following = state.input.charCodeAt(state.position + 1); _line = state.line; // Save the current line. _pos = state.position; // // 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); 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 if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { 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); 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`. } } else { break; // Reading is done. Go to the epilogue. } // // Common reading code for both explicit and implicit notations. // if (state.line === _line || state.lineIndent > nodeIndent) { 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, _line, _pos); keyTag = keyNode = valueNode = null; } skipSeparationSpace(state, true, -1); ch = state.input.charCodeAt(state.position); } if (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); } // 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); } 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 && state.tag !== '!') { 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 (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { type = state.typeMap[state.kind || 'fallback'][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.result` updated in resolver if matched throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); } else { state.result = type.construct(state.result); if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } } } else { throwError(state, 'unknown tag !<' + state.tag + '>'); } } 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 = {}; state.anchorMap = {}; 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'); } function safeLoadAll(input, iterator, options) { if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { options = iterator; iterator = null; } return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); } function safeLoad(input, options) { return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); } module.exports.loadAll = loadAll; module.exports.load = load; module.exports.safeLoadAll = safeLoadAll; module.exports.safeLoad = safeLoad; /***/ }), /***/ 55426: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(59136); function Mark(name, buffer, position, line, column) { this.name = name; this.buffer = buffer; this.position = position; this.line = line; this.column = column; } Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { var head, start, tail, end, snippet; if (!this.buffer) return null; indent = indent || 4; maxLength = maxLength || 75; head = ''; start = this.position; while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { start -= 1; if (this.position - start > (maxLength / 2 - 1)) { head = ' ... '; start += 5; break; } } tail = ''; end = this.position; while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { end += 1; if (end - this.position > (maxLength / 2 - 1)) { tail = ' ... '; end -= 5; break; } } snippet = this.buffer.slice(start, end); return common.repeat(' ', indent) + head + snippet + tail + '\n' + common.repeat(' ', indent + this.position - start + head.length) + '^'; }; Mark.prototype.toString = function toString(compact) { var snippet, where = ''; if (this.name) { where += 'in "' + this.name + '" '; } where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); if (!compact) { snippet = this.getSnippet(); if (snippet) { where += ':\n' + snippet; } } return where; }; module.exports = Mark; /***/ }), /***/ 66514: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable max-len*/ var common = __webpack_require__(59136); var YAMLException = __webpack_require__(65199); var Type = __webpack_require__(30967); function compileList(schema, name, result) { var exclude = []; schema.include.forEach(function (includedSchema) { result = compileList(includedSchema, name, result); }); schema[name].forEach(function (currentType) { result.forEach(function (previousType, previousIndex) { if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { exclude.push(previousIndex); } }); result.push(currentType); }); return result.filter(function (type, index) { return exclude.indexOf(index) === -1; }); } function compileMap(/* lists... */) { var result = { scalar: {}, sequence: {}, mapping: {}, fallback: {} }, index, length; function collectType(type) { 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) { this.include = definition.include || []; this.implicit = definition.implicit || []; this.explicit = definition.explicit || []; this.implicit.forEach(function (type) { 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.'); } }); this.compiledImplicit = compileList(this, 'implicit', []); this.compiledExplicit = compileList(this, 'explicit', []); this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); } Schema.DEFAULT = null; Schema.create = function createSchema() { var schemas, types; switch (arguments.length) { case 1: schemas = Schema.DEFAULT; types = arguments[0]; break; case 2: schemas = arguments[0]; types = arguments[1]; break; default: throw new YAMLException('Wrong number of arguments for Schema.create function'); } schemas = common.toArray(schemas); types = common.toArray(types); if (!schemas.every(function (schema) { return schema instanceof Schema; })) { throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); } if (!types.every(function (type) { return type instanceof Type; })) { throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); } return new Schema({ include: schemas, explicit: types }); }; module.exports = Schema; /***/ }), /***/ 92183: /***/ ((module, __unused_webpack_exports, __webpack_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. var Schema = __webpack_require__(66514); module.exports = new Schema({ include: [ __webpack_require__(1571) ] }); /***/ }), /***/ 56874: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // JS-YAML's default schema for `load` function. // It is not described in the YAML specification. // // This schema is based on JS-YAML's default safe schema and includes // JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. // // Also this schema is used as default base schema at `Schema.create` function. var Schema = __webpack_require__(66514); module.exports = Schema.DEFAULT = new Schema({ include: [ __webpack_require__(48949) ], explicit: [ __webpack_require__(25914), __webpack_require__(69242), __webpack_require__(27278) ] }); /***/ }), /***/ 48949: /***/ ((module, __unused_webpack_exports, __webpack_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/) var Schema = __webpack_require__(66514); module.exports = new Schema({ include: [ __webpack_require__(92183) ], implicit: [ __webpack_require__(83714), __webpack_require__(81393) ], explicit: [ __webpack_require__(32551), __webpack_require__(96668), __webpack_require__(76039), __webpack_require__(69237) ] }); /***/ }), /***/ 66037: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // Standard YAML's Failsafe schema. // http://www.yaml.org/spec/1.2/spec.html#id2802346 var Schema = __webpack_require__(66514); module.exports = new Schema({ explicit: [ __webpack_require__(52672), __webpack_require__(5490), __webpack_require__(31173) ] }); /***/ }), /***/ 1571: /***/ ((module, __unused_webpack_exports, __webpack_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. var Schema = __webpack_require__(66514); module.exports = new Schema({ include: [ __webpack_require__(66037) ], implicit: [ __webpack_require__(65647), __webpack_require__(94675), __webpack_require__(89963), __webpack_require__(15564) ] }); /***/ }), /***/ 30967: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var YAMLException = __webpack_require__(65199); var TYPE_CONSTRUCTOR_OPTIONS = [ 'kind', 'resolve', 'construct', 'instanceOf', 'predicate', 'represent', '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.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.defaultStyle = options['defaultStyle'] || null; 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; /***/ }), /***/ 32551: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable no-bitwise*/ var NodeBuffer; try { // A trick for browserified version, to not include `Buffer` shim var _require = require; NodeBuffer = _require('buffer').Buffer; } catch (__) {} var Type = __webpack_require__(30967); // [ 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); } // Wrap into Buffer for NodeJS and leave Array for browser if (NodeBuffer) { // Support node 6.+ Buffer API when available return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); } return 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(object) { return NodeBuffer && NodeBuffer.isBuffer(object); } module.exports = new Type('tag:yaml.org,2002:binary', { kind: 'scalar', resolve: resolveYamlBinary, construct: constructYamlBinary, predicate: isBinary, represent: representYamlBinary }); /***/ }), /***/ 94675: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); 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' }); /***/ }), /***/ 15564: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(59136); var Type = __webpack_require__(30967); var YAML_FLOAT_PATTERN = new RegExp( // 2.5e4, 2.5 and integers '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + // .2e4, .2 // special case, seems not from spec '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + // 20:59 '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[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, base, digits; value = data.replace(/_/g, '').toLowerCase(); sign = value[0] === '-' ? -1 : 1; digits = []; 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; } else if (value.indexOf(':') >= 0) { value.split(':').forEach(function (v) { digits.unshift(parseFloat(v, 10)); }); value = 0.0; base = 1; digits.forEach(function (d) { value += d * base; base *= 60; }); return sign * value; } 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' }); /***/ }), /***/ 89963: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(59136); var Type = __webpack_require__(30967); 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 !== '_'; } // base 8 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) or base 60 // value should not start with `_`; if (ch === '_') return false; for (; index < max; index++) { ch = data[index]; if (ch === '_') continue; if (ch === ':') break; if (!isDecCode(data.charCodeAt(index))) { return false; } hasDigits = true; } // Should have digits and should not end with `_` if (!hasDigits || ch === '_') return false; // if !base60 - done; if (ch !== ':') return true; // base60 almost not used, no needs to optimize return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); } function constructYamlInteger(data) { var value = data, sign = 1, ch, base, digits = []; 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, 16); return sign * parseInt(value, 8); } if (value.indexOf(':') !== -1) { value.split(':').forEach(function (v) { digits.unshift(parseInt(v, 10)); }); value = 0; base = 1; digits.forEach(function (d) { value += (d * base); base *= 60; }); return sign * value; } 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 ? '0' + obj.toString(8) : '-0' + 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' ] } }); /***/ }), /***/ 27278: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var esprima; // Browserified version does not have esprima // // 1. For node.js just require module as deps // 2. For browser try to require mudule via external AMD system. // If not found - try to fallback to window.esprima. If not // found too - then fail to parse. // try { // workaround to exclude package from browserify list. var _require = require; esprima = _require('esprima'); } catch (_) { /* eslint-disable no-redeclare */ /* global window */ if (typeof window !== 'undefined') esprima = window.esprima; } var Type = __webpack_require__(30967); function resolveJavascriptFunction(data) { if (data === null) return false; try { var source = '(' + data + ')', ast = esprima.parse(source, { range: true }); if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || (ast.body[0].expression.type !== 'ArrowFunctionExpression' && ast.body[0].expression.type !== 'FunctionExpression')) { return false; } return true; } catch (err) { return false; } } function constructJavascriptFunction(data) { /*jslint evil:true*/ var source = '(' + data + ')', ast = esprima.parse(source, { range: true }), params = [], body; if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || (ast.body[0].expression.type !== 'ArrowFunctionExpression' && ast.body[0].expression.type !== 'FunctionExpression')) { throw new Error('Failed to resolve function'); } ast.body[0].expression.params.forEach(function (param) { params.push(param.name); }); body = ast.body[0].expression.body.range; // Esprima's ranges include the first '{' and the last '}' characters on // function expressions. So cut them out. if (ast.body[0].expression.body.type === 'BlockStatement') { /*eslint-disable no-new-func*/ return new Function(params, source.slice(body[0] + 1, body[1] - 1)); } // ES6 arrow functions can omit the BlockStatement. In that case, just return // the body. /*eslint-disable no-new-func*/ return new Function(params, 'return ' + source.slice(body[0], body[1])); } function representJavascriptFunction(object /*, style*/) { return object.toString(); } function isFunction(object) { return Object.prototype.toString.call(object) === '[object Function]'; } module.exports = new Type('tag:yaml.org,2002:js/function', { kind: 'scalar', resolve: resolveJavascriptFunction, construct: constructJavascriptFunction, predicate: isFunction, represent: representJavascriptFunction }); /***/ }), /***/ 69242: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); function resolveJavascriptRegExp(data) { if (data === null) return false; if (data.length === 0) return false; var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ''; // if regexp starts with '/' it can have modifiers and must be properly closed // `/foo/gim` - modifiers tail can be maximum 3 chars if (regexp[0] === '/') { if (tail) modifiers = tail[1]; if (modifiers.length > 3) return false; // if expression starts with /, is should be properly terminated if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; } return true; } function constructJavascriptRegExp(data) { var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ''; // `/foo/gim` - tail can be maximum 4 chars if (regexp[0] === '/') { if (tail) modifiers = tail[1]; regexp = regexp.slice(1, regexp.length - modifiers.length - 1); } return new RegExp(regexp, modifiers); } function representJavascriptRegExp(object /*, style*/) { var result = '/' + object.source + '/'; if (object.global) result += 'g'; if (object.multiline) result += 'm'; if (object.ignoreCase) result += 'i'; return result; } function isRegExp(object) { return Object.prototype.toString.call(object) === '[object RegExp]'; } module.exports = new Type('tag:yaml.org,2002:js/regexp', { kind: 'scalar', resolve: resolveJavascriptRegExp, construct: constructJavascriptRegExp, predicate: isRegExp, represent: representJavascriptRegExp }); /***/ }), /***/ 25914: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); function resolveJavascriptUndefined() { return true; } function constructJavascriptUndefined() { /*eslint-disable no-undefined*/ return undefined; } function representJavascriptUndefined() { return ''; } function isUndefined(object) { return typeof object === 'undefined'; } module.exports = new Type('tag:yaml.org,2002:js/undefined', { kind: 'scalar', resolve: resolveJavascriptUndefined, construct: constructJavascriptUndefined, predicate: isUndefined, represent: representJavascriptUndefined }); /***/ }), /***/ 31173: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); module.exports = new Type('tag:yaml.org,2002:map', { kind: 'mapping', construct: function (data) { return data !== null ? data : {}; } }); /***/ }), /***/ 81393: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); function resolveYamlMerge(data) { return data === '<<' || data === null; } module.exports = new Type('tag:yaml.org,2002:merge', { kind: 'scalar', resolve: resolveYamlMerge }); /***/ }), /***/ 65647: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); 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'; } }, defaultStyle: 'lowercase' }); /***/ }), /***/ 96668: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); 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 }); /***/ }), /***/ 76039: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); 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 }); /***/ }), /***/ 5490: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); module.exports = new Type('tag:yaml.org,2002:seq', { kind: 'sequence', construct: function (data) { return data !== null ? data : []; } }); /***/ }), /***/ 69237: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); 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 }); /***/ }), /***/ 52672: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); module.exports = new Type('tag:yaml.org,2002:str', { kind: 'scalar', construct: function (data) { return data !== null ? data : ''; } }); /***/ }), /***/ 83714: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(30967); 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 }); /***/ }), /***/ 85587: /***/ (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); /***/ }), /***/ 46123: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const fs = __webpack_require__(35747).promises; const vm = __webpack_require__(92184); const toughCookie = __webpack_require__(8735); const sniffHTMLEncoding = __webpack_require__(15487); const whatwgURL = __webpack_require__(66365); const whatwgEncoding = __webpack_require__(49967); const { URL } = __webpack_require__(66365); const MIMEType = __webpack_require__(59488); const idlUtils = __webpack_require__(34908); const VirtualConsole = __webpack_require__(57704); const { createWindow } = __webpack_require__(55802); const { parseIntoDocument } = __webpack_require__(35373); const { fragmentSerialization } = __webpack_require__(33740); const ResourceLoader = __webpack_require__(90007); const NoOpResourceLoader = __webpack_require__(5383); class CookieJar extends toughCookie.CookieJar { constructor(store, options) { // jsdom cookie jars must be loose by default super(store, { looseMode: true, ...options }); } } const window = Symbol("window"); let sharedFragmentDocument = null; class JSDOM { constructor(input = "", options = {}) { const mimeType = new MIMEType(options.contentType === undefined ? "text/html" : options.contentType); const { html, encoding } = normalizeHTML(input, mimeType); options = transformOptions(options, encoding, mimeType); this[window] = createWindow(options.windowOptions); const documentImpl = idlUtils.implForWrapper(this[window]._document); options.beforeParse(this[window]._globalProxy); parseIntoDocument(html, documentImpl); documentImpl.close(); } get window() { // It's important to grab the global proxy, instead of just the result of `createWindow(...)`, since otherwise // things like `window.eval` don't exist. return this[window]._globalProxy; } get virtualConsole() { return this[window]._virtualConsole; } get cookieJar() { // TODO NEWAPI move _cookieJar to window probably return idlUtils.implForWrapper(this[window]._document)._cookieJar; } serialize() { return fragmentSerialization(idlUtils.implForWrapper(this[window]._document), { requireWellFormed: false }); } nodeLocation(node) { if (!idlUtils.implForWrapper(this[window]._document)._parseOptions.sourceCodeLocationInfo) { throw new Error("Location information was not saved for this jsdom. Use includeNodeLocations during creation."); } return idlUtils.implForWrapper(node).sourceCodeLocation; } getInternalVMContext() { if (!vm.isContext(this[window])) { throw new TypeError("This jsdom was not configured to allow script running. " + "Use the runScripts option during creation."); } return this[window]; } reconfigure(settings) { if ("windowTop" in settings) { this[window]._top = settings.windowTop; } if ("url" in settings) { const document = idlUtils.implForWrapper(this[window]._document); const url = whatwgURL.parseURL(settings.url); if (url === null) { throw new TypeError(`Could not parse "${settings.url}" as a URL`); } document._URL = url; document._origin = whatwgURL.serializeURLOrigin(document._URL); } } static fragment(string = "") { if (!sharedFragmentDocument) { sharedFragmentDocument = (new JSDOM()).window.document; } const template = sharedFragmentDocument.createElement("template"); template.innerHTML = string; return template.content; } static fromURL(url, options = {}) { return Promise.resolve().then(() => { // Remove the hash while sending this through the research loader fetch(). // It gets added back a few lines down when constructing the JSDOM object. const parsedURL = new URL(url); const originalHash = parsedURL.hash; parsedURL.hash = ""; url = parsedURL.href; options = normalizeFromURLOptions(options); const resourceLoader = resourcesToResourceLoader(options.resources); const resourceLoaderForInitialRequest = resourceLoader.constructor === NoOpResourceLoader ? new ResourceLoader() : resourceLoader; const req = resourceLoaderForInitialRequest.fetch(url, { accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", cookieJar: options.cookieJar, referrer: options.referrer }); return req.then(body => { const res = req.response; options = Object.assign(options, { url: req.href + originalHash, contentType: res.headers["content-type"], referrer: req.getHeader("referer") }); return new JSDOM(body, options); }); }); } static async fromFile(filename, options = {}) { options = normalizeFromFileOptions(filename, options); const buffer = await fs.readFile(filename); return new JSDOM(buffer, options); } } function normalizeFromURLOptions(options) { // Checks on options that are invalid for `fromURL` if (options.url !== undefined) { throw new TypeError("Cannot supply a url option when using fromURL"); } if (options.contentType !== undefined) { throw new TypeError("Cannot supply a contentType option when using fromURL"); } // Normalization of options which must be done before the rest of the fromURL code can use them, because they are // given to request() const normalized = { ...options }; if (options.referrer !== undefined) { normalized.referrer = (new URL(options.referrer)).href; } if (options.cookieJar === undefined) { normalized.cookieJar = new CookieJar(); } return normalized; // All other options don't need to be processed yet, and can be taken care of in the normal course of things when // `fromURL` calls `new JSDOM(html, options)`. } function normalizeFromFileOptions(filename, options) { const normalized = { ...options }; if (normalized.contentType === undefined) { const extname = path.extname(filename); if (extname === ".xhtml" || extname === ".xht" || extname === ".xml") { normalized.contentType = "application/xhtml+xml"; } } if (normalized.url === undefined) { normalized.url = new URL("file:" + path.resolve(filename)); } return normalized; } function transformOptions(options, encoding, mimeType) { const transformed = { windowOptions: { // Defaults url: "about:blank", referrer: "", contentType: "text/html", parsingMode: "html", parseOptions: { sourceCodeLocationInfo: false, scriptingEnabled: false }, runScripts: undefined, encoding, pretendToBeVisual: false, storageQuota: 5000000, // Defaults filled in later resourceLoader: undefined, virtualConsole: undefined, cookieJar: undefined }, // Defaults beforeParse() { } }; // options.contentType was parsed into mimeType by the caller. if (!mimeType.isHTML() && !mimeType.isXML()) { throw new RangeError(`The given content type of "${options.contentType}" was not a HTML or XML content type`); } transformed.windowOptions.contentType = mimeType.essence; transformed.windowOptions.parsingMode = mimeType.isHTML() ? "html" : "xml"; if (options.url !== undefined) { transformed.windowOptions.url = (new URL(options.url)).href; } if (options.referrer !== undefined) { transformed.windowOptions.referrer = (new URL(options.referrer)).href; } if (options.includeNodeLocations) { if (transformed.windowOptions.parsingMode === "xml") { throw new TypeError("Cannot set includeNodeLocations to true with an XML content type"); } transformed.windowOptions.parseOptions = { sourceCodeLocationInfo: true }; } transformed.windowOptions.cookieJar = options.cookieJar === undefined ? new CookieJar() : options.cookieJar; transformed.windowOptions.virtualConsole = options.virtualConsole === undefined ? (new VirtualConsole()).sendTo(console) : options.virtualConsole; if (!(transformed.windowOptions.virtualConsole instanceof VirtualConsole)) { throw new TypeError("virtualConsole must be an instance of VirtualConsole"); } transformed.windowOptions.resourceLoader = resourcesToResourceLoader(options.resources); if (options.runScripts !== undefined) { transformed.windowOptions.runScripts = String(options.runScripts); if (transformed.windowOptions.runScripts === "dangerously") { transformed.windowOptions.parseOptions.scriptingEnabled = true; } else if (transformed.windowOptions.runScripts !== "outside-only") { throw new RangeError(`runScripts must be undefined, "dangerously", or "outside-only"`); } } if (options.beforeParse !== undefined) { transformed.beforeParse = options.beforeParse; } if (options.pretendToBeVisual !== undefined) { transformed.windowOptions.pretendToBeVisual = Boolean(options.pretendToBeVisual); } if (options.storageQuota !== undefined) { transformed.windowOptions.storageQuota = Number(options.storageQuota); } return transformed; } function normalizeHTML(html, mimeType) { let encoding = "UTF-8"; if (ArrayBuffer.isView(html)) { html = Buffer.from(html.buffer, html.byteOffset, html.byteLength); } else if (html instanceof ArrayBuffer) { html = Buffer.from(html); } if (Buffer.isBuffer(html)) { encoding = sniffHTMLEncoding(html, { defaultEncoding: mimeType.isXML() ? "UTF-8" : "windows-1252", transportLayerEncodingLabel: mimeType.parameters.get("charset") }); html = whatwgEncoding.decode(html, encoding); } else { html = String(html); } return { html, encoding }; } function resourcesToResourceLoader(resources) { switch (resources) { case undefined: { return new NoOpResourceLoader(); } case "usable": { return new ResourceLoader(); } default: { if (!(resources instanceof ResourceLoader)) { throw new TypeError("resources must be an instance of ResourceLoader"); } return resources; } } } exports.JSDOM = JSDOM; exports.VirtualConsole = VirtualConsole; exports.CookieJar = CookieJar; exports.ResourceLoader = ResourceLoader; exports.toughCookie = toughCookie; /***/ }), /***/ 55802: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; const vm = __webpack_require__(92184); const webIDLConversions = __webpack_require__(54886); const { CSSStyleDeclaration } = __webpack_require__(15674); const { Performance: RawPerformance } = __webpack_require__(38481); const notImplemented = __webpack_require__(42751); const { installInterfaces } = __webpack_require__(71643); const { define, mixin } = __webpack_require__(11463); const Element = __webpack_require__(4444); const EventTarget = __webpack_require__(71038); const EventHandlerNonNull = __webpack_require__(15028); const OnBeforeUnloadEventHandlerNonNull = __webpack_require__(64546); const OnErrorEventHandlerNonNull = __webpack_require__(87517); const PageTransitionEvent = __webpack_require__(32941); const namedPropertiesWindow = __webpack_require__(15200); const postMessage = __webpack_require__(47054); const DOMException = __webpack_require__(57617); const { btoa, atob } = __webpack_require__(75696); const idlUtils = __webpack_require__(34908); const WebSocketImpl = __webpack_require__(13846).implementation; const BarProp = __webpack_require__(35849); const documents = __webpack_require__(19951); const External = __webpack_require__(19995); const Navigator = __webpack_require__(96340); const Performance = __webpack_require__(19264); const Screen = __webpack_require__(46164); const Storage = __webpack_require__(76969); const Selection = __webpack_require__(69144); const reportException = __webpack_require__(15612); const { getCurrentEventHandlerValue } = __webpack_require__(50238); const { fireAnEvent } = __webpack_require__(45673); const SessionHistory = __webpack_require__(14825); const { forEachMatchingSheetRuleOfElement, getResolvedValue, propertiesWithResolvedValueImplemented, SHADOW_DOM_PSEUDO_REGEXP } = __webpack_require__(11627); const CustomElementRegistry = __webpack_require__(17609); const jsGlobals = __webpack_require__(70629); const GlobalEventHandlersImpl = __webpack_require__(4084).implementation; const WindowEventHandlersImpl = __webpack_require__(55974).implementation; const events = new Set([ // GlobalEventHandlers "abort", "autocomplete", "autocompleteerror", "blur", "cancel", "canplay", "canplaythrough", "change", "click", "close", "contextmenu", "cuechange", "dblclick", "drag", "dragend", "dragenter", "dragleave", "dragover", "dragstart", "drop", "durationchange", "emptied", "ended", "focus", "input", "invalid", "keydown", "keypress", "keyup", "load", "loadeddata", "loadedmetadata", "loadstart", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "wheel", "pause", "play", "playing", "progress", "ratechange", "reset", "resize", "scroll", "securitypolicyviolation", "seeked", "seeking", "select", "sort", "stalled", "submit", "suspend", "timeupdate", "toggle", "volumechange", "waiting", // WindowEventHandlers "afterprint", "beforeprint", "hashchange", "languagechange", "message", "messageerror", "offline", "online", "pagehide", "pageshow", "popstate", "rejectionhandled", "storage", "unhandledrejection", "unload" // "error" and "beforeunload" are added separately ]); exports.createWindow = function (options) { return new Window(options); }; const jsGlobalEntriesToInstall = Object.entries(jsGlobals).filter(([name]) => name in global); // TODO remove when we drop Node v10 support. const anyNodeVersionQueueMicrotask = typeof queueMicrotask === "function" ? queueMicrotask : process.nextTick; // https://html.spec.whatwg.org/#the-window-object function setupWindow(windowInstance, { runScripts }) { if (runScripts === "outside-only" || runScripts === "dangerously") { contextifyWindow(windowInstance); // Without this, these globals will only appear to scripts running inside the context using vm.runScript; they will // not appear to scripts running from the outside, including to JSDOM implementation code. for (const [globalName, globalPropDesc] of jsGlobalEntriesToInstall) { const propDesc = { ...globalPropDesc, value: vm.runInContext(globalName, windowInstance) }; Object.defineProperty(windowInstance, globalName, propDesc); } } else { // Without contextifying the window, none of the globals will exist. So, let's at least alias them from the Node.js // context. See https://github.com/jsdom/jsdom/issues/2727 for more background and discussion. for (const [globalName, globalPropDesc] of jsGlobalEntriesToInstall) { const propDesc = { ...globalPropDesc, value: global[globalName] }; Object.defineProperty(windowInstance, globalName, propDesc); } } installInterfaces(windowInstance, ["Window"]); const EventTargetConstructor = windowInstance.EventTarget; // eslint-disable-next-line func-name-matching, func-style, no-shadow const windowConstructor = function Window() { throw new TypeError("Illegal constructor"); }; Object.setPrototypeOf(windowConstructor, EventTargetConstructor); Object.defineProperty(windowInstance, "Window", { configurable: true, writable: true, value: windowConstructor }); const windowPrototype = Object.create(EventTargetConstructor.prototype); Object.defineProperties(windowPrototype, { constructor: { value: windowConstructor, writable: true, configurable: true }, [Symbol.toStringTag]: { value: "Window", configurable: true } }); windowConstructor.prototype = windowPrototype; Object.setPrototypeOf(windowInstance, windowPrototype); EventTarget.setup(windowInstance, windowInstance); mixin(windowInstance, WindowEventHandlersImpl.prototype); mixin(windowInstance, GlobalEventHandlersImpl.prototype); windowInstance._initGlobalEvents(); Object.defineProperty(windowInstance, "onbeforeunload", { configurable: true, enumerable: true, get() { return idlUtils.tryWrapperForImpl(getCurrentEventHandlerValue(this, "beforeunload")); }, set(V) { if (!idlUtils.isObject(V)) { V = null; } else { V = OnBeforeUnloadEventHandlerNonNull.convert(V, { context: "Failed to set the 'onbeforeunload' property on 'Window': The provided value" }); } this._setEventHandlerFor("beforeunload", V); } }); Object.defineProperty(windowInstance, "onerror", { configurable: true, enumerable: true, get() { return idlUtils.tryWrapperForImpl(getCurrentEventHandlerValue(this, "error")); }, set(V) { if (!idlUtils.isObject(V)) { V = null; } else { V = OnErrorEventHandlerNonNull.convert(V, { context: "Failed to set the 'onerror' property on 'Window': The provided value" }); } this._setEventHandlerFor("error", V); } }); for (const event of events) { Object.defineProperty(windowInstance, `on${event}`, { configurable: true, enumerable: true, get() { return idlUtils.tryWrapperForImpl(getCurrentEventHandlerValue(this, event)); }, set(V) { if (!idlUtils.isObject(V)) { V = null; } else { V = EventHandlerNonNull.convert(V, { context: `Failed to set the 'on${event}' property on 'Window': The provided value` }); } this._setEventHandlerFor(event, V); } }); } windowInstance._globalObject = windowInstance; } // NOTE: per https://heycam.github.io/webidl/#Global, all properties on the Window object must be own-properties. // That is why we assign everything inside of the constructor, instead of using a shared prototype. // You can verify this in e.g. Firefox or Internet Explorer, which do a good job with Web IDL compliance. function Window(options) { setupWindow(this, { runScripts: options.runScripts }); const rawPerformance = new RawPerformance(); const windowInitialized = rawPerformance.now(); const window = this; // ### PRIVATE DATA PROPERTIES this._resourceLoader = options.resourceLoader; // vm initialization is deferred until script processing is activated this._globalProxy = this; Object.defineProperty(idlUtils.implForWrapper(this), idlUtils.wrapperSymbol, { get: () => this._globalProxy }); // List options explicitly to be clear which are passed through this._document = documents.createWrapper(window, { parsingMode: options.parsingMode, contentType: options.contentType, encoding: options.encoding, cookieJar: options.cookieJar, url: options.url, lastModified: options.lastModified, referrer: options.referrer, parseOptions: options.parseOptions, defaultView: this._globalProxy, global: this, parentOrigin: options.parentOrigin }, { alwaysUseDocumentClass: true }); if (vm.isContext(window)) { const documentImpl = idlUtils.implForWrapper(window._document); documentImpl._defaultView = window._globalProxy = vm.runInContext("this", window); } const documentOrigin = idlUtils.implForWrapper(this._document)._origin; this._origin = documentOrigin; // https://html.spec.whatwg.org/#session-history this._sessionHistory = new SessionHistory({ document: idlUtils.implForWrapper(this._document), url: idlUtils.implForWrapper(this._document)._URL, stateObject: null }, this); this._virtualConsole = options.virtualConsole; this._runScripts = options.runScripts; // Set up the window as if it's a top level window. // If it's not, then references will be corrected by frame/iframe code. this._parent = this._top = this._globalProxy; this._frameElement = null; // This implements window.frames.length, since window.frames returns a // self reference to the window object. This value is incremented in the // HTMLFrameElement implementation. this._length = 0; // https://dom.spec.whatwg.org/#window-current-event this._currentEvent = undefined; this._pretendToBeVisual = options.pretendToBeVisual; this._storageQuota = options.storageQuota; // Some properties (such as localStorage and sessionStorage) share data // between windows in the same origin. This object is intended // to contain such data. if (options.commonForOrigin && options.commonForOrigin[documentOrigin]) { this._commonForOrigin = options.commonForOrigin; } else { this._commonForOrigin = { [documentOrigin]: { localStorageArea: new Map(), sessionStorageArea: new Map(), windowsInSameOrigin: [this] } }; } this._currentOriginData = this._commonForOrigin[documentOrigin]; // ### WEB STORAGE this._localStorage = Storage.create(window, [], { associatedWindow: this, storageArea: this._currentOriginData.localStorageArea, type: "localStorage", url: this._document.documentURI, storageQuota: this._storageQuota }); this._sessionStorage = Storage.create(window, [], { associatedWindow: this, storageArea: this._currentOriginData.sessionStorageArea, type: "sessionStorage", url: this._document.documentURI, storageQuota: this._storageQuota }); // ### SELECTION // https://w3c.github.io/selection-api/#dfn-selection this._selection = Selection.createImpl(window); // https://w3c.github.io/selection-api/#dom-window this.getSelection = function () { return window._selection; }; // ### GETTERS const locationbar = BarProp.create(window); const menubar = BarProp.create(window); const personalbar = BarProp.create(window); const scrollbars = BarProp.create(window); const statusbar = BarProp.create(window); const toolbar = BarProp.create(window); const external = External.create(window); const navigator = Navigator.create(window, [], { userAgent: this._resourceLoader._userAgent }); const performance = Performance.create(window, [], { rawPerformance }); const screen = Screen.create(window); const customElementRegistry = CustomElementRegistry.create(window); define(this, { get length() { return window._length; }, get window() { return window._globalProxy; }, get frameElement() { return idlUtils.wrapperForImpl(window._frameElement); }, get frames() { return window._globalProxy; }, get self() { return window._globalProxy; }, get parent() { return window._parent; }, get top() { return window._top; }, get document() { return window._document; }, get external() { return external; }, get location() { return idlUtils.wrapperForImpl(idlUtils.implForWrapper(window._document)._location); }, get history() { return idlUtils.wrapperForImpl(idlUtils.implForWrapper(window._document)._history); }, get navigator() { return navigator; }, get locationbar() { return locationbar; }, get menubar() { return menubar; }, get personalbar() { return personalbar; }, get scrollbars() { return scrollbars; }, get statusbar() { return statusbar; }, get toolbar() { return toolbar; }, get performance() { return performance; }, get screen() { return screen; }, get origin() { return window._origin; }, // The origin IDL attribute is defined with [Replaceable]. set origin(value) { Object.defineProperty(this, "origin", { value, writable: true, enumerable: true, configurable: true }); }, get localStorage() { if (idlUtils.implForWrapper(this._document)._origin === "null") { throw DOMException.create(window, [ "localStorage is not available for opaque origins", "SecurityError" ]); } return this._localStorage; }, get sessionStorage() { if (idlUtils.implForWrapper(this._document)._origin === "null") { throw DOMException.create(window, [ "sessionStorage is not available for opaque origins", "SecurityError" ]); } return this._sessionStorage; }, get customElements() { return customElementRegistry; }, get event() { return window._currentEvent ? idlUtils.wrapperForImpl(window._currentEvent) : undefined; }, set event(value) { Object.defineProperty(window, "event", { configurable: true, enumerable: true, writable: true, value }); } }); namedPropertiesWindow.initializeWindow(this, this._globalProxy); // ### METHODS // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers // In the spec the list of active timers is a set of IDs. We make it a map of IDs to Node.js timer objects, so that // we can call Node.js-side clearTimeout() when clearing, and thus allow process shutdown faster. const listOfActiveTimers = new Map(); let latestTimerId = 0; this.setTimeout = function (handler, timeout = 0, ...args) { if (typeof handler !== "function") { handler = webIDLConversions.DOMString(handler); } timeout = webIDLConversions.long(timeout); return timerInitializationSteps(handler, timeout, args, { methodContext: window, repeat: false }); }; this.setInterval = function (handler, timeout = 0, ...args) { if (typeof handler !== "function") { handler = webIDLConversions.DOMString(handler); } timeout = webIDLConversions.long(timeout); return timerInitializationSteps(handler, timeout, args, { methodContext: window, repeat: true }); }; this.clearTimeout = function (handle = 0) { handle = webIDLConversions.long(handle); const nodejsTimer = listOfActiveTimers.get(handle); if (nodejsTimer) { clearTimeout(nodejsTimer); listOfActiveTimers.delete(handle); } }; this.clearInterval = function (handle = 0) { handle = webIDLConversions.long(handle); const nodejsTimer = listOfActiveTimers.get(handle); if (nodejsTimer) { // We use setTimeout() in timerInitializationSteps even for this.setInterval(). clearTimeout(nodejsTimer); listOfActiveTimers.delete(handle); } }; function timerInitializationSteps(handler, timeout, args, { methodContext, repeat, previousHandle }) { // This appears to be unspecced, but matches browser behavior for close()ed windows. if (!methodContext._document) { return 0; } // TODO: implement timer nesting level behavior. const methodContextProxy = methodContext._globalProxy; const handle = previousHandle !== undefined ? previousHandle : ++latestTimerId; function task() { if (!listOfActiveTimers.has(handle)) { return; } try { if (typeof handler === "function") { handler.apply(methodContextProxy, args); } else if (window._runScripts === "dangerously") { vm.runInContext(handler, window, { filename: window.location.href, displayErrors: false }); } } catch (e) { reportException(window, e, window.location.href); } if (listOfActiveTimers.has(handle)) { if (repeat) { timerInitializationSteps(handler, timeout, args, { methodContext, repeat: true, previousHandle: handle }); } else { listOfActiveTimers.delete(handle); } } } if (timeout < 0) { timeout = 0; } const nodejsTimer = setTimeout(task, timeout); listOfActiveTimers.set(handle, nodejsTimer); return handle; } // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing this.queueMicrotask = function (callback) { callback = webIDLConversions.Function(callback); anyNodeVersionQueueMicrotask(() => { try { callback(); } catch (e) { reportException(window, e, window.location.href); } }); }; // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames let animationFrameCallbackId = 0; const mapOfAnimationFrameCallbacks = new Map(); let animationFrameNodejsInterval = null; // Unlike the spec, where an animation frame happens every 60 Hz regardless, we optimize so that if there are no // requestAnimationFrame() calls outstanding, we don't fire the timer. This helps us track that. let numberOfOngoingAnimationFrameCallbacks = 0; if (this._pretendToBeVisual) { this.requestAnimationFrame = function (callback) { callback = webIDLConversions.Function(callback); const handle = ++animationFrameCallbackId; mapOfAnimationFrameCallbacks.set(handle, callback); ++numberOfOngoingAnimationFrameCallbacks; if (numberOfOngoingAnimationFrameCallbacks === 1) { animationFrameNodejsInterval = setInterval(() => { runAnimationFrameCallbacks(rawPerformance.now() - windowInitialized); }, 1000 / 60); } return handle; }; this.cancelAnimationFrame = function (handle) { handle = webIDLConversions["unsigned long"](handle); removeAnimationFrameCallback(handle); }; function runAnimationFrameCallbacks(now) { // Converting to an array is important to get a sync snapshot and thus match spec semantics. const callbackHandles = [...mapOfAnimationFrameCallbacks.keys()]; for (const handle of callbackHandles) { // This has() can be false if a callback calls cancelAnimationFrame(). if (mapOfAnimationFrameCallbacks.has(handle)) { const callback = mapOfAnimationFrameCallbacks.get(handle); removeAnimationFrameCallback(handle); try { callback(now); } catch (e) { reportException(window, e, window.location.href); } } } } function removeAnimationFrameCallback(handle) { if (mapOfAnimationFrameCallbacks.has(handle)) { --numberOfOngoingAnimationFrameCallbacks; if (numberOfOngoingAnimationFrameCallbacks === 0) { clearInterval(animationFrameNodejsInterval); } } mapOfAnimationFrameCallbacks.delete(handle); } } function stopAllTimers() { for (const nodejsTimer of listOfActiveTimers.values()) { clearTimeout(nodejsTimer); } listOfActiveTimers.clear(); clearInterval(animationFrameNodejsInterval); } function Option(text, value, defaultSelected, selected) { if (text === undefined) { text = ""; } text = webIDLConversions.DOMString(text); if (value !== undefined) { value = webIDLConversions.DOMString(value); } defaultSelected = webIDLConversions.boolean(defaultSelected); selected = webIDLConversions.boolean(selected); const option = window._document.createElement("option"); const impl = idlUtils.implForWrapper(option); if (text !== "") { impl.text = text; } if (value !== undefined) { impl.setAttributeNS(null, "value", value); } if (defaultSelected) { impl.setAttributeNS(null, "selected", ""); } impl._selectedness = selected; return option; } Object.defineProperty(Option, "prototype", { value: this.HTMLOptionElement.prototype, configurable: false, enumerable: false, writable: false }); Object.defineProperty(window, "Option", { value: Option, configurable: true, enumerable: false, writable: true }); function Image(...args) { const img = window._document.createElement("img"); const impl = idlUtils.implForWrapper(img); if (args.length > 0) { impl.setAttributeNS(null, "width", String(args[0])); } if (args.length > 1) { impl.setAttributeNS(null, "height", String(args[1])); } return img; } Object.defineProperty(Image, "prototype", { value: this.HTMLImageElement.prototype, configurable: false, enumerable: false, writable: false }); Object.defineProperty(window, "Image", { value: Image, configurable: true, enumerable: false, writable: true }); function Audio(src) { const audio = window._document.createElement("audio"); const impl = idlUtils.implForWrapper(audio); impl.setAttributeNS(null, "preload", "auto"); if (src !== undefined) { impl.setAttributeNS(null, "src", String(src)); } return audio; } Object.defineProperty(Audio, "prototype", { value: this.HTMLAudioElement.prototype, configurable: false, enumerable: false, writable: false }); Object.defineProperty(window, "Audio", { value: Audio, configurable: true, enumerable: false, writable: true }); this.postMessage = postMessage(window); this.atob = function (str) { const result = atob(str); if (result === null) { throw DOMException.create(window, [ "The string to be decoded contains invalid characters.", "InvalidCharacterError" ]); } return result; }; this.btoa = function (str) { const result = btoa(str); if (result === null) { throw DOMException.create(window, [ "The string to be encoded contains invalid characters.", "InvalidCharacterError" ]); } return result; }; this.stop = function () { const manager = idlUtils.implForWrapper(this._document)._requestManager; if (manager) { manager.close(); } }; this.close = function () { // Recursively close child frame windows, then ourselves (depth-first). for (let i = 0; i < this.length; ++i) { this[i].close(); } // Clear out all listeners. Any in-flight or upcoming events should not get delivered. idlUtils.implForWrapper(this)._eventListeners = Object.create(null); if (this._document) { if (this._document.body) { this._document.body.innerHTML = ""; } if (this._document.close) { // It's especially important to clear out the listeners here because document.close() causes a "load" event to // fire. idlUtils.implForWrapper(this._document)._eventListeners = Object.create(null); this._document.close(); } const doc = idlUtils.implForWrapper(this._document); if (doc._requestManager) { doc._requestManager.close(); } delete this._document; } stopAllTimers(); WebSocketImpl.cleanUpWindow(this); }; this.getComputedStyle = function (elt, pseudoElt = undefined) { elt = Element.convert(elt); if (pseudoElt !== undefined && pseudoElt !== null) { pseudoElt = webIDLConversions.DOMString(pseudoElt); } if (pseudoElt !== undefined && pseudoElt !== null && pseudoElt !== "") { // TODO: Parse pseudoElt if (SHADOW_DOM_PSEUDO_REGEXP.test(pseudoElt)) { throw new TypeError("Tried to get the computed style of a Shadow DOM pseudo-element."); } notImplemented("window.computedStyle(elt, pseudoElt)", this); } const declaration = new CSSStyleDeclaration(); const { forEach } = Array.prototype; const { style } = elt; forEachMatchingSheetRuleOfElement(elt, rule => { forEach.call(rule.style, property => { declaration.setProperty( property, rule.style.getPropertyValue(property), rule.style.getPropertyPriority(property) ); }); }); // https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle const declarations = Object.keys(propertiesWithResolvedValueImplemented); forEach.call(declarations, property => { declaration.setProperty(property, getResolvedValue(elt, property)); }); forEach.call(style, property => { declaration.setProperty(property, style.getPropertyValue(property), style.getPropertyPriority(property)); }); return declaration; }; this.getSelection = function () { return window._document.getSelection(); }; // The captureEvents() and releaseEvents() methods must do nothing this.captureEvents = function () {}; this.releaseEvents = function () {}; // ### PUBLIC DATA PROPERTIES (TODO: should be getters) function wrapConsoleMethod(method) { return (...args) => { window._virtualConsole.emit(method, ...args); }; } this.console = { assert: wrapConsoleMethod("assert"), clear: wrapConsoleMethod("clear"), count: wrapConsoleMethod("count"), countReset: wrapConsoleMethod("countReset"), debug: wrapConsoleMethod("debug"), dir: wrapConsoleMethod("dir"), dirxml: wrapConsoleMethod("dirxml"), error: wrapConsoleMethod("error"), group: wrapConsoleMethod("group"), groupCollapsed: wrapConsoleMethod("groupCollapsed"), groupEnd: wrapConsoleMethod("groupEnd"), info: wrapConsoleMethod("info"), log: wrapConsoleMethod("log"), table: wrapConsoleMethod("table"), time: wrapConsoleMethod("time"), timeLog: wrapConsoleMethod("timeLog"), timeEnd: wrapConsoleMethod("timeEnd"), trace: wrapConsoleMethod("trace"), warn: wrapConsoleMethod("warn") }; function notImplementedMethod(name) { return function () { notImplemented(name, window); }; } define(this, { name: "", status: "", devicePixelRatio: 1, innerWidth: 1024, innerHeight: 768, outerWidth: 1024, outerHeight: 768, pageXOffset: 0, pageYOffset: 0, screenX: 0, screenLeft: 0, screenY: 0, screenTop: 0, scrollX: 0, scrollY: 0, alert: notImplementedMethod("window.alert"), blur: notImplementedMethod("window.blur"), confirm: notImplementedMethod("window.confirm"), focus: notImplementedMethod("window.focus"), moveBy: notImplementedMethod("window.moveBy"), moveTo: notImplementedMethod("window.moveTo"), open: notImplementedMethod("window.open"), print: notImplementedMethod("window.print"), prompt: notImplementedMethod("window.prompt"), resizeBy: notImplementedMethod("window.resizeBy"), resizeTo: notImplementedMethod("window.resizeTo"), scroll: notImplementedMethod("window.scroll"), scrollBy: notImplementedMethod("window.scrollBy"), scrollTo: notImplementedMethod("window.scrollTo") }); // ### INITIALIZATION process.nextTick(() => { if (!window.document) { return; // window might've been closed already } const documentImpl = idlUtils.implForWrapper(window._document); if (window.document.readyState === "complete") { fireAnEvent("load", window, undefined, {}, documentImpl); } else { window.document.addEventListener("load", () => { fireAnEvent("load", window, undefined, {}, documentImpl); if (!documentImpl._pageShowingFlag) { documentImpl._pageShowingFlag = true; fireAnEvent("pageshow", window, PageTransitionEvent, { persisted: false }, documentImpl); } }); } }); } function contextifyWindow(window) { if (vm.isContext(window)) { return; } vm.createContext(window); } /***/ }), /***/ 89489: /***/ ((module) => { // Ideally, we would use // https://html.spec.whatwg.org/multipage/rendering.html#the-css-user-agent-style-sheet-and-presentational-hints // but for now, just use the version from blink. This file is copied from // https://chromium.googlesource.com/chromium/blink/+/96aa3a280ab7d67178c8f122a04949ce5f8579e0/Source/core/css/html.css // (removed a line which had octal literals inside since octal literals are not allowed in template strings) // We use a .js file because otherwise we can't browserify this. (brfs is unusable due to lack of ES2015 support) module.exports = ` /* * The default style sheet used to render HTML. * * Copyright (C) 2000 Lars Knoll (knoll@kde.org) * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ @namespace "http://www.w3.org/1999/xhtml"; html { display: block } :root { scroll-blocks-on: start-touch wheel-event } /* children of the element all have display:none */ head { display: none } meta { display: none } title { display: none } link { display: none } style { display: none } script { display: none } /* generic block-level elements */ body { display: block; margin: 8px } p { display: block; -webkit-margin-before: 1__qem; -webkit-margin-after: 1__qem; -webkit-margin-start: 0; -webkit-margin-end: 0; } div { display: block } layer { display: block } article, aside, footer, header, hgroup, main, nav, section { display: block } marquee { display: inline-block; } address { display: block } blockquote { display: block; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 40px; -webkit-margin-end: 40px; } figcaption { display: block } figure { display: block; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 40px; -webkit-margin-end: 40px; } q { display: inline } /* nwmatcher does not support ::before and ::after, so we can't render q correctly: https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3 TODO: add q::before and q::after selectors */ center { display: block; /* special centering to be able to emulate the html4/netscape behaviour */ text-align: -webkit-center } hr { display: block; -webkit-margin-before: 0.5em; -webkit-margin-after: 0.5em; -webkit-margin-start: auto; -webkit-margin-end: auto; border-style: inset; border-width: 1px; box-sizing: border-box } map { display: inline } video { object-fit: contain; } /* heading elements */ h1 { display: block; font-size: 2em; -webkit-margin-before: 0.67__qem; -webkit-margin-after: 0.67em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } article h1, aside h1, nav h1, section h1 { font-size: 1.5em; -webkit-margin-before: 0.83__qem; -webkit-margin-after: 0.83em; } article article h1, article aside h1, article nav h1, article section h1, aside article h1, aside aside h1, aside nav h1, aside section h1, nav article h1, nav aside h1, nav nav h1, nav section h1, section article h1, section aside h1, section nav h1, section section h1 { font-size: 1.17em; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; } /* Remaining selectors are deleted because nwmatcher does not support :matches() and expanding the selectors manually would be far too verbose. Also see https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings TODO: rewrite to use :matches() when nwmatcher supports it. */ h2 { display: block; font-size: 1.5em; -webkit-margin-before: 0.83__qem; -webkit-margin-after: 0.83em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h3 { display: block; font-size: 1.17em; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h4 { display: block; -webkit-margin-before: 1.33__qem; -webkit-margin-after: 1.33em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h5 { display: block; font-size: .83em; -webkit-margin-before: 1.67__qem; -webkit-margin-after: 1.67em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } h6 { display: block; font-size: .67em; -webkit-margin-before: 2.33__qem; -webkit-margin-after: 2.33em; -webkit-margin-start: 0; -webkit-margin-end: 0; font-weight: bold } /* tables */ table { display: table; border-collapse: separate; border-spacing: 2px; border-color: gray } thead { display: table-header-group; vertical-align: middle; border-color: inherit } tbody { display: table-row-group; vertical-align: middle; border-color: inherit } tfoot { display: table-footer-group; vertical-align: middle; border-color: inherit } /* for tables without table section elements (can happen with XHTML or dynamically created tables) */ table > tr { vertical-align: middle; } col { display: table-column } colgroup { display: table-column-group } tr { display: table-row; vertical-align: inherit; border-color: inherit } td, th { display: table-cell; vertical-align: inherit } th { font-weight: bold } caption { display: table-caption; text-align: -webkit-center } /* lists */ ul, menu, dir { display: block; list-style-type: disc; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; -webkit-padding-start: 40px } ol { display: block; list-style-type: decimal; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; -webkit-padding-start: 40px } li { display: list-item; text-align: -webkit-match-parent; } ul ul, ol ul { list-style-type: circle } ol ol ul, ol ul ul, ul ol ul, ul ul ul { list-style-type: square } dd { display: block; -webkit-margin-start: 40px } dl { display: block; -webkit-margin-before: 1__qem; -webkit-margin-after: 1em; -webkit-margin-start: 0; -webkit-margin-end: 0; } dt { display: block } ol ul, ul ol, ul ul, ol ol { -webkit-margin-before: 0; -webkit-margin-after: 0 } /* form elements */ form { display: block; margin-top: 0__qem; } label { cursor: default; } legend { display: block; -webkit-padding-start: 2px; -webkit-padding-end: 2px; border: none } fieldset { display: block; -webkit-margin-start: 2px; -webkit-margin-end: 2px; -webkit-padding-before: 0.35em; -webkit-padding-start: 0.75em; -webkit-padding-end: 0.75em; -webkit-padding-after: 0.625em; border: 2px groove ThreeDFace; min-width: -webkit-min-content; } button { -webkit-appearance: button; } /* Form controls don't go vertical. */ input, textarea, select, button, meter, progress { -webkit-writing-mode: horizontal-tb !important; } input, textarea, select, button { margin: 0__qem; font: -webkit-small-control; text-rendering: auto; /* FIXME: Remove when tabs work with optimizeLegibility. */ color: initial; letter-spacing: normal; word-spacing: normal; line-height: normal; text-transform: none; text-indent: 0; text-shadow: none; display: inline-block; text-align: start; } /* TODO: Add " i" to attribute matchers to support case-insensitive matching */ input[type="hidden"] { display: none } input { -webkit-appearance: textfield; padding: 1px; background-color: white; border: 2px inset; -webkit-rtl-ordering: logical; -webkit-user-select: text; cursor: auto; } input[type="search"] { -webkit-appearance: searchfield; box-sizing: border-box; } select { border-radius: 5px; } textarea { -webkit-appearance: textarea; background-color: white; border: 1px solid; -webkit-rtl-ordering: logical; -webkit-user-select: text; flex-direction: column; resize: auto; cursor: auto; padding: 2px; white-space: pre-wrap; word-wrap: break-word; } input[type="password"] { -webkit-text-security: disc !important; } input[type="hidden"], input[type="image"], input[type="file"] { -webkit-appearance: initial; padding: initial; background-color: initial; border: initial; } input[type="file"] { align-items: baseline; color: inherit; text-align: start !important; } input[type="radio"], input[type="checkbox"] { margin: 3px 0.5ex; padding: initial; background-color: initial; border: initial; } input[type="button"], input[type="submit"], input[type="reset"] { -webkit-appearance: push-button; -webkit-user-select: none; white-space: pre } input[type="button"], input[type="submit"], input[type="reset"], button { align-items: flex-start; text-align: center; cursor: default; color: ButtonText; padding: 2px 6px 3px 6px; border: 2px outset ButtonFace; background-color: ButtonFace; box-sizing: border-box } input[type="range"] { -webkit-appearance: slider-horizontal; padding: initial; border: initial; margin: 2px; color: #909090; } input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, button:disabled, select:disabled, optgroup:disabled, option:disabled, select[disabled]>option { color: GrayText } input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, button:active { border-style: inset } input[type="button"]:active:disabled, input[type="submit"]:active:disabled, input[type="reset"]:active:disabled, button:active:disabled { border-style: outset } datalist { display: none } area { display: inline; cursor: pointer; } param { display: none } input[type="checkbox"] { -webkit-appearance: checkbox; box-sizing: border-box; } input[type="radio"] { -webkit-appearance: radio; box-sizing: border-box; } input[type="color"] { -webkit-appearance: square-button; width: 44px; height: 23px; background-color: ButtonFace; /* Same as native_theme_base. */ border: 1px #a9a9a9 solid; padding: 1px 2px; } input[type="color"][list] { -webkit-appearance: menulist; width: 88px; height: 23px } select { -webkit-appearance: menulist; box-sizing: border-box; align-items: center; border: 1px solid; white-space: pre; -webkit-rtl-ordering: logical; color: black; background-color: white; cursor: default; } optgroup { font-weight: bolder; display: block; } option { font-weight: normal; display: block; padding: 0 2px 1px 2px; white-space: pre; min-height: 1.2em; } output { display: inline; } /* meter */ meter { -webkit-appearance: meter; box-sizing: border-box; display: inline-block; height: 1em; width: 5em; vertical-align: -0.2em; } /* progress */ progress { -webkit-appearance: progress-bar; box-sizing: border-box; display: inline-block; height: 1em; width: 10em; vertical-align: -0.2em; } /* inline elements */ u, ins { text-decoration: underline } strong, b { font-weight: bold } i, cite, em, var, address, dfn { font-style: italic } tt, code, kbd, samp { font-family: monospace } pre, xmp, plaintext, listing { display: block; font-family: monospace; white-space: pre; margin: 1__qem 0 } mark { background-color: yellow; color: black } big { font-size: larger } small { font-size: smaller } s, strike, del { text-decoration: line-through } sub { vertical-align: sub; font-size: smaller } sup { vertical-align: super; font-size: smaller } nobr { white-space: nowrap } /* states */ :focus { outline: auto 5px -webkit-focus-ring-color } /* Read-only text fields do not show a focus ring but do still receive focus */ html:focus, body:focus, input[readonly]:focus { outline: none } embed:focus, iframe:focus, object:focus { outline: none } input:focus, textarea:focus, select:focus { outline-offset: -2px } input[type="button"]:focus, input[type="checkbox"]:focus, input[type="file"]:focus, input[type="hidden"]:focus, input[type="image"]:focus, input[type="radio"]:focus, input[type="reset"]:focus, input[type="search"]:focus, input[type="submit"]:focus { outline-offset: 0 } /* HTML5 ruby elements */ ruby, rt { text-indent: 0; /* blocks used for ruby rendering should not trigger this */ } rt { line-height: normal; -webkit-text-emphasis: none; } ruby > rt { display: block; font-size: 50%; text-align: start; } ruby > rp { display: none; } /* other elements */ noframes { display: none } frameset, frame { display: block } frameset { border-color: inherit } iframe { border: 2px inset } details { display: block } summary { display: block } template { display: none } bdi, output { unicode-bidi: -webkit-isolate; } bdo { unicode-bidi: bidi-override; } textarea[dir=auto] { unicode-bidi: -webkit-plaintext; } dialog:not([open]) { display: none } dialog { position: absolute; left: 0; right: 0; width: -webkit-fit-content; height: -webkit-fit-content; margin: auto; border: solid; padding: 1em; background: white; color: black } [hidden] { display: none } /* noscript is handled internally, as it depends on settings. */ `; /***/ }), /***/ 42751: /***/ ((module) => { "use strict"; module.exports = function (nameForErrorMessage, window) { if (!window) { // Do nothing for window-less documents. return; } const error = new Error(`Not implemented: ${nameForErrorMessage}`); error.type = "not implemented"; window._virtualConsole.emit("jsdomError", error); }; /***/ }), /***/ 53601: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const parse5 = __webpack_require__(65598); const { createElement } = __webpack_require__(98548); const { HTML_NS } = __webpack_require__(52635); const DocumentType = __webpack_require__(53193); const DocumentFragment = __webpack_require__(11490); const Text = __webpack_require__(49374); const Comment = __webpack_require__(56625); const attributes = __webpack_require__(35092); const nodeTypes = __webpack_require__(10656); const serializationAdapter = __webpack_require__(19756); const { customElementReactionsStack, invokeCEReactions, lookupCEDefinition } = __webpack_require__(25392); // Horrible monkey-patch to implement https://github.com/inikulin/parse5/issues/237 and // https://github.com/inikulin/parse5/issues/285. const OpenElementStack = __webpack_require__(64813); const openElementStackOriginalPush = OpenElementStack.prototype.push; OpenElementStack.prototype.push = function (...args) { openElementStackOriginalPush.apply(this, args); this.treeAdapter._currentElement = this.current; const after = this.items[this.stackTop]; if (after._pushedOnStackOfOpenElements) { after._pushedOnStackOfOpenElements(); } }; const openElementStackOriginalPop = OpenElementStack.prototype.pop; OpenElementStack.prototype.pop = function (...args) { const before = this.items[this.stackTop]; openElementStackOriginalPop.apply(this, args); this.treeAdapter._currentElement = this.current; if (before._poppedOffStackOfOpenElements) { before._poppedOffStackOfOpenElements(); } }; class JSDOMParse5Adapter { constructor(documentImpl, options = {}) { this._documentImpl = documentImpl; this._globalObject = documentImpl._globalObject; this._fragment = options.fragment || false; // Since the createElement hook doesn't provide the parent element, we keep track of this using _currentElement: // https://github.com/inikulin/parse5/issues/285. See above horrible monkey-patch for how this is maintained. this._currentElement = undefined; } _ownerDocument() { const { _currentElement } = this; // The _currentElement is undefined when parsing elements at the root of the document. if (_currentElement) { return _currentElement.localName === "template" && _currentElement.namespaceURI === HTML_NS ? _currentElement.content._ownerDocument : _currentElement._ownerDocument; } return this._documentImpl; } createDocument() { // parse5's model assumes that parse(html) will call into here to create the new Document, then return it. However, // jsdom's model assumes we can create a Window (and through that create an empty Document), do some other setup // stuff, and then parse, stuffing nodes into that Document as we go. So to adapt between these two models, we just // return the already-created Document when asked by parse5 to "create" a Document. return this._documentImpl; } createDocumentFragment() { const ownerDocument = this._ownerDocument(); return DocumentFragment.createImpl(this._globalObject, [], { ownerDocument }); } // https://html.spec.whatwg.org/#create-an-element-for-the-token createElement(localName, namespace, attrs) { const ownerDocument = this._ownerDocument(); const isAttribute = attrs.find(attr => attr.name === "is"); const isValue = isAttribute ? isAttribute.value : null; const definition = lookupCEDefinition(ownerDocument, namespace, localName); let willExecuteScript = false; if (definition !== null && !this._fragment) { willExecuteScript = true; } if (willExecuteScript) { ownerDocument._throwOnDynamicMarkupInsertionCounter++; customElementReactionsStack.push([]); } const element = createElement(ownerDocument, localName, namespace, null, isValue, willExecuteScript); this.adoptAttributes(element, attrs); if (willExecuteScript) { const queue = customElementReactionsStack.pop(); invokeCEReactions(queue); ownerDocument._throwOnDynamicMarkupInsertionCounter--; } if ("_parserInserted" in element) { element._parserInserted = true; } return element; } createCommentNode(data) { const ownerDocument = this._ownerDocument(); return Comment.createImpl(this._globalObject, [], { data, ownerDocument }); } appendChild(parentNode, newNode) { parentNode._append(newNode); } insertBefore(parentNode, newNode, referenceNode) { parentNode._insert(newNode, referenceNode); } setTemplateContent(templateElement, contentFragment) { // This code makes the glue between jsdom and parse5 HTMLTemplateElement parsing: // // * jsdom during the construction of the HTMLTemplateElement (for example when create via // `document.createElement("template")`), creates a DocumentFragment and set it into _templateContents. // * parse5 when parsing a