require('./sourcemap-register.js');module.exports = /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 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()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(42186)); const model_1 = __webpack_require__(41359); function run() { 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); if (buildParameters.kubeConfig) { core.info('Building with Kubernetes'); yield model_1.Kubernetes.runBuildJob(buildParameters, baseImage); } else { // Build docker image // TODO: No image required (instead use a version published to dockerhub for the action, supply credentials for github cloning) const 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); } }); } run(); /***/ }), /***/ 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']; } 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() { return `${Action.actionFolder}/Dockerfile`; } 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) { 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 >= 1000000000) { 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; } } exports.default = AndroidVersioning; /***/ }), /***/ 80787: /***/ (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 android_versioning_1 = __importDefault(__webpack_require__(43059)); 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); return { version: unityVersion, customImage: input_1.default.customImage, 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, customParameters: input_1.default.customParameters, kubeConfig: input_1.default.kubeConfig, githubToken: input_1.default.githubToken, kubeContainerMemory: input_1.default.kubeContainerMemory, kubeContainerCPU: input_1.default.kubeContainerCPU, kubeVolumeSize: input_1.default.kubeVolumeSize, kubeVolume: input_1.default.kubeVolume, }; }); } 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; } } 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; /***/ }), /***/ 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)); 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 { version, workspace, runnerTempPath, platform, projectPath, buildName, buildPath, buildFile, buildMethod, buildVersion, androidVersionCode, androidKeystoreName, androidKeystoreBase64, androidKeystorePass, androidKeyaliasName, androidKeyaliasPass, customParameters, } = parameters; const command = `docker run \ --workdir /github/workspace \ --rm \ --env UNITY_LICENSE \ --env UNITY_LICENSE_FILE \ --env UNITY_EMAIL \ --env UNITY_PASSWORD \ --env UNITY_SERIAL \ --env UNITY_VERSION="${version}" \ --env PROJECT_PATH="${projectPath}" \ --env BUILD_TARGET="${platform}" \ --env BUILD_NAME="${buildName}" \ --env BUILD_PATH="${buildPath}" \ --env BUILD_FILE="${buildFile}" \ --env BUILD_METHOD="${buildMethod}" \ --env VERSION="${buildVersion}" \ --env ANDROID_VERSION_CODE="${androidVersionCode}" \ --env ANDROID_KEYSTORE_NAME="${androidKeystoreName}" \ --env ANDROID_KEYSTORE_BASE64="${androidKeystoreBase64}" \ --env ANDROID_KEYSTORE_PASS="${androidKeystorePass}" \ --env ANDROID_KEYALIAS_NAME="${androidKeyaliasName}" \ --env ANDROID_KEYALIAS_PASS="${androidKeyaliasPass}" \ --env CUSTOM_PARAMETERS="${customParameters}" \ --env GITHUB_REF \ --env GITHUB_SHA \ --env GITHUB_REPOSITORY \ --env GITHUB_ACTOR \ --env GITHUB_WORKFLOW \ --env GITHUB_HEAD_REF \ --env GITHUB_BASE_REF \ --env GITHUB_EVENT_NAME \ --env GITHUB_WORKSPACE=/github/workspace \ --env GITHUB_ACTION \ --env GITHUB_EVENT_PATH \ --env RUNNER_OS \ --env RUNNER_TOOL_CACHE \ --env RUNNER_TEMP \ --env RUNNER_WORKSPACE \ --volume "/var/run/docker.sock":"/var/run/docker.sock" \ --volume "${runnerTempPath}/_github_home":"/root" \ --volume "${runnerTempPath}/_github_workflow":"/github/workflow" \ --volume "${workspace}":"/github/workspace" \ ${image}`; yield exec_1.exec(command, undefined, { silent }); }); } } 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; /***/ }), /***/ 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', linux: 'base', linuxIl2cpp: 'linux-il2cpp', android: 'android', ios: 'ios', facebook: 'facebook', }; } static getTargetPlatformToImageSuffixMap(platform, version) { const { generic, webgl, mac, windows, linux, linuxIl2cpp, android, ios, 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: return windows; case platform_1.default.types.StandaloneWindows64: 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: return windows; case platform_1.default.types.PS4: return windows; case platform_1.default.types.XboxOne: return windows; case platform_1.default.types.tvOS: return windows; 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() { return `${this.version}-${this.builderPlatform}`.replace(/-+$/, ''); } 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.Kubernetes = 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 kubernetes_1 = __importDefault(__webpack_require__(7352)); exports.Kubernetes = kubernetes_1.default; /***/ }), /***/ 91933: /***/ (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)); 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 { static get unityVersion() { return core.getInput('unityVersion') || 'auto'; } static get customImage() { return core.getInput('customImage'); } static get targetPlatform() { return core.getInput('targetPlatform') || platform_1.default.default; } static get projectPath() { const rawProjectPath = core.getInput('projectPath') || '.'; return rawProjectPath.replace(/\/$/, ''); } static get buildName() { return core.getInput('buildName') || this.targetPlatform; } static get buildsPath() { return core.getInput('buildsPath') || 'build'; } static get buildMethod() { return core.getInput('buildMethod'); // processed in docker file } static get versioningStrategy() { return core.getInput('versioning') || 'Semantic'; } static get specifiedVersion() { return core.getInput('version') || ''; } static get androidVersionCode() { return core.getInput('androidVersionCode'); } static get androidAppBundle() { const input = core.getInput('androidAppBundle') || false; return input === 'true'; } static get androidKeystoreName() { return core.getInput('androidKeystoreName') || ''; } static get androidKeystoreBase64() { return core.getInput('androidKeystoreBase64') || ''; } static get androidKeystorePass() { return core.getInput('androidKeystorePass') || ''; } static get androidKeyaliasName() { return core.getInput('androidKeyaliasName') || ''; } static get androidKeyaliasPass() { return core.getInput('androidKeyaliasPass') || ''; } static get allowDirtyBuild() { const input = core.getInput('allowDirtyBuild') || false; return input === 'true'; } static get customParameters() { return core.getInput('customParameters') || ''; } static get kubeConfig() { return core.getInput('kubeConfig') || ''; } static get githubToken() { return core.getInput('githubToken') || ''; } static get kubeContainerMemory() { return core.getInput('kubeContainerMemory') || '800M'; } static get kubeContainerCPU() { return core.getInput('kubeContainerCPU') || '0.25'; } static get kubeVolumeSize() { return core.getInput('kubeVolumeSize') || '5Gi'; } static get kubeVolume() { return core.getInput('kubeVolume') || ''; } } exports.default = Input; /***/ }), /***/ 7352: /***/ (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 })); // @ts-ignore const kubernetes_client_1 = __webpack_require__(98862); const request_1 = __importDefault(__webpack_require__(67002)); const core = __webpack_require__(42186); const base64 = __webpack_require__(85848); const pollInterval = 10000; class Kubernetes { static runBuildJob(buildParameters, baseImage) { return __awaiter(this, void 0, void 0, function* () { const kubeconfig = new kubernetes_client_1.KubeConfig(); kubeconfig.loadFromString(base64.decode(buildParameters.kubeConfig)); const backend = new request_1.default({ kubeconfig }); const kubeClient = new kubernetes_client_1.Client(backend); yield kubeClient.loadSpec(); const buildId = Kubernetes.uuidv4(); const pvcName = `unity-builder-pvc-${buildId}`; const secretName = `build-credentials-${buildId}`; const jobName = `unity-builder-job-${buildId}`; const namespace = 'default'; this.kubeClient = kubeClient; this.buildId = buildId; this.buildParameters = buildParameters; this.baseImage = baseImage; this.pvcName = pvcName; this.secretName = secretName; this.jobName = jobName; this.namespace = namespace; yield Kubernetes.createSecret(); yield Kubernetes.createPersistentVolumeClaim(); yield Kubernetes.scheduleBuildJob(); yield Kubernetes.watchBuildJobUntilFinished(); yield Kubernetes.cleanup(); core.setOutput('volume', pvcName); }); } static createSecret() { return __awaiter(this, void 0, void 0, function* () { const secretManifest = { apiVersion: 'v1', kind: 'Secret', metadata: { name: this.secretName, }, type: 'Opaque', data: { GITHUB_TOKEN: base64.encode(this.buildParameters.githubToken), UNITY_LICENSE: base64.encode(process.env.UNITY_LICENSE), ANDROID_KEYSTORE_BASE64: base64.encode(this.buildParameters.androidKeystoreBase64), ANDROID_KEYSTORE_PASS: base64.encode(this.buildParameters.androidKeystorePass), ANDROID_KEYALIAS_PASS: base64.encode(this.buildParameters.androidKeyaliasPass), }, }; yield this.kubeClient.api.v1.namespaces(this.namespace).secrets.post({ body: secretManifest }); }); } static createPersistentVolumeClaim() { return __awaiter(this, void 0, void 0, function* () { if (this.buildParameters.kubeVolume) { core.info(this.buildParameters.kubeVolume); this.pvcName = this.buildParameters.kubeVolume; return; } const pvcManifest = { apiVersion: 'v1', kind: 'PersistentVolumeClaim', metadata: { name: this.pvcName, }, spec: { accessModes: ['ReadWriteOnce'], volumeMode: 'Filesystem', resources: { requests: { storage: this.buildParameters.kubeVolumeSize, }, }, }, }; yield this.kubeClient.api.v1.namespaces(this.namespace).persistentvolumeclaims.post({ body: pvcManifest }); core.info('Persistent Volume created, waiting for ready state...'); yield Kubernetes.watchPersistentVolumeClaimUntilReady(); core.info('Persistent Volume ready for claims'); }); } static watchPersistentVolumeClaimUntilReady() { return __awaiter(this, void 0, void 0, function* () { yield new Promise((resolve) => setTimeout(resolve, pollInterval)); const queryResult = yield this.kubeClient.api.v1 .namespaces(this.namespace) .persistentvolumeclaims(this.pvcName) .get(); if (queryResult.body.status.phase === 'Pending') { yield Kubernetes.watchPersistentVolumeClaimUntilReady(); } }); } static scheduleBuildJob() { return __awaiter(this, void 0, void 0, function* () { core.info('Creating build job'); const jobManifest = { apiVersion: 'batch/v1', kind: 'Job', metadata: { name: this.jobName, labels: { app: 'unity-builder', }, }, spec: { template: { backoffLimit: 1, spec: { volumes: [ { name: 'data', persistentVolumeClaim: { claimName: this.pvcName, }, }, { name: 'credentials', secret: { secretName: this.secretName, }, }, ], initContainers: [ { name: 'clone', image: 'alpine/git', command: [ '/bin/sh', '-c', `apk update; apk add git-lfs; export GITHUB_TOKEN=$(cat /credentials/GITHUB_TOKEN); cd /data; git clone https://github.com/${process.env.GITHUB_REPOSITORY}.git repo; git clone https://github.com/webbertakken/unity-builder.git builder; cd repo; git checkout $GITHUB_SHA; ls`, ], volumeMounts: [ { name: 'data', mountPath: '/data', }, { name: 'credentials', mountPath: '/credentials', readOnly: true, }, ], env: [ { name: 'GITHUB_SHA', value: this.buildId, }, ], }, ], containers: [ { name: 'main', image: `${this.baseImage.toString()}`, command: [ 'bin/bash', '-c', `for f in ./credentials/*; do export $(basename $f)="$(cat $f)"; done cp -r /data/builder/action/default-build-script /UnityBuilderAction cp -r /data/builder/action/entrypoint.sh /entrypoint.sh cp -r /data/builder/action/steps /steps chmod -R +x /entrypoint.sh; chmod -R +x /steps; /entrypoint.sh; `, ], resources: { requests: { memory: this.buildParameters.kubeContainerMemory, cpu: this.buildParameters.kubeContainerCPU, }, }, env: [ { name: 'GITHUB_WORKSPACE', value: '/data/repo', }, { name: 'PROJECT_PATH', value: this.buildParameters.projectPath, }, { name: 'BUILD_PATH', value: this.buildParameters.buildPath, }, { name: 'BUILD_FILE', value: this.buildParameters.buildFile, }, { name: 'BUILD_NAME', value: this.buildParameters.buildName, }, { name: 'BUILD_METHOD', value: this.buildParameters.buildMethod, }, { name: 'CUSTOM_PARAMETERS', value: this.buildParameters.customParameters, }, { name: 'BUILD_TARGET', value: this.buildParameters.platform, }, { name: 'ANDROID_VERSION_CODE', value: this.buildParameters.androidVersionCode.toString(), }, { name: 'ANDROID_KEYSTORE_NAME', value: this.buildParameters.androidKeystoreName, }, { name: 'ANDROID_KEYALIAS_NAME', value: this.buildParameters.androidKeyaliasName, }, ], volumeMounts: [ { name: 'data', mountPath: '/data', }, { name: 'credentials', mountPath: '/credentials', readOnly: true, }, ], lifeCycle: { preStop: { exec: { command: [ 'bin/bash', '-c', `cd /data/builder/action/steps; chmod +x /return_license.sh; /return_license.sh;`, ], }, }, }, }, ], restartPolicy: 'Never', }, }, }, }; yield this.kubeClient.apis.batch.v1.namespaces(this.namespace).jobs.post({ body: jobManifest }); core.info('Job created'); }); } static watchBuildJobUntilFinished() { return __awaiter(this, void 0, void 0, function* () { let podname; let ready = false; while (!ready) { yield new Promise((resolve) => setTimeout(resolve, pollInterval)); const pods = yield this.kubeClient.api.v1.namespaces(this.namespace).pods.get(); for (let index = 0; index < pods.body.items.length; index++) { const element = pods.body.items[index]; if (element.metadata.labels['job-name'] === this.jobName && element.status.phase !== 'Pending') { core.info('Pod no longer pending'); if (element.status.phase === 'Failure') { core.error('Kubernetes job failed'); } else { ready = true; podname = element.metadata.name; } } } } core.info(`Watching build job ${podname}`); let logQueryTime; let complete = false; while (!complete) { yield new Promise((resolve) => setTimeout(resolve, pollInterval)); const podStatus = yield this.kubeClient.api.v1.namespaces(this.namespace).pod(podname).get(); if (podStatus.body.status.phase !== 'Running') { complete = true; } const logs = yield this.kubeClient.api.v1 .namespaces(this.namespace) .pod(podname) .log.get({ qs: { sinceTime: logQueryTime, timestamps: true, }, }); if (logs.body !== undefined) { const arrayOfLines = logs.body.match(/[^\n\r]+/g).reverse(); for (const element of arrayOfLines) { const [time, ...line] = element.split(' '); if (time !== logQueryTime) { core.info(line.join(' ')); } else { break; } } if (podStatus.body.status.phase === 'Failed') { throw new Error('Kubernetes job failed'); } logQueryTime = arrayOfLines[0].split(' ')[0]; } } }); } static cleanup() { return __awaiter(this, void 0, void 0, function* () { yield this.kubeClient.apis.batch.v1.namespaces(this.namespace).jobs(this.jobName).delete(); yield this.kubeClient.api.v1.namespaces(this.namespace).secrets(this.secretName).delete(); }); } static uuidv4() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { const r = Math.trunc(Math.random() * 16); const v = c === 'x' ? r : (r & 0x3) | 0x8; return v.toString(16); }); } } exports.default = Kubernetes; /***/ }), /***/ 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; /***/ }), /***/ 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 = {}) { 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 !== '') { core.debug(debug); } if (result !== '') { core.info(result); } if (error !== '') { 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 core = __importStar(__webpack_require__(42186)); 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)) { core.warning(`Could not find "${filePath}", keeping unityVersion as "auto"`); return 'auto'; } 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']); return output !== ''; }); } /** * Get the tag if there is one pointing at HEAD */ static getTag() { return __awaiter(this, void 0, void 0, function* () { return this.git(['tag', '--points-at', 'HEAD']); }); } /** * 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'), 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) { 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 _a; Object.defineProperty(exports, "__esModule", ({ value: true })); const assert_1 = __webpack_require__(42357); const fs = __webpack_require__(35747); const path = __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()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const childProcess = __webpack_require__(63129); const path = __webpack_require__(85622); const util_1 = __webpack_require__(31669); const ioUtil = __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.`); } } } try { // 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('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) { 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); } } } // return the first match for (const directory of directories) { const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions); if (filePath) { return filePath; } } return ''; } catch (err) { throw new Error(`which failed with message ${err.message}`); } }); } exports.which = which; 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"; /** * Kubernetes * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: v1.13.7 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", ({ value: true })); const localVarRequest = __webpack_require__(48699); let defaultBasePath = 'https://localhost'; // =============================================== // This file is autogenerated - Please do not edit // =============================================== /* tslint:disable:no-unused-variable */ let primitives = [ "string", "boolean", "double", "integer", "long", "float", "number", "any" ]; 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]) { return data[discriminatorProperty]; // use the type given in the discriminator } 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.toString(); } else { if (enumsMap[type]) { return data; } if (!typeMap[type]) { // in case we dont know the type return data; } // 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; } } } /** * ServiceReference holds a reference to Service.legacy.k8s.io */ class AdmissionregistrationV1beta1ServiceReference { static getAttributeTypeMap() { return AdmissionregistrationV1beta1ServiceReference.attributeTypeMap; } } AdmissionregistrationV1beta1ServiceReference.discriminator = undefined; AdmissionregistrationV1beta1ServiceReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.AdmissionregistrationV1beta1ServiceReference = AdmissionregistrationV1beta1ServiceReference; /** * WebhookClientConfig contains the information to make a TLS connection with the webhook */ class AdmissionregistrationV1beta1WebhookClientConfig { static getAttributeTypeMap() { return AdmissionregistrationV1beta1WebhookClientConfig.attributeTypeMap; } } AdmissionregistrationV1beta1WebhookClientConfig.discriminator = undefined; AdmissionregistrationV1beta1WebhookClientConfig.attributeTypeMap = [ { "name": "caBundle", "baseName": "caBundle", "type": "string" }, { "name": "service", "baseName": "service", "type": "AdmissionregistrationV1beta1ServiceReference" }, { "name": "url", "baseName": "url", "type": "string" } ]; exports.AdmissionregistrationV1beta1WebhookClientConfig = AdmissionregistrationV1beta1WebhookClientConfig; /** * ServiceReference holds a reference to Service.legacy.k8s.io */ class ApiextensionsV1beta1ServiceReference { static getAttributeTypeMap() { return ApiextensionsV1beta1ServiceReference.attributeTypeMap; } } ApiextensionsV1beta1ServiceReference.discriminator = undefined; ApiextensionsV1beta1ServiceReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.ApiextensionsV1beta1ServiceReference = ApiextensionsV1beta1ServiceReference; /** * WebhookClientConfig contains the information to make a TLS connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig. */ class ApiextensionsV1beta1WebhookClientConfig { static getAttributeTypeMap() { return ApiextensionsV1beta1WebhookClientConfig.attributeTypeMap; } } ApiextensionsV1beta1WebhookClientConfig.discriminator = undefined; ApiextensionsV1beta1WebhookClientConfig.attributeTypeMap = [ { "name": "caBundle", "baseName": "caBundle", "type": "string" }, { "name": "service", "baseName": "service", "type": "ApiextensionsV1beta1ServiceReference" }, { "name": "url", "baseName": "url", "type": "string" } ]; exports.ApiextensionsV1beta1WebhookClientConfig = ApiextensionsV1beta1WebhookClientConfig; /** * ServiceReference holds a reference to Service.legacy.k8s.io */ class ApiregistrationV1beta1ServiceReference { static getAttributeTypeMap() { return ApiregistrationV1beta1ServiceReference.attributeTypeMap; } } ApiregistrationV1beta1ServiceReference.discriminator = undefined; ApiregistrationV1beta1ServiceReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" } ]; exports.ApiregistrationV1beta1ServiceReference = ApiregistrationV1beta1ServiceReference; /** * DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. */ class AppsV1beta1Deployment { static getAttributeTypeMap() { return AppsV1beta1Deployment.attributeTypeMap; } } AppsV1beta1Deployment.discriminator = undefined; AppsV1beta1Deployment.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "AppsV1beta1DeploymentSpec" }, { "name": "status", "baseName": "status", "type": "AppsV1beta1DeploymentStatus" } ]; exports.AppsV1beta1Deployment = AppsV1beta1Deployment; /** * DeploymentCondition describes the state of a deployment at a certain point. */ class AppsV1beta1DeploymentCondition { static getAttributeTypeMap() { return AppsV1beta1DeploymentCondition.attributeTypeMap; } } AppsV1beta1DeploymentCondition.discriminator = undefined; AppsV1beta1DeploymentCondition.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" } ]; exports.AppsV1beta1DeploymentCondition = AppsV1beta1DeploymentCondition; /** * DeploymentList is a list of Deployments. */ class AppsV1beta1DeploymentList { static getAttributeTypeMap() { return AppsV1beta1DeploymentList.attributeTypeMap; } } AppsV1beta1DeploymentList.discriminator = undefined; AppsV1beta1DeploymentList.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" } ]; exports.AppsV1beta1DeploymentList = AppsV1beta1DeploymentList; /** * DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. */ class AppsV1beta1DeploymentRollback { static getAttributeTypeMap() { return AppsV1beta1DeploymentRollback.attributeTypeMap; } } AppsV1beta1DeploymentRollback.discriminator = undefined; AppsV1beta1DeploymentRollback.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "rollbackTo", "baseName": "rollbackTo", "type": "AppsV1beta1RollbackConfig" }, { "name": "updatedAnnotations", "baseName": "updatedAnnotations", "type": "{ [key: string]: string; }" } ]; exports.AppsV1beta1DeploymentRollback = AppsV1beta1DeploymentRollback; /** * DeploymentSpec is the specification of the desired behavior of the Deployment. */ class AppsV1beta1DeploymentSpec { static getAttributeTypeMap() { return AppsV1beta1DeploymentSpec.attributeTypeMap; } } AppsV1beta1DeploymentSpec.discriminator = undefined; AppsV1beta1DeploymentSpec.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": "rollbackTo", "baseName": "rollbackTo", "type": "AppsV1beta1RollbackConfig" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" }, { "name": "strategy", "baseName": "strategy", "type": "AppsV1beta1DeploymentStrategy" }, { "name": "template", "baseName": "template", "type": "V1PodTemplateSpec" } ]; exports.AppsV1beta1DeploymentSpec = AppsV1beta1DeploymentSpec; /** * DeploymentStatus is the most recently observed status of the Deployment. */ class AppsV1beta1DeploymentStatus { static getAttributeTypeMap() { return AppsV1beta1DeploymentStatus.attributeTypeMap; } } AppsV1beta1DeploymentStatus.discriminator = undefined; AppsV1beta1DeploymentStatus.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" } ]; exports.AppsV1beta1DeploymentStatus = AppsV1beta1DeploymentStatus; /** * DeploymentStrategy describes how to replace existing pods with new ones. */ class AppsV1beta1DeploymentStrategy { static getAttributeTypeMap() { return AppsV1beta1DeploymentStrategy.attributeTypeMap; } } AppsV1beta1DeploymentStrategy.discriminator = undefined; AppsV1beta1DeploymentStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "AppsV1beta1RollingUpdateDeployment" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.AppsV1beta1DeploymentStrategy = AppsV1beta1DeploymentStrategy; /** * DEPRECATED. */ class AppsV1beta1RollbackConfig { static getAttributeTypeMap() { return AppsV1beta1RollbackConfig.attributeTypeMap; } } AppsV1beta1RollbackConfig.discriminator = undefined; AppsV1beta1RollbackConfig.attributeTypeMap = [ { "name": "revision", "baseName": "revision", "type": "number" } ]; exports.AppsV1beta1RollbackConfig = AppsV1beta1RollbackConfig; /** * Spec to control the desired behavior of rolling update. */ class AppsV1beta1RollingUpdateDeployment { static getAttributeTypeMap() { return AppsV1beta1RollingUpdateDeployment.attributeTypeMap; } } AppsV1beta1RollingUpdateDeployment.discriminator = undefined; AppsV1beta1RollingUpdateDeployment.attributeTypeMap = [ { "name": "maxSurge", "baseName": "maxSurge", "type": "any" }, { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.AppsV1beta1RollingUpdateDeployment = AppsV1beta1RollingUpdateDeployment; /** * Scale represents a scaling request for a resource. */ class AppsV1beta1Scale { static getAttributeTypeMap() { return AppsV1beta1Scale.attributeTypeMap; } } AppsV1beta1Scale.discriminator = undefined; AppsV1beta1Scale.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "AppsV1beta1ScaleSpec" }, { "name": "status", "baseName": "status", "type": "AppsV1beta1ScaleStatus" } ]; exports.AppsV1beta1Scale = AppsV1beta1Scale; /** * ScaleSpec describes the attributes of a scale subresource */ class AppsV1beta1ScaleSpec { static getAttributeTypeMap() { return AppsV1beta1ScaleSpec.attributeTypeMap; } } AppsV1beta1ScaleSpec.discriminator = undefined; AppsV1beta1ScaleSpec.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" } ]; exports.AppsV1beta1ScaleSpec = AppsV1beta1ScaleSpec; /** * ScaleStatus represents the current status of a scale subresource. */ class AppsV1beta1ScaleStatus { static getAttributeTypeMap() { return AppsV1beta1ScaleStatus.attributeTypeMap; } } AppsV1beta1ScaleStatus.discriminator = undefined; AppsV1beta1ScaleStatus.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" }, { "name": "selector", "baseName": "selector", "type": "{ [key: string]: string; }" }, { "name": "targetSelector", "baseName": "targetSelector", "type": "string" } ]; exports.AppsV1beta1ScaleStatus = AppsV1beta1ScaleStatus; /** * AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead. */ class ExtensionsV1beta1AllowedFlexVolume { static getAttributeTypeMap() { return ExtensionsV1beta1AllowedFlexVolume.attributeTypeMap; } } ExtensionsV1beta1AllowedFlexVolume.discriminator = undefined; ExtensionsV1beta1AllowedFlexVolume.attributeTypeMap = [ { "name": "driver", "baseName": "driver", "type": "string" } ]; exports.ExtensionsV1beta1AllowedFlexVolume = ExtensionsV1beta1AllowedFlexVolume; /** * 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. Deprecated: use AllowedHostPath from policy API Group instead. */ class ExtensionsV1beta1AllowedHostPath { static getAttributeTypeMap() { return ExtensionsV1beta1AllowedHostPath.attributeTypeMap; } } ExtensionsV1beta1AllowedHostPath.discriminator = undefined; ExtensionsV1beta1AllowedHostPath.attributeTypeMap = [ { "name": "pathPrefix", "baseName": "pathPrefix", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" } ]; exports.ExtensionsV1beta1AllowedHostPath = ExtensionsV1beta1AllowedHostPath; /** * DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. */ class ExtensionsV1beta1Deployment { static getAttributeTypeMap() { return ExtensionsV1beta1Deployment.attributeTypeMap; } } ExtensionsV1beta1Deployment.discriminator = undefined; ExtensionsV1beta1Deployment.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "ExtensionsV1beta1DeploymentSpec" }, { "name": "status", "baseName": "status", "type": "ExtensionsV1beta1DeploymentStatus" } ]; exports.ExtensionsV1beta1Deployment = ExtensionsV1beta1Deployment; /** * DeploymentCondition describes the state of a deployment at a certain point. */ class ExtensionsV1beta1DeploymentCondition { static getAttributeTypeMap() { return ExtensionsV1beta1DeploymentCondition.attributeTypeMap; } } ExtensionsV1beta1DeploymentCondition.discriminator = undefined; ExtensionsV1beta1DeploymentCondition.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" } ]; exports.ExtensionsV1beta1DeploymentCondition = ExtensionsV1beta1DeploymentCondition; /** * DeploymentList is a list of Deployments. */ class ExtensionsV1beta1DeploymentList { static getAttributeTypeMap() { return ExtensionsV1beta1DeploymentList.attributeTypeMap; } } ExtensionsV1beta1DeploymentList.discriminator = undefined; ExtensionsV1beta1DeploymentList.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" } ]; exports.ExtensionsV1beta1DeploymentList = ExtensionsV1beta1DeploymentList; /** * DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. */ class ExtensionsV1beta1DeploymentRollback { static getAttributeTypeMap() { return ExtensionsV1beta1DeploymentRollback.attributeTypeMap; } } ExtensionsV1beta1DeploymentRollback.discriminator = undefined; ExtensionsV1beta1DeploymentRollback.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "rollbackTo", "baseName": "rollbackTo", "type": "ExtensionsV1beta1RollbackConfig" }, { "name": "updatedAnnotations", "baseName": "updatedAnnotations", "type": "{ [key: string]: string; }" } ]; exports.ExtensionsV1beta1DeploymentRollback = ExtensionsV1beta1DeploymentRollback; /** * DeploymentSpec is the specification of the desired behavior of the Deployment. */ class ExtensionsV1beta1DeploymentSpec { static getAttributeTypeMap() { return ExtensionsV1beta1DeploymentSpec.attributeTypeMap; } } ExtensionsV1beta1DeploymentSpec.discriminator = undefined; ExtensionsV1beta1DeploymentSpec.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": "rollbackTo", "baseName": "rollbackTo", "type": "ExtensionsV1beta1RollbackConfig" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" }, { "name": "strategy", "baseName": "strategy", "type": "ExtensionsV1beta1DeploymentStrategy" }, { "name": "template", "baseName": "template", "type": "V1PodTemplateSpec" } ]; exports.ExtensionsV1beta1DeploymentSpec = ExtensionsV1beta1DeploymentSpec; /** * DeploymentStatus is the most recently observed status of the Deployment. */ class ExtensionsV1beta1DeploymentStatus { static getAttributeTypeMap() { return ExtensionsV1beta1DeploymentStatus.attributeTypeMap; } } ExtensionsV1beta1DeploymentStatus.discriminator = undefined; ExtensionsV1beta1DeploymentStatus.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" } ]; exports.ExtensionsV1beta1DeploymentStatus = ExtensionsV1beta1DeploymentStatus; /** * DeploymentStrategy describes how to replace existing pods with new ones. */ class ExtensionsV1beta1DeploymentStrategy { static getAttributeTypeMap() { return ExtensionsV1beta1DeploymentStrategy.attributeTypeMap; } } ExtensionsV1beta1DeploymentStrategy.discriminator = undefined; ExtensionsV1beta1DeploymentStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "ExtensionsV1beta1RollingUpdateDeployment" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.ExtensionsV1beta1DeploymentStrategy = ExtensionsV1beta1DeploymentStrategy; /** * FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead. */ class ExtensionsV1beta1FSGroupStrategyOptions { static getAttributeTypeMap() { return ExtensionsV1beta1FSGroupStrategyOptions.attributeTypeMap; } } ExtensionsV1beta1FSGroupStrategyOptions.discriminator = undefined; ExtensionsV1beta1FSGroupStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.ExtensionsV1beta1FSGroupStrategyOptions = ExtensionsV1beta1FSGroupStrategyOptions; /** * 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. Deprecated: use HostPortRange from policy API Group instead. */ class ExtensionsV1beta1HostPortRange { static getAttributeTypeMap() { return ExtensionsV1beta1HostPortRange.attributeTypeMap; } } ExtensionsV1beta1HostPortRange.discriminator = undefined; ExtensionsV1beta1HostPortRange.attributeTypeMap = [ { "name": "max", "baseName": "max", "type": "number" }, { "name": "min", "baseName": "min", "type": "number" } ]; exports.ExtensionsV1beta1HostPortRange = ExtensionsV1beta1HostPortRange; /** * IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead. */ class ExtensionsV1beta1IDRange { static getAttributeTypeMap() { return ExtensionsV1beta1IDRange.attributeTypeMap; } } ExtensionsV1beta1IDRange.discriminator = undefined; ExtensionsV1beta1IDRange.attributeTypeMap = [ { "name": "max", "baseName": "max", "type": "number" }, { "name": "min", "baseName": "min", "type": "number" } ]; exports.ExtensionsV1beta1IDRange = ExtensionsV1beta1IDRange; /** * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead. */ class ExtensionsV1beta1PodSecurityPolicy { static getAttributeTypeMap() { return ExtensionsV1beta1PodSecurityPolicy.attributeTypeMap; } } ExtensionsV1beta1PodSecurityPolicy.discriminator = undefined; ExtensionsV1beta1PodSecurityPolicy.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "ExtensionsV1beta1PodSecurityPolicySpec" } ]; exports.ExtensionsV1beta1PodSecurityPolicy = ExtensionsV1beta1PodSecurityPolicy; /** * PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead. */ class ExtensionsV1beta1PodSecurityPolicyList { static getAttributeTypeMap() { return ExtensionsV1beta1PodSecurityPolicyList.attributeTypeMap; } } ExtensionsV1beta1PodSecurityPolicyList.discriminator = undefined; ExtensionsV1beta1PodSecurityPolicyList.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" } ]; exports.ExtensionsV1beta1PodSecurityPolicyList = ExtensionsV1beta1PodSecurityPolicyList; /** * PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead. */ class ExtensionsV1beta1PodSecurityPolicySpec { static getAttributeTypeMap() { return ExtensionsV1beta1PodSecurityPolicySpec.attributeTypeMap; } } ExtensionsV1beta1PodSecurityPolicySpec.discriminator = undefined; ExtensionsV1beta1PodSecurityPolicySpec.attributeTypeMap = [ { "name": "allowPrivilegeEscalation", "baseName": "allowPrivilegeEscalation", "type": "boolean" }, { "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": "ExtensionsV1beta1FSGroupStrategyOptions" }, { "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": "ExtensionsV1beta1RunAsGroupStrategyOptions" }, { "name": "runAsUser", "baseName": "runAsUser", "type": "ExtensionsV1beta1RunAsUserStrategyOptions" }, { "name": "seLinux", "baseName": "seLinux", "type": "ExtensionsV1beta1SELinuxStrategyOptions" }, { "name": "supplementalGroups", "baseName": "supplementalGroups", "type": "ExtensionsV1beta1SupplementalGroupsStrategyOptions" }, { "name": "volumes", "baseName": "volumes", "type": "Array" } ]; exports.ExtensionsV1beta1PodSecurityPolicySpec = ExtensionsV1beta1PodSecurityPolicySpec; /** * DEPRECATED. */ class ExtensionsV1beta1RollbackConfig { static getAttributeTypeMap() { return ExtensionsV1beta1RollbackConfig.attributeTypeMap; } } ExtensionsV1beta1RollbackConfig.discriminator = undefined; ExtensionsV1beta1RollbackConfig.attributeTypeMap = [ { "name": "revision", "baseName": "revision", "type": "number" } ]; exports.ExtensionsV1beta1RollbackConfig = ExtensionsV1beta1RollbackConfig; /** * Spec to control the desired behavior of rolling update. */ class ExtensionsV1beta1RollingUpdateDeployment { static getAttributeTypeMap() { return ExtensionsV1beta1RollingUpdateDeployment.attributeTypeMap; } } ExtensionsV1beta1RollingUpdateDeployment.discriminator = undefined; ExtensionsV1beta1RollingUpdateDeployment.attributeTypeMap = [ { "name": "maxSurge", "baseName": "maxSurge", "type": "any" }, { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.ExtensionsV1beta1RollingUpdateDeployment = ExtensionsV1beta1RollingUpdateDeployment; /** * RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsGroupStrategyOptions from policy API Group instead. */ class ExtensionsV1beta1RunAsGroupStrategyOptions { static getAttributeTypeMap() { return ExtensionsV1beta1RunAsGroupStrategyOptions.attributeTypeMap; } } ExtensionsV1beta1RunAsGroupStrategyOptions.discriminator = undefined; ExtensionsV1beta1RunAsGroupStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.ExtensionsV1beta1RunAsGroupStrategyOptions = ExtensionsV1beta1RunAsGroupStrategyOptions; /** * RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead. */ class ExtensionsV1beta1RunAsUserStrategyOptions { static getAttributeTypeMap() { return ExtensionsV1beta1RunAsUserStrategyOptions.attributeTypeMap; } } ExtensionsV1beta1RunAsUserStrategyOptions.discriminator = undefined; ExtensionsV1beta1RunAsUserStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.ExtensionsV1beta1RunAsUserStrategyOptions = ExtensionsV1beta1RunAsUserStrategyOptions; /** * SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead. */ class ExtensionsV1beta1SELinuxStrategyOptions { static getAttributeTypeMap() { return ExtensionsV1beta1SELinuxStrategyOptions.attributeTypeMap; } } ExtensionsV1beta1SELinuxStrategyOptions.discriminator = undefined; ExtensionsV1beta1SELinuxStrategyOptions.attributeTypeMap = [ { "name": "rule", "baseName": "rule", "type": "string" }, { "name": "seLinuxOptions", "baseName": "seLinuxOptions", "type": "V1SELinuxOptions" } ]; exports.ExtensionsV1beta1SELinuxStrategyOptions = ExtensionsV1beta1SELinuxStrategyOptions; /** * represents a scaling request for a resource. */ class ExtensionsV1beta1Scale { static getAttributeTypeMap() { return ExtensionsV1beta1Scale.attributeTypeMap; } } ExtensionsV1beta1Scale.discriminator = undefined; ExtensionsV1beta1Scale.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "ExtensionsV1beta1ScaleSpec" }, { "name": "status", "baseName": "status", "type": "ExtensionsV1beta1ScaleStatus" } ]; exports.ExtensionsV1beta1Scale = ExtensionsV1beta1Scale; /** * describes the attributes of a scale subresource */ class ExtensionsV1beta1ScaleSpec { static getAttributeTypeMap() { return ExtensionsV1beta1ScaleSpec.attributeTypeMap; } } ExtensionsV1beta1ScaleSpec.discriminator = undefined; ExtensionsV1beta1ScaleSpec.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" } ]; exports.ExtensionsV1beta1ScaleSpec = ExtensionsV1beta1ScaleSpec; /** * represents the current status of a scale subresource. */ class ExtensionsV1beta1ScaleStatus { static getAttributeTypeMap() { return ExtensionsV1beta1ScaleStatus.attributeTypeMap; } } ExtensionsV1beta1ScaleStatus.discriminator = undefined; ExtensionsV1beta1ScaleStatus.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" }, { "name": "selector", "baseName": "selector", "type": "{ [key: string]: string; }" }, { "name": "targetSelector", "baseName": "targetSelector", "type": "string" } ]; exports.ExtensionsV1beta1ScaleStatus = ExtensionsV1beta1ScaleStatus; /** * SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead. */ class ExtensionsV1beta1SupplementalGroupsStrategyOptions { static getAttributeTypeMap() { return ExtensionsV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap; } } ExtensionsV1beta1SupplementalGroupsStrategyOptions.discriminator = undefined; ExtensionsV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.ExtensionsV1beta1SupplementalGroupsStrategyOptions = ExtensionsV1beta1SupplementalGroupsStrategyOptions; /** * AllowedFlexVolume represents a single Flexvolume that is allowed to be used. */ class PolicyV1beta1AllowedFlexVolume { static getAttributeTypeMap() { return PolicyV1beta1AllowedFlexVolume.attributeTypeMap; } } PolicyV1beta1AllowedFlexVolume.discriminator = undefined; PolicyV1beta1AllowedFlexVolume.attributeTypeMap = [ { "name": "driver", "baseName": "driver", "type": "string" } ]; exports.PolicyV1beta1AllowedFlexVolume = PolicyV1beta1AllowedFlexVolume; /** * 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 PolicyV1beta1AllowedHostPath { static getAttributeTypeMap() { return PolicyV1beta1AllowedHostPath.attributeTypeMap; } } PolicyV1beta1AllowedHostPath.discriminator = undefined; PolicyV1beta1AllowedHostPath.attributeTypeMap = [ { "name": "pathPrefix", "baseName": "pathPrefix", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" } ]; exports.PolicyV1beta1AllowedHostPath = PolicyV1beta1AllowedHostPath; /** * FSGroupStrategyOptions defines the strategy type and options used to create the strategy. */ class PolicyV1beta1FSGroupStrategyOptions { static getAttributeTypeMap() { return PolicyV1beta1FSGroupStrategyOptions.attributeTypeMap; } } PolicyV1beta1FSGroupStrategyOptions.discriminator = undefined; PolicyV1beta1FSGroupStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.PolicyV1beta1FSGroupStrategyOptions = PolicyV1beta1FSGroupStrategyOptions; /** * 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 PolicyV1beta1HostPortRange { static getAttributeTypeMap() { return PolicyV1beta1HostPortRange.attributeTypeMap; } } PolicyV1beta1HostPortRange.discriminator = undefined; PolicyV1beta1HostPortRange.attributeTypeMap = [ { "name": "max", "baseName": "max", "type": "number" }, { "name": "min", "baseName": "min", "type": "number" } ]; exports.PolicyV1beta1HostPortRange = PolicyV1beta1HostPortRange; /** * IDRange provides a min/max of an allowed range of IDs. */ class PolicyV1beta1IDRange { static getAttributeTypeMap() { return PolicyV1beta1IDRange.attributeTypeMap; } } PolicyV1beta1IDRange.discriminator = undefined; PolicyV1beta1IDRange.attributeTypeMap = [ { "name": "max", "baseName": "max", "type": "number" }, { "name": "min", "baseName": "min", "type": "number" } ]; exports.PolicyV1beta1IDRange = PolicyV1beta1IDRange; /** * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. */ class PolicyV1beta1PodSecurityPolicy { static getAttributeTypeMap() { return PolicyV1beta1PodSecurityPolicy.attributeTypeMap; } } PolicyV1beta1PodSecurityPolicy.discriminator = undefined; PolicyV1beta1PodSecurityPolicy.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "PolicyV1beta1PodSecurityPolicySpec" } ]; exports.PolicyV1beta1PodSecurityPolicy = PolicyV1beta1PodSecurityPolicy; /** * PodSecurityPolicyList is a list of PodSecurityPolicy objects. */ class PolicyV1beta1PodSecurityPolicyList { static getAttributeTypeMap() { return PolicyV1beta1PodSecurityPolicyList.attributeTypeMap; } } PolicyV1beta1PodSecurityPolicyList.discriminator = undefined; PolicyV1beta1PodSecurityPolicyList.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" } ]; exports.PolicyV1beta1PodSecurityPolicyList = PolicyV1beta1PodSecurityPolicyList; /** * PodSecurityPolicySpec defines the policy enforced. */ class PolicyV1beta1PodSecurityPolicySpec { static getAttributeTypeMap() { return PolicyV1beta1PodSecurityPolicySpec.attributeTypeMap; } } PolicyV1beta1PodSecurityPolicySpec.discriminator = undefined; PolicyV1beta1PodSecurityPolicySpec.attributeTypeMap = [ { "name": "allowPrivilegeEscalation", "baseName": "allowPrivilegeEscalation", "type": "boolean" }, { "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": "PolicyV1beta1FSGroupStrategyOptions" }, { "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": "PolicyV1beta1RunAsGroupStrategyOptions" }, { "name": "runAsUser", "baseName": "runAsUser", "type": "PolicyV1beta1RunAsUserStrategyOptions" }, { "name": "seLinux", "baseName": "seLinux", "type": "PolicyV1beta1SELinuxStrategyOptions" }, { "name": "supplementalGroups", "baseName": "supplementalGroups", "type": "PolicyV1beta1SupplementalGroupsStrategyOptions" }, { "name": "volumes", "baseName": "volumes", "type": "Array" } ]; exports.PolicyV1beta1PodSecurityPolicySpec = PolicyV1beta1PodSecurityPolicySpec; /** * RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. */ class PolicyV1beta1RunAsGroupStrategyOptions { static getAttributeTypeMap() { return PolicyV1beta1RunAsGroupStrategyOptions.attributeTypeMap; } } PolicyV1beta1RunAsGroupStrategyOptions.discriminator = undefined; PolicyV1beta1RunAsGroupStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.PolicyV1beta1RunAsGroupStrategyOptions = PolicyV1beta1RunAsGroupStrategyOptions; /** * RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. */ class PolicyV1beta1RunAsUserStrategyOptions { static getAttributeTypeMap() { return PolicyV1beta1RunAsUserStrategyOptions.attributeTypeMap; } } PolicyV1beta1RunAsUserStrategyOptions.discriminator = undefined; PolicyV1beta1RunAsUserStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.PolicyV1beta1RunAsUserStrategyOptions = PolicyV1beta1RunAsUserStrategyOptions; /** * SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. */ class PolicyV1beta1SELinuxStrategyOptions { static getAttributeTypeMap() { return PolicyV1beta1SELinuxStrategyOptions.attributeTypeMap; } } PolicyV1beta1SELinuxStrategyOptions.discriminator = undefined; PolicyV1beta1SELinuxStrategyOptions.attributeTypeMap = [ { "name": "rule", "baseName": "rule", "type": "string" }, { "name": "seLinuxOptions", "baseName": "seLinuxOptions", "type": "V1SELinuxOptions" } ]; exports.PolicyV1beta1SELinuxStrategyOptions = PolicyV1beta1SELinuxStrategyOptions; /** * SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. */ class PolicyV1beta1SupplementalGroupsStrategyOptions { static getAttributeTypeMap() { return PolicyV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap; } } PolicyV1beta1SupplementalGroupsStrategyOptions.discriminator = undefined; PolicyV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [ { "name": "ranges", "baseName": "ranges", "type": "Array" }, { "name": "rule", "baseName": "rule", "type": "string" } ]; exports.PolicyV1beta1SupplementalGroupsStrategyOptions = PolicyV1beta1SupplementalGroupsStrategyOptions; /** * RawExtension is used to hold extensions in external versions. To use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types. // Internal package: type MyAPIObject struct { runtime.TypeMeta `json:\",inline\"` MyPlugin runtime.Object `json:\"myPlugin\"` } type PluginA struct { AOption string `json:\"aOption\"` } // External package: type MyAPIObject struct { runtime.TypeMeta `json:\",inline\"` MyPlugin runtime.RawExtension `json:\"myPlugin\"` } type PluginA struct { AOption string `json:\"aOption\"` } // On the wire, the JSON will look something like this: { \"kind\":\"MyAPIObject\", \"apiVersion\":\"v1\", \"myPlugin\": { \"kind\":\"PluginA\", \"aOption\":\"foo\", }, } So what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.) */ class RuntimeRawExtension { static getAttributeTypeMap() { return RuntimeRawExtension.attributeTypeMap; } } RuntimeRawExtension.discriminator = undefined; RuntimeRawExtension.attributeTypeMap = [ { "name": "raw", "baseName": "Raw", "type": "string" } ]; exports.RuntimeRawExtension = RuntimeRawExtension; /** * APIGroup contains the name, the supported versions, and the preferred version of a group. */ class V1APIGroup { static getAttributeTypeMap() { return V1APIGroup.attributeTypeMap; } } 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" } ]; exports.V1APIGroup = V1APIGroup; /** * APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. */ class V1APIGroupList { static getAttributeTypeMap() { return V1APIGroupList.attributeTypeMap; } } V1APIGroupList.discriminator = undefined; V1APIGroupList.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "groups", "baseName": "groups", "type": "Array" }, { "name": "kind", "baseName": "kind", "type": "string" } ]; exports.V1APIGroupList = V1APIGroupList; /** * APIResource specifies the name of a resource and whether it is namespaced. */ class V1APIResource { static getAttributeTypeMap() { return V1APIResource.attributeTypeMap; } } 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": "verbs", "baseName": "verbs", "type": "Array" }, { "name": "version", "baseName": "version", "type": "string" } ]; exports.V1APIResource = V1APIResource; /** * 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; } } 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" } ]; exports.V1APIResourceList = V1APIResourceList; /** * APIService represents a server for a particular GroupVersion. Name must be \"version.group\". */ class V1APIService { static getAttributeTypeMap() { return V1APIService.attributeTypeMap; } } 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" } ]; exports.V1APIService = V1APIService; class V1APIServiceCondition { static getAttributeTypeMap() { return V1APIServiceCondition.attributeTypeMap; } } 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" } ]; exports.V1APIServiceCondition = V1APIServiceCondition; /** * APIServiceList is a list of APIService objects. */ class V1APIServiceList { static getAttributeTypeMap() { return V1APIServiceList.attributeTypeMap; } } 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" } ]; exports.V1APIServiceList = V1APIServiceList; /** * 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; } } 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": "V1ServiceReference" }, { "name": "version", "baseName": "version", "type": "string" }, { "name": "versionPriority", "baseName": "versionPriority", "type": "number" } ]; exports.V1APIServiceSpec = V1APIServiceSpec; /** * APIServiceStatus contains derived information about an API server */ class V1APIServiceStatus { static getAttributeTypeMap() { return V1APIServiceStatus.attributeTypeMap; } } V1APIServiceStatus.discriminator = undefined; V1APIServiceStatus.attributeTypeMap = [ { "name": "conditions", "baseName": "conditions", "type": "Array" } ]; exports.V1APIServiceStatus = V1APIServiceStatus; /** * 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; } } 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" } ]; exports.V1APIVersions = V1APIVersions; /** * 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; } } 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" } ]; exports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource; /** * Affinity is a group of affinity scheduling rules. */ class V1Affinity { static getAttributeTypeMap() { return V1Affinity.attributeTypeMap; } } V1Affinity.discriminator = undefined; V1Affinity.attributeTypeMap = [ { "name": "nodeAffinity", "baseName": "nodeAffinity", "type": "V1NodeAffinity" }, { "name": "podAffinity", "baseName": "podAffinity", "type": "V1PodAffinity" }, { "name": "podAntiAffinity", "baseName": "podAntiAffinity", "type": "V1PodAntiAffinity" } ]; exports.V1Affinity = V1Affinity; /** * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole */ class V1AggregationRule { static getAttributeTypeMap() { return V1AggregationRule.attributeTypeMap; } } V1AggregationRule.discriminator = undefined; V1AggregationRule.attributeTypeMap = [ { "name": "clusterRoleSelectors", "baseName": "clusterRoleSelectors", "type": "Array" } ]; exports.V1AggregationRule = V1AggregationRule; /** * AttachedVolume describes a volume attached to a node */ class V1AttachedVolume { static getAttributeTypeMap() { return V1AttachedVolume.attributeTypeMap; } } V1AttachedVolume.discriminator = undefined; V1AttachedVolume.attributeTypeMap = [ { "name": "devicePath", "baseName": "devicePath", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1AttachedVolume = V1AttachedVolume; /** * AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. */ class V1AzureDiskVolumeSource { static getAttributeTypeMap() { return V1AzureDiskVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource; /** * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. */ class V1AzureFilePersistentVolumeSource { static getAttributeTypeMap() { return V1AzureFilePersistentVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource; /** * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. */ class V1AzureFileVolumeSource { static getAttributeTypeMap() { return V1AzureFileVolumeSource.attributeTypeMap; } } V1AzureFileVolumeSource.discriminator = undefined; V1AzureFileVolumeSource.attributeTypeMap = [ { "name": "readOnly", "baseName": "readOnly", "type": "boolean" }, { "name": "secretName", "baseName": "secretName", "type": "string" }, { "name": "shareName", "baseName": "shareName", "type": "string" } ]; exports.V1AzureFileVolumeSource = V1AzureFileVolumeSource; /** * 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; } } 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" } ]; exports.V1Binding = V1Binding; /** * Represents storage that is managed by an external CSI volume driver (Beta feature) */ class V1CSIPersistentVolumeSource { static getAttributeTypeMap() { return V1CSIPersistentVolumeSource.attributeTypeMap; } } V1CSIPersistentVolumeSource.discriminator = undefined; V1CSIPersistentVolumeSource.attributeTypeMap = [ { "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" } ]; exports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource; /** * Adds and removes POSIX capabilities from running containers. */ class V1Capabilities { static getAttributeTypeMap() { return V1Capabilities.attributeTypeMap; } } V1Capabilities.discriminator = undefined; V1Capabilities.attributeTypeMap = [ { "name": "add", "baseName": "add", "type": "Array" }, { "name": "drop", "baseName": "drop", "type": "Array" } ]; exports.V1Capabilities = V1Capabilities; /** * 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; } } 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" } ]; exports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource; /** * 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; } } 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" } ]; exports.V1CephFSVolumeSource = V1CephFSVolumeSource; /** * 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; } } 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" } ]; exports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource; /** * 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; } } 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" } ]; exports.V1CinderVolumeSource = V1CinderVolumeSource; /** * ClientIPConfig represents the configurations of Client IP based session affinity. */ class V1ClientIPConfig { static getAttributeTypeMap() { return V1ClientIPConfig.attributeTypeMap; } } V1ClientIPConfig.discriminator = undefined; V1ClientIPConfig.attributeTypeMap = [ { "name": "timeoutSeconds", "baseName": "timeoutSeconds", "type": "number" } ]; exports.V1ClientIPConfig = V1ClientIPConfig; /** * 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; } } 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" } ]; exports.V1ClusterRole = V1ClusterRole; /** * 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; } } 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" } ]; exports.V1ClusterRoleBinding = V1ClusterRoleBinding; /** * ClusterRoleBindingList is a collection of ClusterRoleBindings */ class V1ClusterRoleBindingList { static getAttributeTypeMap() { return V1ClusterRoleBindingList.attributeTypeMap; } } 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" } ]; exports.V1ClusterRoleBindingList = V1ClusterRoleBindingList; /** * ClusterRoleList is a collection of ClusterRoles */ class V1ClusterRoleList { static getAttributeTypeMap() { return V1ClusterRoleList.attributeTypeMap; } } 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" } ]; exports.V1ClusterRoleList = V1ClusterRoleList; /** * Information about the condition of a component. */ class V1ComponentCondition { static getAttributeTypeMap() { return V1ComponentCondition.attributeTypeMap; } } 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" } ]; exports.V1ComponentCondition = V1ComponentCondition; /** * ComponentStatus (and ComponentStatusList) holds the cluster validation info. */ class V1ComponentStatus { static getAttributeTypeMap() { return V1ComponentStatus.attributeTypeMap; } } 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" } ]; exports.V1ComponentStatus = V1ComponentStatus; /** * Status of all the conditions for the component as a list of ComponentStatus objects. */ class V1ComponentStatusList { static getAttributeTypeMap() { return V1ComponentStatusList.attributeTypeMap; } } 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" } ]; exports.V1ComponentStatusList = V1ComponentStatusList; /** * ConfigMap holds configuration data for pods to consume. */ class V1ConfigMap { static getAttributeTypeMap() { return V1ConfigMap.attributeTypeMap; } } 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": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" } ]; exports.V1ConfigMap = V1ConfigMap; /** * 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; } } V1ConfigMapEnvSource.discriminator = undefined; V1ConfigMapEnvSource.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "optional", "baseName": "optional", "type": "boolean" } ]; exports.V1ConfigMapEnvSource = V1ConfigMapEnvSource; /** * Selects a key from a ConfigMap. */ class V1ConfigMapKeySelector { static getAttributeTypeMap() { return V1ConfigMapKeySelector.attributeTypeMap; } } V1ConfigMapKeySelector.discriminator = undefined; V1ConfigMapKeySelector.attributeTypeMap = [ { "name": "key", "baseName": "key", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "optional", "baseName": "optional", "type": "boolean" } ]; exports.V1ConfigMapKeySelector = V1ConfigMapKeySelector; /** * ConfigMapList is a resource containing a list of ConfigMap objects. */ class V1ConfigMapList { static getAttributeTypeMap() { return V1ConfigMapList.attributeTypeMap; } } 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" } ]; exports.V1ConfigMapList = V1ConfigMapList; /** * ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. */ class V1ConfigMapNodeConfigSource { static getAttributeTypeMap() { return V1ConfigMapNodeConfigSource.attributeTypeMap; } } 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" } ]; exports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource; /** * 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; } } V1ConfigMapProjection.discriminator = undefined; V1ConfigMapProjection.attributeTypeMap = [ { "name": "items", "baseName": "items", "type": "Array" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "optional", "baseName": "optional", "type": "boolean" } ]; exports.V1ConfigMapProjection = V1ConfigMapProjection; /** * 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; } } 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" } ]; exports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource; /** * A single application container that you want to run within a pod. */ class V1Container { static getAttributeTypeMap() { return V1Container.attributeTypeMap; } } 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": "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" } ]; exports.V1Container = V1Container; /** * Describe a container image */ class V1ContainerImage { static getAttributeTypeMap() { return V1ContainerImage.attributeTypeMap; } } V1ContainerImage.discriminator = undefined; V1ContainerImage.attributeTypeMap = [ { "name": "names", "baseName": "names", "type": "Array" }, { "name": "sizeBytes", "baseName": "sizeBytes", "type": "number" } ]; exports.V1ContainerImage = V1ContainerImage; /** * ContainerPort represents a network port in a single container. */ class V1ContainerPort { static getAttributeTypeMap() { return V1ContainerPort.attributeTypeMap; } } 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" } ]; exports.V1ContainerPort = V1ContainerPort; /** * 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; } } V1ContainerState.discriminator = undefined; V1ContainerState.attributeTypeMap = [ { "name": "running", "baseName": "running", "type": "V1ContainerStateRunning" }, { "name": "terminated", "baseName": "terminated", "type": "V1ContainerStateTerminated" }, { "name": "waiting", "baseName": "waiting", "type": "V1ContainerStateWaiting" } ]; exports.V1ContainerState = V1ContainerState; /** * ContainerStateRunning is a running state of a container. */ class V1ContainerStateRunning { static getAttributeTypeMap() { return V1ContainerStateRunning.attributeTypeMap; } } V1ContainerStateRunning.discriminator = undefined; V1ContainerStateRunning.attributeTypeMap = [ { "name": "startedAt", "baseName": "startedAt", "type": "Date" } ]; exports.V1ContainerStateRunning = V1ContainerStateRunning; /** * ContainerStateTerminated is a terminated state of a container. */ class V1ContainerStateTerminated { static getAttributeTypeMap() { return V1ContainerStateTerminated.attributeTypeMap; } } 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" } ]; exports.V1ContainerStateTerminated = V1ContainerStateTerminated; /** * ContainerStateWaiting is a waiting state of a container. */ class V1ContainerStateWaiting { static getAttributeTypeMap() { return V1ContainerStateWaiting.attributeTypeMap; } } V1ContainerStateWaiting.discriminator = undefined; V1ContainerStateWaiting.attributeTypeMap = [ { "name": "message", "baseName": "message", "type": "string" }, { "name": "reason", "baseName": "reason", "type": "string" } ]; exports.V1ContainerStateWaiting = V1ContainerStateWaiting; /** * ContainerStatus contains details for the current status of this container. */ class V1ContainerStatus { static getAttributeTypeMap() { return V1ContainerStatus.attributeTypeMap; } } 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": "state", "baseName": "state", "type": "V1ContainerState" } ]; exports.V1ContainerStatus = V1ContainerStatus; /** * 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; } } V1ControllerRevision.discriminator = undefined; V1ControllerRevision.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "data", "baseName": "data", "type": "RuntimeRawExtension" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "revision", "baseName": "revision", "type": "number" } ]; exports.V1ControllerRevision = V1ControllerRevision; /** * ControllerRevisionList is a resource containing a list of ControllerRevision objects. */ class V1ControllerRevisionList { static getAttributeTypeMap() { return V1ControllerRevisionList.attributeTypeMap; } } 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" } ]; exports.V1ControllerRevisionList = V1ControllerRevisionList; /** * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ class V1CrossVersionObjectReference { static getAttributeTypeMap() { return V1CrossVersionObjectReference.attributeTypeMap; } } V1CrossVersionObjectReference.discriminator = undefined; V1CrossVersionObjectReference.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1CrossVersionObjectReference = V1CrossVersionObjectReference; /** * DaemonEndpoint contains information about a single Daemon endpoint. */ class V1DaemonEndpoint { static getAttributeTypeMap() { return V1DaemonEndpoint.attributeTypeMap; } } V1DaemonEndpoint.discriminator = undefined; V1DaemonEndpoint.attributeTypeMap = [ { "name": "port", "baseName": "Port", "type": "number" } ]; exports.V1DaemonEndpoint = V1DaemonEndpoint; /** * DaemonSet represents the configuration of a daemon set. */ class V1DaemonSet { static getAttributeTypeMap() { return V1DaemonSet.attributeTypeMap; } } 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" } ]; exports.V1DaemonSet = V1DaemonSet; /** * DaemonSetCondition describes the state of a DaemonSet at a certain point. */ class V1DaemonSetCondition { static getAttributeTypeMap() { return V1DaemonSetCondition.attributeTypeMap; } } 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" } ]; exports.V1DaemonSetCondition = V1DaemonSetCondition; /** * DaemonSetList is a collection of daemon sets. */ class V1DaemonSetList { static getAttributeTypeMap() { return V1DaemonSetList.attributeTypeMap; } } 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" } ]; exports.V1DaemonSetList = V1DaemonSetList; /** * DaemonSetSpec is the specification of a daemon set. */ class V1DaemonSetSpec { static getAttributeTypeMap() { return V1DaemonSetSpec.attributeTypeMap; } } 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" } ]; exports.V1DaemonSetSpec = V1DaemonSetSpec; /** * DaemonSetStatus represents the current status of a daemon set. */ class V1DaemonSetStatus { static getAttributeTypeMap() { return V1DaemonSetStatus.attributeTypeMap; } } 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" } ]; exports.V1DaemonSetStatus = V1DaemonSetStatus; /** * DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. */ class V1DaemonSetUpdateStrategy { static getAttributeTypeMap() { return V1DaemonSetUpdateStrategy.attributeTypeMap; } } V1DaemonSetUpdateStrategy.discriminator = undefined; V1DaemonSetUpdateStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1RollingUpdateDaemonSet" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy; /** * DeleteOptions may be provided when deleting an API object. */ class V1DeleteOptions { static getAttributeTypeMap() { return V1DeleteOptions.attributeTypeMap; } } 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" } ]; exports.V1DeleteOptions = V1DeleteOptions; /** * Deployment enables declarative updates for Pods and ReplicaSets. */ class V1Deployment { static getAttributeTypeMap() { return V1Deployment.attributeTypeMap; } } 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" } ]; exports.V1Deployment = V1Deployment; /** * DeploymentCondition describes the state of a deployment at a certain point. */ class V1DeploymentCondition { static getAttributeTypeMap() { return V1DeploymentCondition.attributeTypeMap; } } 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" } ]; exports.V1DeploymentCondition = V1DeploymentCondition; /** * DeploymentList is a list of Deployments. */ class V1DeploymentList { static getAttributeTypeMap() { return V1DeploymentList.attributeTypeMap; } } 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" } ]; exports.V1DeploymentList = V1DeploymentList; /** * DeploymentSpec is the specification of the desired behavior of the Deployment. */ class V1DeploymentSpec { static getAttributeTypeMap() { return V1DeploymentSpec.attributeTypeMap; } } 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" } ]; exports.V1DeploymentSpec = V1DeploymentSpec; /** * DeploymentStatus is the most recently observed status of the Deployment. */ class V1DeploymentStatus { static getAttributeTypeMap() { return V1DeploymentStatus.attributeTypeMap; } } 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" } ]; exports.V1DeploymentStatus = V1DeploymentStatus; /** * DeploymentStrategy describes how to replace existing pods with new ones. */ class V1DeploymentStrategy { static getAttributeTypeMap() { return V1DeploymentStrategy.attributeTypeMap; } } V1DeploymentStrategy.discriminator = undefined; V1DeploymentStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1RollingUpdateDeployment" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1DeploymentStrategy = V1DeploymentStrategy; /** * 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; } } V1DownwardAPIProjection.discriminator = undefined; V1DownwardAPIProjection.attributeTypeMap = [ { "name": "items", "baseName": "items", "type": "Array" } ]; exports.V1DownwardAPIProjection = V1DownwardAPIProjection; /** * DownwardAPIVolumeFile represents information to create the file containing the pod field */ class V1DownwardAPIVolumeFile { static getAttributeTypeMap() { return V1DownwardAPIVolumeFile.attributeTypeMap; } } 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" } ]; exports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile; /** * DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. */ class V1DownwardAPIVolumeSource { static getAttributeTypeMap() { return V1DownwardAPIVolumeSource.attributeTypeMap; } } V1DownwardAPIVolumeSource.discriminator = undefined; V1DownwardAPIVolumeSource.attributeTypeMap = [ { "name": "defaultMode", "baseName": "defaultMode", "type": "number" }, { "name": "items", "baseName": "items", "type": "Array" } ]; exports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource; /** * Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. */ class V1EmptyDirVolumeSource { static getAttributeTypeMap() { return V1EmptyDirVolumeSource.attributeTypeMap; } } V1EmptyDirVolumeSource.discriminator = undefined; V1EmptyDirVolumeSource.attributeTypeMap = [ { "name": "medium", "baseName": "medium", "type": "string" }, { "name": "sizeLimit", "baseName": "sizeLimit", "type": "string" } ]; exports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource; /** * EndpointAddress is a tuple that describes single IP address. */ class V1EndpointAddress { static getAttributeTypeMap() { return V1EndpointAddress.attributeTypeMap; } } 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" } ]; exports.V1EndpointAddress = V1EndpointAddress; /** * EndpointPort is a tuple that describes a single port. */ class V1EndpointPort { static getAttributeTypeMap() { return V1EndpointPort.attributeTypeMap; } } V1EndpointPort.discriminator = undefined; V1EndpointPort.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "port", "baseName": "port", "type": "number" }, { "name": "protocol", "baseName": "protocol", "type": "string" } ]; exports.V1EndpointPort = V1EndpointPort; /** * 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; } } V1EndpointSubset.discriminator = undefined; V1EndpointSubset.attributeTypeMap = [ { "name": "addresses", "baseName": "addresses", "type": "Array" }, { "name": "notReadyAddresses", "baseName": "notReadyAddresses", "type": "Array" }, { "name": "ports", "baseName": "ports", "type": "Array" } ]; exports.V1EndpointSubset = V1EndpointSubset; /** * 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; } } 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" } ]; exports.V1Endpoints = V1Endpoints; /** * EndpointsList is a list of endpoints. */ class V1EndpointsList { static getAttributeTypeMap() { return V1EndpointsList.attributeTypeMap; } } 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" } ]; exports.V1EndpointsList = V1EndpointsList; /** * EnvFromSource represents the source of a set of ConfigMaps */ class V1EnvFromSource { static getAttributeTypeMap() { return V1EnvFromSource.attributeTypeMap; } } V1EnvFromSource.discriminator = undefined; V1EnvFromSource.attributeTypeMap = [ { "name": "configMapRef", "baseName": "configMapRef", "type": "V1ConfigMapEnvSource" }, { "name": "prefix", "baseName": "prefix", "type": "string" }, { "name": "secretRef", "baseName": "secretRef", "type": "V1SecretEnvSource" } ]; exports.V1EnvFromSource = V1EnvFromSource; /** * EnvVar represents an environment variable present in a Container. */ class V1EnvVar { static getAttributeTypeMap() { return V1EnvVar.attributeTypeMap; } } V1EnvVar.discriminator = undefined; V1EnvVar.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "value", "baseName": "value", "type": "string" }, { "name": "valueFrom", "baseName": "valueFrom", "type": "V1EnvVarSource" } ]; exports.V1EnvVar = V1EnvVar; /** * EnvVarSource represents a source for the value of an EnvVar. */ class V1EnvVarSource { static getAttributeTypeMap() { return V1EnvVarSource.attributeTypeMap; } } 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" } ]; exports.V1EnvVarSource = V1EnvVarSource; /** * Event is a report of an event somewhere in the cluster. */ class V1Event { static getAttributeTypeMap() { return V1Event.attributeTypeMap; } } V1Event.discriminator = undefined; V1Event.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": "V1EventSeries" }, { "name": "source", "baseName": "source", "type": "V1EventSource" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1Event = V1Event; /** * EventList is a list of events. */ class V1EventList { static getAttributeTypeMap() { return V1EventList.attributeTypeMap; } } V1EventList.discriminator = undefined; V1EventList.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" } ]; exports.V1EventList = V1EventList; /** * EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. */ class V1EventSeries { static getAttributeTypeMap() { return V1EventSeries.attributeTypeMap; } } V1EventSeries.discriminator = undefined; V1EventSeries.attributeTypeMap = [ { "name": "count", "baseName": "count", "type": "number" }, { "name": "lastObservedTime", "baseName": "lastObservedTime", "type": "Date" }, { "name": "state", "baseName": "state", "type": "string" } ]; exports.V1EventSeries = V1EventSeries; /** * EventSource contains information for an event. */ class V1EventSource { static getAttributeTypeMap() { return V1EventSource.attributeTypeMap; } } V1EventSource.discriminator = undefined; V1EventSource.attributeTypeMap = [ { "name": "component", "baseName": "component", "type": "string" }, { "name": "host", "baseName": "host", "type": "string" } ]; exports.V1EventSource = V1EventSource; /** * ExecAction describes a \"run in container\" action. */ class V1ExecAction { static getAttributeTypeMap() { return V1ExecAction.attributeTypeMap; } } V1ExecAction.discriminator = undefined; V1ExecAction.attributeTypeMap = [ { "name": "command", "baseName": "command", "type": "Array" } ]; exports.V1ExecAction = V1ExecAction; /** * 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; } } 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" } ]; exports.V1FCVolumeSource = V1FCVolumeSource; /** * FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. */ class V1FlexPersistentVolumeSource { static getAttributeTypeMap() { return V1FlexPersistentVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource; /** * FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. */ class V1FlexVolumeSource { static getAttributeTypeMap() { return V1FlexVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1FlexVolumeSource = V1FlexVolumeSource; /** * 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; } } V1FlockerVolumeSource.discriminator = undefined; V1FlockerVolumeSource.attributeTypeMap = [ { "name": "datasetName", "baseName": "datasetName", "type": "string" }, { "name": "datasetUUID", "baseName": "datasetUUID", "type": "string" } ]; exports.V1FlockerVolumeSource = V1FlockerVolumeSource; /** * 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; } } 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" } ]; exports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource; /** * 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; } } V1GitRepoVolumeSource.discriminator = undefined; V1GitRepoVolumeSource.attributeTypeMap = [ { "name": "directory", "baseName": "directory", "type": "string" }, { "name": "repository", "baseName": "repository", "type": "string" }, { "name": "revision", "baseName": "revision", "type": "string" } ]; exports.V1GitRepoVolumeSource = V1GitRepoVolumeSource; /** * 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; } } 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" } ]; exports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource; /** * 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; } } V1GlusterfsVolumeSource.discriminator = undefined; V1GlusterfsVolumeSource.attributeTypeMap = [ { "name": "endpoints", "baseName": "endpoints", "type": "string" }, { "name": "path", "baseName": "path", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" } ]; exports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource; /** * 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; } } V1GroupVersionForDiscovery.discriminator = undefined; V1GroupVersionForDiscovery.attributeTypeMap = [ { "name": "groupVersion", "baseName": "groupVersion", "type": "string" }, { "name": "version", "baseName": "version", "type": "string" } ]; exports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery; /** * HTTPGetAction describes an action based on HTTP Get requests. */ class V1HTTPGetAction { static getAttributeTypeMap() { return V1HTTPGetAction.attributeTypeMap; } } 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": "any" }, { "name": "scheme", "baseName": "scheme", "type": "string" } ]; exports.V1HTTPGetAction = V1HTTPGetAction; /** * HTTPHeader describes a custom header to be used in HTTP probes */ class V1HTTPHeader { static getAttributeTypeMap() { return V1HTTPHeader.attributeTypeMap; } } V1HTTPHeader.discriminator = undefined; V1HTTPHeader.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "value", "baseName": "value", "type": "string" } ]; exports.V1HTTPHeader = V1HTTPHeader; /** * Handler defines a specific action that should be taken */ class V1Handler { static getAttributeTypeMap() { return V1Handler.attributeTypeMap; } } V1Handler.discriminator = undefined; V1Handler.attributeTypeMap = [ { "name": "exec", "baseName": "exec", "type": "V1ExecAction" }, { "name": "httpGet", "baseName": "httpGet", "type": "V1HTTPGetAction" }, { "name": "tcpSocket", "baseName": "tcpSocket", "type": "V1TCPSocketAction" } ]; exports.V1Handler = V1Handler; /** * configuration of a horizontal pod autoscaler. */ class V1HorizontalPodAutoscaler { static getAttributeTypeMap() { return V1HorizontalPodAutoscaler.attributeTypeMap; } } 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" } ]; exports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler; /** * list of horizontal pod autoscaler objects. */ class V1HorizontalPodAutoscalerList { static getAttributeTypeMap() { return V1HorizontalPodAutoscalerList.attributeTypeMap; } } 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" } ]; exports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList; /** * specification of a horizontal pod autoscaler. */ class V1HorizontalPodAutoscalerSpec { static getAttributeTypeMap() { return V1HorizontalPodAutoscalerSpec.attributeTypeMap; } } 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" } ]; exports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec; /** * current status of a horizontal pod autoscaler */ class V1HorizontalPodAutoscalerStatus { static getAttributeTypeMap() { return V1HorizontalPodAutoscalerStatus.attributeTypeMap; } } 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" } ]; exports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus; /** * 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; } } V1HostAlias.discriminator = undefined; V1HostAlias.attributeTypeMap = [ { "name": "hostnames", "baseName": "hostnames", "type": "Array" }, { "name": "ip", "baseName": "ip", "type": "string" } ]; exports.V1HostAlias = V1HostAlias; /** * 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; } } V1HostPathVolumeSource.discriminator = undefined; V1HostPathVolumeSource.attributeTypeMap = [ { "name": "path", "baseName": "path", "type": "string" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1HostPathVolumeSource = V1HostPathVolumeSource; /** * IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") 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; } } V1IPBlock.discriminator = undefined; V1IPBlock.attributeTypeMap = [ { "name": "cidr", "baseName": "cidr", "type": "string" }, { "name": "except", "baseName": "except", "type": "Array" } ]; exports.V1IPBlock = V1IPBlock; /** * 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; } } 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" } ]; exports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource; /** * 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; } } 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" } ]; exports.V1ISCSIVolumeSource = V1ISCSIVolumeSource; /** * Initializer is information about an initializer that has not yet completed. */ class V1Initializer { static getAttributeTypeMap() { return V1Initializer.attributeTypeMap; } } V1Initializer.discriminator = undefined; V1Initializer.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1Initializer = V1Initializer; /** * Initializers tracks the progress of initialization. */ class V1Initializers { static getAttributeTypeMap() { return V1Initializers.attributeTypeMap; } } V1Initializers.discriminator = undefined; V1Initializers.attributeTypeMap = [ { "name": "pending", "baseName": "pending", "type": "Array" }, { "name": "result", "baseName": "result", "type": "V1Status" } ]; exports.V1Initializers = V1Initializers; /** * Job represents the configuration of a single job. */ class V1Job { static getAttributeTypeMap() { return V1Job.attributeTypeMap; } } 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" } ]; exports.V1Job = V1Job; /** * JobCondition describes current state of a job. */ class V1JobCondition { static getAttributeTypeMap() { return V1JobCondition.attributeTypeMap; } } 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" } ]; exports.V1JobCondition = V1JobCondition; /** * JobList is a collection of jobs. */ class V1JobList { static getAttributeTypeMap() { return V1JobList.attributeTypeMap; } } 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" } ]; exports.V1JobList = V1JobList; /** * JobSpec describes how the job execution will look like. */ class V1JobSpec { static getAttributeTypeMap() { return V1JobSpec.attributeTypeMap; } } 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" } ]; exports.V1JobSpec = V1JobSpec; /** * JobStatus represents the current state of a Job. */ class V1JobStatus { static getAttributeTypeMap() { return V1JobStatus.attributeTypeMap; } } 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" } ]; exports.V1JobStatus = V1JobStatus; /** * Maps a string key to a path within a volume. */ class V1KeyToPath { static getAttributeTypeMap() { return V1KeyToPath.attributeTypeMap; } } V1KeyToPath.discriminator = undefined; V1KeyToPath.attributeTypeMap = [ { "name": "key", "baseName": "key", "type": "string" }, { "name": "mode", "baseName": "mode", "type": "number" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.V1KeyToPath = V1KeyToPath; /** * 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; } } V1LabelSelector.discriminator = undefined; V1LabelSelector.attributeTypeMap = [ { "name": "matchExpressions", "baseName": "matchExpressions", "type": "Array" }, { "name": "matchLabels", "baseName": "matchLabels", "type": "{ [key: string]: string; }" } ]; exports.V1LabelSelector = V1LabelSelector; /** * 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; } } V1LabelSelectorRequirement.discriminator = undefined; V1LabelSelectorRequirement.attributeTypeMap = [ { "name": "key", "baseName": "key", "type": "string" }, { "name": "operator", "baseName": "operator", "type": "string" }, { "name": "values", "baseName": "values", "type": "Array" } ]; exports.V1LabelSelectorRequirement = V1LabelSelectorRequirement; /** * 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; } } V1Lifecycle.discriminator = undefined; V1Lifecycle.attributeTypeMap = [ { "name": "postStart", "baseName": "postStart", "type": "V1Handler" }, { "name": "preStop", "baseName": "preStop", "type": "V1Handler" } ]; exports.V1Lifecycle = V1Lifecycle; /** * LimitRange sets resource usage limits for each kind of resource in a Namespace. */ class V1LimitRange { static getAttributeTypeMap() { return V1LimitRange.attributeTypeMap; } } 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" } ]; exports.V1LimitRange = V1LimitRange; /** * LimitRangeItem defines a min/max usage limit for any resource that matches on kind. */ class V1LimitRangeItem { static getAttributeTypeMap() { return V1LimitRangeItem.attributeTypeMap; } } 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" } ]; exports.V1LimitRangeItem = V1LimitRangeItem; /** * LimitRangeList is a list of LimitRange items. */ class V1LimitRangeList { static getAttributeTypeMap() { return V1LimitRangeList.attributeTypeMap; } } 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" } ]; exports.V1LimitRangeList = V1LimitRangeList; /** * LimitRangeSpec defines a min/max usage limit for resources that match on kind. */ class V1LimitRangeSpec { static getAttributeTypeMap() { return V1LimitRangeSpec.attributeTypeMap; } } V1LimitRangeSpec.discriminator = undefined; V1LimitRangeSpec.attributeTypeMap = [ { "name": "limits", "baseName": "limits", "type": "Array" } ]; exports.V1LimitRangeSpec = V1LimitRangeSpec; /** * 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; } } V1ListMeta.discriminator = undefined; V1ListMeta.attributeTypeMap = [ { "name": "_continue", "baseName": "continue", "type": "string" }, { "name": "resourceVersion", "baseName": "resourceVersion", "type": "string" }, { "name": "selfLink", "baseName": "selfLink", "type": "string" } ]; exports.V1ListMeta = V1ListMeta; /** * 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; } } V1LoadBalancerIngress.discriminator = undefined; V1LoadBalancerIngress.attributeTypeMap = [ { "name": "hostname", "baseName": "hostname", "type": "string" }, { "name": "ip", "baseName": "ip", "type": "string" } ]; exports.V1LoadBalancerIngress = V1LoadBalancerIngress; /** * LoadBalancerStatus represents the status of a load-balancer. */ class V1LoadBalancerStatus { static getAttributeTypeMap() { return V1LoadBalancerStatus.attributeTypeMap; } } V1LoadBalancerStatus.discriminator = undefined; V1LoadBalancerStatus.attributeTypeMap = [ { "name": "ingress", "baseName": "ingress", "type": "Array" } ]; exports.V1LoadBalancerStatus = V1LoadBalancerStatus; /** * LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. */ class V1LocalObjectReference { static getAttributeTypeMap() { return V1LocalObjectReference.attributeTypeMap; } } V1LocalObjectReference.discriminator = undefined; V1LocalObjectReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1LocalObjectReference = V1LocalObjectReference; /** * 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; } } 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" } ]; exports.V1LocalSubjectAccessReview = V1LocalSubjectAccessReview; /** * Local represents directly-attached storage with node affinity (Beta feature) */ class V1LocalVolumeSource { static getAttributeTypeMap() { return V1LocalVolumeSource.attributeTypeMap; } } V1LocalVolumeSource.discriminator = undefined; V1LocalVolumeSource.attributeTypeMap = [ { "name": "fsType", "baseName": "fsType", "type": "string" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.V1LocalVolumeSource = V1LocalVolumeSource; /** * 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; } } V1NFSVolumeSource.discriminator = undefined; V1NFSVolumeSource.attributeTypeMap = [ { "name": "path", "baseName": "path", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" }, { "name": "server", "baseName": "server", "type": "string" } ]; exports.V1NFSVolumeSource = V1NFSVolumeSource; /** * Namespace provides a scope for Names. Use of multiple namespaces is optional. */ class V1Namespace { static getAttributeTypeMap() { return V1Namespace.attributeTypeMap; } } 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" } ]; exports.V1Namespace = V1Namespace; /** * NamespaceList is a list of Namespaces. */ class V1NamespaceList { static getAttributeTypeMap() { return V1NamespaceList.attributeTypeMap; } } 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" } ]; exports.V1NamespaceList = V1NamespaceList; /** * NamespaceSpec describes the attributes on a Namespace. */ class V1NamespaceSpec { static getAttributeTypeMap() { return V1NamespaceSpec.attributeTypeMap; } } V1NamespaceSpec.discriminator = undefined; V1NamespaceSpec.attributeTypeMap = [ { "name": "finalizers", "baseName": "finalizers", "type": "Array" } ]; exports.V1NamespaceSpec = V1NamespaceSpec; /** * NamespaceStatus is information about the current status of a Namespace. */ class V1NamespaceStatus { static getAttributeTypeMap() { return V1NamespaceStatus.attributeTypeMap; } } V1NamespaceStatus.discriminator = undefined; V1NamespaceStatus.attributeTypeMap = [ { "name": "phase", "baseName": "phase", "type": "string" } ]; exports.V1NamespaceStatus = V1NamespaceStatus; /** * NetworkPolicy describes what network traffic is allowed for a set of Pods */ class V1NetworkPolicy { static getAttributeTypeMap() { return V1NetworkPolicy.attributeTypeMap; } } 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" } ]; exports.V1NetworkPolicy = V1NetworkPolicy; /** * 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; } } V1NetworkPolicyEgressRule.discriminator = undefined; V1NetworkPolicyEgressRule.attributeTypeMap = [ { "name": "ports", "baseName": "ports", "type": "Array" }, { "name": "to", "baseName": "to", "type": "Array" } ]; exports.V1NetworkPolicyEgressRule = V1NetworkPolicyEgressRule; /** * 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; } } V1NetworkPolicyIngressRule.discriminator = undefined; V1NetworkPolicyIngressRule.attributeTypeMap = [ { "name": "from", "baseName": "from", "type": "Array" }, { "name": "ports", "baseName": "ports", "type": "Array" } ]; exports.V1NetworkPolicyIngressRule = V1NetworkPolicyIngressRule; /** * NetworkPolicyList is a list of NetworkPolicy objects. */ class V1NetworkPolicyList { static getAttributeTypeMap() { return V1NetworkPolicyList.attributeTypeMap; } } 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" } ]; exports.V1NetworkPolicyList = V1NetworkPolicyList; /** * NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed */ class V1NetworkPolicyPeer { static getAttributeTypeMap() { return V1NetworkPolicyPeer.attributeTypeMap; } } V1NetworkPolicyPeer.discriminator = undefined; V1NetworkPolicyPeer.attributeTypeMap = [ { "name": "ipBlock", "baseName": "ipBlock", "type": "V1IPBlock" }, { "name": "namespaceSelector", "baseName": "namespaceSelector", "type": "V1LabelSelector" }, { "name": "podSelector", "baseName": "podSelector", "type": "V1LabelSelector" } ]; exports.V1NetworkPolicyPeer = V1NetworkPolicyPeer; /** * NetworkPolicyPort describes a port to allow traffic on */ class V1NetworkPolicyPort { static getAttributeTypeMap() { return V1NetworkPolicyPort.attributeTypeMap; } } V1NetworkPolicyPort.discriminator = undefined; V1NetworkPolicyPort.attributeTypeMap = [ { "name": "port", "baseName": "port", "type": "any" }, { "name": "protocol", "baseName": "protocol", "type": "string" } ]; exports.V1NetworkPolicyPort = V1NetworkPolicyPort; /** * NetworkPolicySpec provides the specification of a NetworkPolicy */ class V1NetworkPolicySpec { static getAttributeTypeMap() { return V1NetworkPolicySpec.attributeTypeMap; } } 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" } ]; exports.V1NetworkPolicySpec = V1NetworkPolicySpec; /** * 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; } } 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" } ]; exports.V1Node = V1Node; /** * NodeAddress contains information for the node's address. */ class V1NodeAddress { static getAttributeTypeMap() { return V1NodeAddress.attributeTypeMap; } } V1NodeAddress.discriminator = undefined; V1NodeAddress.attributeTypeMap = [ { "name": "address", "baseName": "address", "type": "string" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1NodeAddress = V1NodeAddress; /** * Node affinity is a group of node affinity scheduling rules. */ class V1NodeAffinity { static getAttributeTypeMap() { return V1NodeAffinity.attributeTypeMap; } } V1NodeAffinity.discriminator = undefined; V1NodeAffinity.attributeTypeMap = [ { "name": "preferredDuringSchedulingIgnoredDuringExecution", "baseName": "preferredDuringSchedulingIgnoredDuringExecution", "type": "Array" }, { "name": "requiredDuringSchedulingIgnoredDuringExecution", "baseName": "requiredDuringSchedulingIgnoredDuringExecution", "type": "V1NodeSelector" } ]; exports.V1NodeAffinity = V1NodeAffinity; /** * NodeCondition contains condition information for a node. */ class V1NodeCondition { static getAttributeTypeMap() { return V1NodeCondition.attributeTypeMap; } } 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" } ]; exports.V1NodeCondition = V1NodeCondition; /** * NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. */ class V1NodeConfigSource { static getAttributeTypeMap() { return V1NodeConfigSource.attributeTypeMap; } } V1NodeConfigSource.discriminator = undefined; V1NodeConfigSource.attributeTypeMap = [ { "name": "configMap", "baseName": "configMap", "type": "V1ConfigMapNodeConfigSource" } ]; exports.V1NodeConfigSource = V1NodeConfigSource; /** * NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. */ class V1NodeConfigStatus { static getAttributeTypeMap() { return V1NodeConfigStatus.attributeTypeMap; } } 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" } ]; exports.V1NodeConfigStatus = V1NodeConfigStatus; /** * NodeDaemonEndpoints lists ports opened by daemons running on the Node. */ class V1NodeDaemonEndpoints { static getAttributeTypeMap() { return V1NodeDaemonEndpoints.attributeTypeMap; } } V1NodeDaemonEndpoints.discriminator = undefined; V1NodeDaemonEndpoints.attributeTypeMap = [ { "name": "kubeletEndpoint", "baseName": "kubeletEndpoint", "type": "V1DaemonEndpoint" } ]; exports.V1NodeDaemonEndpoints = V1NodeDaemonEndpoints; /** * NodeList is the whole list of all Nodes which have been registered with master. */ class V1NodeList { static getAttributeTypeMap() { return V1NodeList.attributeTypeMap; } } 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" } ]; exports.V1NodeList = V1NodeList; /** * 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; } } V1NodeSelector.discriminator = undefined; V1NodeSelector.attributeTypeMap = [ { "name": "nodeSelectorTerms", "baseName": "nodeSelectorTerms", "type": "Array" } ]; exports.V1NodeSelector = V1NodeSelector; /** * 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; } } V1NodeSelectorRequirement.discriminator = undefined; V1NodeSelectorRequirement.attributeTypeMap = [ { "name": "key", "baseName": "key", "type": "string" }, { "name": "operator", "baseName": "operator", "type": "string" }, { "name": "values", "baseName": "values", "type": "Array" } ]; exports.V1NodeSelectorRequirement = V1NodeSelectorRequirement; /** * 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; } } V1NodeSelectorTerm.discriminator = undefined; V1NodeSelectorTerm.attributeTypeMap = [ { "name": "matchExpressions", "baseName": "matchExpressions", "type": "Array" }, { "name": "matchFields", "baseName": "matchFields", "type": "Array" } ]; exports.V1NodeSelectorTerm = V1NodeSelectorTerm; /** * NodeSpec describes the attributes that a node is created with. */ class V1NodeSpec { static getAttributeTypeMap() { return V1NodeSpec.attributeTypeMap; } } V1NodeSpec.discriminator = undefined; V1NodeSpec.attributeTypeMap = [ { "name": "configSource", "baseName": "configSource", "type": "V1NodeConfigSource" }, { "name": "externalID", "baseName": "externalID", "type": "string" }, { "name": "podCIDR", "baseName": "podCIDR", "type": "string" }, { "name": "providerID", "baseName": "providerID", "type": "string" }, { "name": "taints", "baseName": "taints", "type": "Array" }, { "name": "unschedulable", "baseName": "unschedulable", "type": "boolean" } ]; exports.V1NodeSpec = V1NodeSpec; /** * NodeStatus is information about the current status of a node. */ class V1NodeStatus { static getAttributeTypeMap() { return V1NodeStatus.attributeTypeMap; } } 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" } ]; exports.V1NodeStatus = V1NodeStatus; /** * NodeSystemInfo is a set of ids/uuids to uniquely identify the node. */ class V1NodeSystemInfo { static getAttributeTypeMap() { return V1NodeSystemInfo.attributeTypeMap; } } 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" } ]; exports.V1NodeSystemInfo = V1NodeSystemInfo; /** * NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface */ class V1NonResourceAttributes { static getAttributeTypeMap() { return V1NonResourceAttributes.attributeTypeMap; } } V1NonResourceAttributes.discriminator = undefined; V1NonResourceAttributes.attributeTypeMap = [ { "name": "path", "baseName": "path", "type": "string" }, { "name": "verb", "baseName": "verb", "type": "string" } ]; exports.V1NonResourceAttributes = V1NonResourceAttributes; /** * NonResourceRule holds information that describes a rule for the non-resource */ class V1NonResourceRule { static getAttributeTypeMap() { return V1NonResourceRule.attributeTypeMap; } } V1NonResourceRule.discriminator = undefined; V1NonResourceRule.attributeTypeMap = [ { "name": "nonResourceURLs", "baseName": "nonResourceURLs", "type": "Array" }, { "name": "verbs", "baseName": "verbs", "type": "Array" } ]; exports.V1NonResourceRule = V1NonResourceRule; /** * ObjectFieldSelector selects an APIVersioned field of an object. */ class V1ObjectFieldSelector { static getAttributeTypeMap() { return V1ObjectFieldSelector.attributeTypeMap; } } V1ObjectFieldSelector.discriminator = undefined; V1ObjectFieldSelector.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "fieldPath", "baseName": "fieldPath", "type": "string" } ]; exports.V1ObjectFieldSelector = V1ObjectFieldSelector; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. */ class V1ObjectMeta { static getAttributeTypeMap() { return V1ObjectMeta.attributeTypeMap; } } 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": "initializers", "baseName": "initializers", "type": "V1Initializers" }, { "name": "labels", "baseName": "labels", "type": "{ [key: string]: string; }" }, { "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" } ]; exports.V1ObjectMeta = V1ObjectMeta; /** * ObjectReference contains enough information to let you inspect or modify the referred object. */ class V1ObjectReference { static getAttributeTypeMap() { return V1ObjectReference.attributeTypeMap; } } 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" } ]; exports.V1ObjectReference = V1ObjectReference; /** * 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; } } 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" } ]; exports.V1OwnerReference = V1OwnerReference; /** * 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; } } 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" } ]; exports.V1PersistentVolume = V1PersistentVolume; /** * PersistentVolumeClaim is a user's request for and claim to a persistent volume */ class V1PersistentVolumeClaim { static getAttributeTypeMap() { return V1PersistentVolumeClaim.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeClaim = V1PersistentVolumeClaim; /** * PersistentVolumeClaimCondition contails details about state of pvc */ class V1PersistentVolumeClaimCondition { static getAttributeTypeMap() { return V1PersistentVolumeClaimCondition.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition; /** * PersistentVolumeClaimList is a list of PersistentVolumeClaim items. */ class V1PersistentVolumeClaimList { static getAttributeTypeMap() { return V1PersistentVolumeClaimList.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeClaimList = V1PersistentVolumeClaimList; /** * PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes */ class V1PersistentVolumeClaimSpec { static getAttributeTypeMap() { return V1PersistentVolumeClaimSpec.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec; /** * PersistentVolumeClaimStatus is the current status of a persistent volume claim. */ class V1PersistentVolumeClaimStatus { static getAttributeTypeMap() { return V1PersistentVolumeClaimStatus.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus; /** * 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; } } V1PersistentVolumeClaimVolumeSource.discriminator = undefined; V1PersistentVolumeClaimVolumeSource.attributeTypeMap = [ { "name": "claimName", "baseName": "claimName", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" } ]; exports.V1PersistentVolumeClaimVolumeSource = V1PersistentVolumeClaimVolumeSource; /** * PersistentVolumeList is a list of PersistentVolume items. */ class V1PersistentVolumeList { static getAttributeTypeMap() { return V1PersistentVolumeList.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeList = V1PersistentVolumeList; /** * PersistentVolumeSpec is the specification of a persistent volume. */ class V1PersistentVolumeSpec { static getAttributeTypeMap() { return V1PersistentVolumeSpec.attributeTypeMap; } } 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" } ]; exports.V1PersistentVolumeSpec = V1PersistentVolumeSpec; /** * PersistentVolumeStatus is the current status of a persistent volume. */ class V1PersistentVolumeStatus { static getAttributeTypeMap() { return V1PersistentVolumeStatus.attributeTypeMap; } } V1PersistentVolumeStatus.discriminator = undefined; V1PersistentVolumeStatus.attributeTypeMap = [ { "name": "message", "baseName": "message", "type": "string" }, { "name": "phase", "baseName": "phase", "type": "string" }, { "name": "reason", "baseName": "reason", "type": "string" } ]; exports.V1PersistentVolumeStatus = V1PersistentVolumeStatus; /** * Represents a Photon Controller persistent disk resource. */ class V1PhotonPersistentDiskVolumeSource { static getAttributeTypeMap() { return V1PhotonPersistentDiskVolumeSource.attributeTypeMap; } } V1PhotonPersistentDiskVolumeSource.discriminator = undefined; V1PhotonPersistentDiskVolumeSource.attributeTypeMap = [ { "name": "fsType", "baseName": "fsType", "type": "string" }, { "name": "pdID", "baseName": "pdID", "type": "string" } ]; exports.V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource; /** * 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; } } 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" } ]; exports.V1Pod = V1Pod; /** * Pod affinity is a group of inter pod affinity scheduling rules. */ class V1PodAffinity { static getAttributeTypeMap() { return V1PodAffinity.attributeTypeMap; } } V1PodAffinity.discriminator = undefined; V1PodAffinity.attributeTypeMap = [ { "name": "preferredDuringSchedulingIgnoredDuringExecution", "baseName": "preferredDuringSchedulingIgnoredDuringExecution", "type": "Array" }, { "name": "requiredDuringSchedulingIgnoredDuringExecution", "baseName": "requiredDuringSchedulingIgnoredDuringExecution", "type": "Array" } ]; exports.V1PodAffinity = V1PodAffinity; /** * 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; } } V1PodAffinityTerm.discriminator = undefined; V1PodAffinityTerm.attributeTypeMap = [ { "name": "labelSelector", "baseName": "labelSelector", "type": "V1LabelSelector" }, { "name": "namespaces", "baseName": "namespaces", "type": "Array" }, { "name": "topologyKey", "baseName": "topologyKey", "type": "string" } ]; exports.V1PodAffinityTerm = V1PodAffinityTerm; /** * Pod anti affinity is a group of inter pod anti affinity scheduling rules. */ class V1PodAntiAffinity { static getAttributeTypeMap() { return V1PodAntiAffinity.attributeTypeMap; } } V1PodAntiAffinity.discriminator = undefined; V1PodAntiAffinity.attributeTypeMap = [ { "name": "preferredDuringSchedulingIgnoredDuringExecution", "baseName": "preferredDuringSchedulingIgnoredDuringExecution", "type": "Array" }, { "name": "requiredDuringSchedulingIgnoredDuringExecution", "baseName": "requiredDuringSchedulingIgnoredDuringExecution", "type": "Array" } ]; exports.V1PodAntiAffinity = V1PodAntiAffinity; /** * PodCondition contains details for the current condition of this pod. */ class V1PodCondition { static getAttributeTypeMap() { return V1PodCondition.attributeTypeMap; } } 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" } ]; exports.V1PodCondition = V1PodCondition; /** * PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. */ class V1PodDNSConfig { static getAttributeTypeMap() { return V1PodDNSConfig.attributeTypeMap; } } V1PodDNSConfig.discriminator = undefined; V1PodDNSConfig.attributeTypeMap = [ { "name": "nameservers", "baseName": "nameservers", "type": "Array" }, { "name": "options", "baseName": "options", "type": "Array" }, { "name": "searches", "baseName": "searches", "type": "Array" } ]; exports.V1PodDNSConfig = V1PodDNSConfig; /** * PodDNSConfigOption defines DNS resolver options of a pod. */ class V1PodDNSConfigOption { static getAttributeTypeMap() { return V1PodDNSConfigOption.attributeTypeMap; } } V1PodDNSConfigOption.discriminator = undefined; V1PodDNSConfigOption.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "value", "baseName": "value", "type": "string" } ]; exports.V1PodDNSConfigOption = V1PodDNSConfigOption; /** * PodList is a list of Pods. */ class V1PodList { static getAttributeTypeMap() { return V1PodList.attributeTypeMap; } } 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" } ]; exports.V1PodList = V1PodList; /** * PodReadinessGate contains the reference to a pod condition */ class V1PodReadinessGate { static getAttributeTypeMap() { return V1PodReadinessGate.attributeTypeMap; } } V1PodReadinessGate.discriminator = undefined; V1PodReadinessGate.attributeTypeMap = [ { "name": "conditionType", "baseName": "conditionType", "type": "string" } ]; exports.V1PodReadinessGate = V1PodReadinessGate; /** * 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; } } V1PodSecurityContext.discriminator = undefined; V1PodSecurityContext.attributeTypeMap = [ { "name": "fsGroup", "baseName": "fsGroup", "type": "number" }, { "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": "supplementalGroups", "baseName": "supplementalGroups", "type": "Array" }, { "name": "sysctls", "baseName": "sysctls", "type": "Array" } ]; exports.V1PodSecurityContext = V1PodSecurityContext; /** * PodSpec is a description of a pod. */ class V1PodSpec { static getAttributeTypeMap() { return V1PodSpec.attributeTypeMap; } } 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": "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": "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": "shareProcessNamespace", "baseName": "shareProcessNamespace", "type": "boolean" }, { "name": "subdomain", "baseName": "subdomain", "type": "string" }, { "name": "terminationGracePeriodSeconds", "baseName": "terminationGracePeriodSeconds", "type": "number" }, { "name": "tolerations", "baseName": "tolerations", "type": "Array" }, { "name": "volumes", "baseName": "volumes", "type": "Array" } ]; exports.V1PodSpec = V1PodSpec; /** * 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; } } V1PodStatus.discriminator = undefined; V1PodStatus.attributeTypeMap = [ { "name": "conditions", "baseName": "conditions", "type": "Array" }, { "name": "containerStatuses", "baseName": "containerStatuses", "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": "qosClass", "baseName": "qosClass", "type": "string" }, { "name": "reason", "baseName": "reason", "type": "string" }, { "name": "startTime", "baseName": "startTime", "type": "Date" } ]; exports.V1PodStatus = V1PodStatus; /** * PodTemplate describes a template for creating copies of a predefined pod. */ class V1PodTemplate { static getAttributeTypeMap() { return V1PodTemplate.attributeTypeMap; } } 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" } ]; exports.V1PodTemplate = V1PodTemplate; /** * PodTemplateList is a list of PodTemplates. */ class V1PodTemplateList { static getAttributeTypeMap() { return V1PodTemplateList.attributeTypeMap; } } 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" } ]; exports.V1PodTemplateList = V1PodTemplateList; /** * PodTemplateSpec describes the data a pod should have when created from a template */ class V1PodTemplateSpec { static getAttributeTypeMap() { return V1PodTemplateSpec.attributeTypeMap; } } V1PodTemplateSpec.discriminator = undefined; V1PodTemplateSpec.attributeTypeMap = [ { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1PodSpec" } ]; exports.V1PodTemplateSpec = V1PodTemplateSpec; /** * 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; } } 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" } ]; exports.V1PolicyRule = V1PolicyRule; /** * PortworxVolumeSource represents a Portworx volume resource. */ class V1PortworxVolumeSource { static getAttributeTypeMap() { return V1PortworxVolumeSource.attributeTypeMap; } } V1PortworxVolumeSource.discriminator = undefined; V1PortworxVolumeSource.attributeTypeMap = [ { "name": "fsType", "baseName": "fsType", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" }, { "name": "volumeID", "baseName": "volumeID", "type": "string" } ]; exports.V1PortworxVolumeSource = V1PortworxVolumeSource; /** * Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. */ class V1Preconditions { static getAttributeTypeMap() { return V1Preconditions.attributeTypeMap; } } V1Preconditions.discriminator = undefined; V1Preconditions.attributeTypeMap = [ { "name": "uid", "baseName": "uid", "type": "string" } ]; exports.V1Preconditions = V1Preconditions; /** * 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; } } V1PreferredSchedulingTerm.discriminator = undefined; V1PreferredSchedulingTerm.attributeTypeMap = [ { "name": "preference", "baseName": "preference", "type": "V1NodeSelectorTerm" }, { "name": "weight", "baseName": "weight", "type": "number" } ]; exports.V1PreferredSchedulingTerm = V1PreferredSchedulingTerm; /** * 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; } } 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" } ]; exports.V1Probe = V1Probe; /** * Represents a projected volume source */ class V1ProjectedVolumeSource { static getAttributeTypeMap() { return V1ProjectedVolumeSource.attributeTypeMap; } } V1ProjectedVolumeSource.discriminator = undefined; V1ProjectedVolumeSource.attributeTypeMap = [ { "name": "defaultMode", "baseName": "defaultMode", "type": "number" }, { "name": "sources", "baseName": "sources", "type": "Array" } ]; exports.V1ProjectedVolumeSource = V1ProjectedVolumeSource; /** * 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; } } V1QuobyteVolumeSource.discriminator = undefined; V1QuobyteVolumeSource.attributeTypeMap = [ { "name": "group", "baseName": "group", "type": "string" }, { "name": "readOnly", "baseName": "readOnly", "type": "boolean" }, { "name": "registry", "baseName": "registry", "type": "string" }, { "name": "user", "baseName": "user", "type": "string" }, { "name": "volume", "baseName": "volume", "type": "string" } ]; exports.V1QuobyteVolumeSource = V1QuobyteVolumeSource; /** * 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; } } 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" } ]; exports.V1RBDPersistentVolumeSource = V1RBDPersistentVolumeSource; /** * 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; } } 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" } ]; exports.V1RBDVolumeSource = V1RBDVolumeSource; /** * ReplicaSet ensures that a specified number of pod replicas are running at any given time. */ class V1ReplicaSet { static getAttributeTypeMap() { return V1ReplicaSet.attributeTypeMap; } } 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" } ]; exports.V1ReplicaSet = V1ReplicaSet; /** * ReplicaSetCondition describes the state of a replica set at a certain point. */ class V1ReplicaSetCondition { static getAttributeTypeMap() { return V1ReplicaSetCondition.attributeTypeMap; } } 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" } ]; exports.V1ReplicaSetCondition = V1ReplicaSetCondition; /** * ReplicaSetList is a collection of ReplicaSets. */ class V1ReplicaSetList { static getAttributeTypeMap() { return V1ReplicaSetList.attributeTypeMap; } } 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" } ]; exports.V1ReplicaSetList = V1ReplicaSetList; /** * ReplicaSetSpec is the specification of a ReplicaSet. */ class V1ReplicaSetSpec { static getAttributeTypeMap() { return V1ReplicaSetSpec.attributeTypeMap; } } 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" } ]; exports.V1ReplicaSetSpec = V1ReplicaSetSpec; /** * ReplicaSetStatus represents the current status of a ReplicaSet. */ class V1ReplicaSetStatus { static getAttributeTypeMap() { return V1ReplicaSetStatus.attributeTypeMap; } } 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" } ]; exports.V1ReplicaSetStatus = V1ReplicaSetStatus; /** * ReplicationController represents the configuration of a replication controller. */ class V1ReplicationController { static getAttributeTypeMap() { return V1ReplicationController.attributeTypeMap; } } 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" } ]; exports.V1ReplicationController = V1ReplicationController; /** * ReplicationControllerCondition describes the state of a replication controller at a certain point. */ class V1ReplicationControllerCondition { static getAttributeTypeMap() { return V1ReplicationControllerCondition.attributeTypeMap; } } 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" } ]; exports.V1ReplicationControllerCondition = V1ReplicationControllerCondition; /** * ReplicationControllerList is a collection of replication controllers. */ class V1ReplicationControllerList { static getAttributeTypeMap() { return V1ReplicationControllerList.attributeTypeMap; } } 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" } ]; exports.V1ReplicationControllerList = V1ReplicationControllerList; /** * ReplicationControllerSpec is the specification of a replication controller. */ class V1ReplicationControllerSpec { static getAttributeTypeMap() { return V1ReplicationControllerSpec.attributeTypeMap; } } 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" } ]; exports.V1ReplicationControllerSpec = V1ReplicationControllerSpec; /** * ReplicationControllerStatus represents the current status of a replication controller. */ class V1ReplicationControllerStatus { static getAttributeTypeMap() { return V1ReplicationControllerStatus.attributeTypeMap; } } 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" } ]; exports.V1ReplicationControllerStatus = V1ReplicationControllerStatus; /** * ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface */ class V1ResourceAttributes { static getAttributeTypeMap() { return V1ResourceAttributes.attributeTypeMap; } } 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" } ]; exports.V1ResourceAttributes = V1ResourceAttributes; /** * ResourceFieldSelector represents container resources (cpu, memory) and their output format */ class V1ResourceFieldSelector { static getAttributeTypeMap() { return V1ResourceFieldSelector.attributeTypeMap; } } V1ResourceFieldSelector.discriminator = undefined; V1ResourceFieldSelector.attributeTypeMap = [ { "name": "containerName", "baseName": "containerName", "type": "string" }, { "name": "divisor", "baseName": "divisor", "type": "string" }, { "name": "resource", "baseName": "resource", "type": "string" } ]; exports.V1ResourceFieldSelector = V1ResourceFieldSelector; /** * ResourceQuota sets aggregate quota restrictions enforced per namespace */ class V1ResourceQuota { static getAttributeTypeMap() { return V1ResourceQuota.attributeTypeMap; } } 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" } ]; exports.V1ResourceQuota = V1ResourceQuota; /** * ResourceQuotaList is a list of ResourceQuota items. */ class V1ResourceQuotaList { static getAttributeTypeMap() { return V1ResourceQuotaList.attributeTypeMap; } } 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" } ]; exports.V1ResourceQuotaList = V1ResourceQuotaList; /** * ResourceQuotaSpec defines the desired hard limits to enforce for Quota. */ class V1ResourceQuotaSpec { static getAttributeTypeMap() { return V1ResourceQuotaSpec.attributeTypeMap; } } 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" } ]; exports.V1ResourceQuotaSpec = V1ResourceQuotaSpec; /** * ResourceQuotaStatus defines the enforced hard limits and observed use. */ class V1ResourceQuotaStatus { static getAttributeTypeMap() { return V1ResourceQuotaStatus.attributeTypeMap; } } V1ResourceQuotaStatus.discriminator = undefined; V1ResourceQuotaStatus.attributeTypeMap = [ { "name": "hard", "baseName": "hard", "type": "{ [key: string]: string; }" }, { "name": "used", "baseName": "used", "type": "{ [key: string]: string; }" } ]; exports.V1ResourceQuotaStatus = V1ResourceQuotaStatus; /** * ResourceRequirements describes the compute resource requirements. */ class V1ResourceRequirements { static getAttributeTypeMap() { return V1ResourceRequirements.attributeTypeMap; } } V1ResourceRequirements.discriminator = undefined; V1ResourceRequirements.attributeTypeMap = [ { "name": "limits", "baseName": "limits", "type": "{ [key: string]: string; }" }, { "name": "requests", "baseName": "requests", "type": "{ [key: string]: string; }" } ]; exports.V1ResourceRequirements = V1ResourceRequirements; /** * 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; } } 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" } ]; exports.V1ResourceRule = V1ResourceRule; /** * 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; } } 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" } ]; exports.V1Role = V1Role; /** * 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; } } 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" } ]; exports.V1RoleBinding = V1RoleBinding; /** * RoleBindingList is a collection of RoleBindings */ class V1RoleBindingList { static getAttributeTypeMap() { return V1RoleBindingList.attributeTypeMap; } } 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" } ]; exports.V1RoleBindingList = V1RoleBindingList; /** * RoleList is a collection of Roles */ class V1RoleList { static getAttributeTypeMap() { return V1RoleList.attributeTypeMap; } } 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" } ]; exports.V1RoleList = V1RoleList; /** * RoleRef contains information that points to the role being used */ class V1RoleRef { static getAttributeTypeMap() { return V1RoleRef.attributeTypeMap; } } V1RoleRef.discriminator = undefined; V1RoleRef.attributeTypeMap = [ { "name": "apiGroup", "baseName": "apiGroup", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1RoleRef = V1RoleRef; /** * Spec to control the desired behavior of daemon set rolling update. */ class V1RollingUpdateDaemonSet { static getAttributeTypeMap() { return V1RollingUpdateDaemonSet.attributeTypeMap; } } V1RollingUpdateDaemonSet.discriminator = undefined; V1RollingUpdateDaemonSet.attributeTypeMap = [ { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet; /** * Spec to control the desired behavior of rolling update. */ class V1RollingUpdateDeployment { static getAttributeTypeMap() { return V1RollingUpdateDeployment.attributeTypeMap; } } V1RollingUpdateDeployment.discriminator = undefined; V1RollingUpdateDeployment.attributeTypeMap = [ { "name": "maxSurge", "baseName": "maxSurge", "type": "any" }, { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.V1RollingUpdateDeployment = V1RollingUpdateDeployment; /** * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. */ class V1RollingUpdateStatefulSetStrategy { static getAttributeTypeMap() { return V1RollingUpdateStatefulSetStrategy.attributeTypeMap; } } V1RollingUpdateStatefulSetStrategy.discriminator = undefined; V1RollingUpdateStatefulSetStrategy.attributeTypeMap = [ { "name": "partition", "baseName": "partition", "type": "number" } ]; exports.V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy; /** * SELinuxOptions are the labels to be applied to the container */ class V1SELinuxOptions { static getAttributeTypeMap() { return V1SELinuxOptions.attributeTypeMap; } } 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" } ]; exports.V1SELinuxOptions = V1SELinuxOptions; /** * Scale represents a scaling request for a resource. */ class V1Scale { static getAttributeTypeMap() { return V1Scale.attributeTypeMap; } } 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" } ]; exports.V1Scale = V1Scale; /** * ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume */ class V1ScaleIOPersistentVolumeSource { static getAttributeTypeMap() { return V1ScaleIOPersistentVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource; /** * ScaleIOVolumeSource represents a persistent ScaleIO volume */ class V1ScaleIOVolumeSource { static getAttributeTypeMap() { return V1ScaleIOVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1ScaleIOVolumeSource = V1ScaleIOVolumeSource; /** * ScaleSpec describes the attributes of a scale subresource. */ class V1ScaleSpec { static getAttributeTypeMap() { return V1ScaleSpec.attributeTypeMap; } } V1ScaleSpec.discriminator = undefined; V1ScaleSpec.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" } ]; exports.V1ScaleSpec = V1ScaleSpec; /** * ScaleStatus represents the current status of a scale subresource. */ class V1ScaleStatus { static getAttributeTypeMap() { return V1ScaleStatus.attributeTypeMap; } } V1ScaleStatus.discriminator = undefined; V1ScaleStatus.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" }, { "name": "selector", "baseName": "selector", "type": "string" } ]; exports.V1ScaleStatus = V1ScaleStatus; /** * A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. */ class V1ScopeSelector { static getAttributeTypeMap() { return V1ScopeSelector.attributeTypeMap; } } V1ScopeSelector.discriminator = undefined; V1ScopeSelector.attributeTypeMap = [ { "name": "matchExpressions", "baseName": "matchExpressions", "type": "Array" } ]; exports.V1ScopeSelector = V1ScopeSelector; /** * 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; } } V1ScopedResourceSelectorRequirement.discriminator = undefined; V1ScopedResourceSelectorRequirement.attributeTypeMap = [ { "name": "operator", "baseName": "operator", "type": "string" }, { "name": "scopeName", "baseName": "scopeName", "type": "string" }, { "name": "values", "baseName": "values", "type": "Array" } ]; exports.V1ScopedResourceSelectorRequirement = V1ScopedResourceSelectorRequirement; /** * 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; } } V1Secret.discriminator = undefined; V1Secret.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "data", "baseName": "data", "type": "{ [key: string]: string; }" }, { "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" } ]; exports.V1Secret = V1Secret; /** * 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; } } V1SecretEnvSource.discriminator = undefined; V1SecretEnvSource.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "optional", "baseName": "optional", "type": "boolean" } ]; exports.V1SecretEnvSource = V1SecretEnvSource; /** * SecretKeySelector selects a key of a Secret. */ class V1SecretKeySelector { static getAttributeTypeMap() { return V1SecretKeySelector.attributeTypeMap; } } V1SecretKeySelector.discriminator = undefined; V1SecretKeySelector.attributeTypeMap = [ { "name": "key", "baseName": "key", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "optional", "baseName": "optional", "type": "boolean" } ]; exports.V1SecretKeySelector = V1SecretKeySelector; /** * SecretList is a list of Secret. */ class V1SecretList { static getAttributeTypeMap() { return V1SecretList.attributeTypeMap; } } 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" } ]; exports.V1SecretList = V1SecretList; /** * 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; } } V1SecretProjection.discriminator = undefined; V1SecretProjection.attributeTypeMap = [ { "name": "items", "baseName": "items", "type": "Array" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "optional", "baseName": "optional", "type": "boolean" } ]; exports.V1SecretProjection = V1SecretProjection; /** * SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace */ class V1SecretReference { static getAttributeTypeMap() { return V1SecretReference.attributeTypeMap; } } V1SecretReference.discriminator = undefined; V1SecretReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" } ]; exports.V1SecretReference = V1SecretReference; /** * 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; } } 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" } ]; exports.V1SecretVolumeSource = V1SecretVolumeSource; /** * 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; } } 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" } ]; exports.V1SecurityContext = V1SecurityContext; /** * 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; } } 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" } ]; exports.V1SelfSubjectAccessReview = V1SelfSubjectAccessReview; /** * SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ class V1SelfSubjectAccessReviewSpec { static getAttributeTypeMap() { return V1SelfSubjectAccessReviewSpec.attributeTypeMap; } } V1SelfSubjectAccessReviewSpec.discriminator = undefined; V1SelfSubjectAccessReviewSpec.attributeTypeMap = [ { "name": "nonResourceAttributes", "baseName": "nonResourceAttributes", "type": "V1NonResourceAttributes" }, { "name": "resourceAttributes", "baseName": "resourceAttributes", "type": "V1ResourceAttributes" } ]; exports.V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec; /** * 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; } } 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" } ]; exports.V1SelfSubjectRulesReview = V1SelfSubjectRulesReview; class V1SelfSubjectRulesReviewSpec { static getAttributeTypeMap() { return V1SelfSubjectRulesReviewSpec.attributeTypeMap; } } V1SelfSubjectRulesReviewSpec.discriminator = undefined; V1SelfSubjectRulesReviewSpec.attributeTypeMap = [ { "name": "namespace", "baseName": "namespace", "type": "string" } ]; exports.V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec; /** * 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; } } V1ServerAddressByClientCIDR.discriminator = undefined; V1ServerAddressByClientCIDR.attributeTypeMap = [ { "name": "clientCIDR", "baseName": "clientCIDR", "type": "string" }, { "name": "serverAddress", "baseName": "serverAddress", "type": "string" } ]; exports.V1ServerAddressByClientCIDR = V1ServerAddressByClientCIDR; /** * 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; } } 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" } ]; exports.V1Service = V1Service; /** * 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; } } 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" } ]; exports.V1ServiceAccount = V1ServiceAccount; /** * ServiceAccountList is a list of ServiceAccount objects */ class V1ServiceAccountList { static getAttributeTypeMap() { return V1ServiceAccountList.attributeTypeMap; } } 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" } ]; exports.V1ServiceAccountList = V1ServiceAccountList; /** * 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; } } V1ServiceAccountTokenProjection.discriminator = undefined; V1ServiceAccountTokenProjection.attributeTypeMap = [ { "name": "audience", "baseName": "audience", "type": "string" }, { "name": "expirationSeconds", "baseName": "expirationSeconds", "type": "number" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.V1ServiceAccountTokenProjection = V1ServiceAccountTokenProjection; /** * ServiceList holds a list of services. */ class V1ServiceList { static getAttributeTypeMap() { return V1ServiceList.attributeTypeMap; } } 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" } ]; exports.V1ServiceList = V1ServiceList; /** * ServicePort contains information on service's port. */ class V1ServicePort { static getAttributeTypeMap() { return V1ServicePort.attributeTypeMap; } } V1ServicePort.discriminator = undefined; V1ServicePort.attributeTypeMap = [ { "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": "any" } ]; exports.V1ServicePort = V1ServicePort; /** * ServiceReference holds a reference to Service.legacy.k8s.io */ class V1ServiceReference { static getAttributeTypeMap() { return V1ServiceReference.attributeTypeMap; } } V1ServiceReference.discriminator = undefined; V1ServiceReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" } ]; exports.V1ServiceReference = V1ServiceReference; /** * ServiceSpec describes the attributes that a user creates on a service. */ class V1ServiceSpec { static getAttributeTypeMap() { return V1ServiceSpec.attributeTypeMap; } } V1ServiceSpec.discriminator = undefined; V1ServiceSpec.attributeTypeMap = [ { "name": "clusterIP", "baseName": "clusterIP", "type": "string" }, { "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": "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": "type", "baseName": "type", "type": "string" } ]; exports.V1ServiceSpec = V1ServiceSpec; /** * ServiceStatus represents the current status of a service. */ class V1ServiceStatus { static getAttributeTypeMap() { return V1ServiceStatus.attributeTypeMap; } } V1ServiceStatus.discriminator = undefined; V1ServiceStatus.attributeTypeMap = [ { "name": "loadBalancer", "baseName": "loadBalancer", "type": "V1LoadBalancerStatus" } ]; exports.V1ServiceStatus = V1ServiceStatus; /** * SessionAffinityConfig represents the configurations of session affinity. */ class V1SessionAffinityConfig { static getAttributeTypeMap() { return V1SessionAffinityConfig.attributeTypeMap; } } V1SessionAffinityConfig.discriminator = undefined; V1SessionAffinityConfig.attributeTypeMap = [ { "name": "clientIP", "baseName": "clientIP", "type": "V1ClientIPConfig" } ]; exports.V1SessionAffinityConfig = V1SessionAffinityConfig; /** * 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; } } 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" } ]; exports.V1StatefulSet = V1StatefulSet; /** * StatefulSetCondition describes the state of a statefulset at a certain point. */ class V1StatefulSetCondition { static getAttributeTypeMap() { return V1StatefulSetCondition.attributeTypeMap; } } 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" } ]; exports.V1StatefulSetCondition = V1StatefulSetCondition; /** * StatefulSetList is a collection of StatefulSets. */ class V1StatefulSetList { static getAttributeTypeMap() { return V1StatefulSetList.attributeTypeMap; } } 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" } ]; exports.V1StatefulSetList = V1StatefulSetList; /** * A StatefulSetSpec is the specification of a StatefulSet. */ class V1StatefulSetSpec { static getAttributeTypeMap() { return V1StatefulSetSpec.attributeTypeMap; } } 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" } ]; exports.V1StatefulSetSpec = V1StatefulSetSpec; /** * StatefulSetStatus represents the current state of a StatefulSet. */ class V1StatefulSetStatus { static getAttributeTypeMap() { return V1StatefulSetStatus.attributeTypeMap; } } 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" } ]; exports.V1StatefulSetStatus = V1StatefulSetStatus; /** * 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; } } V1StatefulSetUpdateStrategy.discriminator = undefined; V1StatefulSetUpdateStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1RollingUpdateStatefulSetStrategy" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1StatefulSetUpdateStrategy = V1StatefulSetUpdateStrategy; /** * Status is a return value for calls that don't return other objects. */ class V1Status { static getAttributeTypeMap() { return V1Status.attributeTypeMap; } } 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" } ]; exports.V1Status = V1Status; /** * StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. */ class V1StatusCause { static getAttributeTypeMap() { return V1StatusCause.attributeTypeMap; } } V1StatusCause.discriminator = undefined; V1StatusCause.attributeTypeMap = [ { "name": "field", "baseName": "field", "type": "string" }, { "name": "message", "baseName": "message", "type": "string" }, { "name": "reason", "baseName": "reason", "type": "string" } ]; exports.V1StatusCause = V1StatusCause; /** * 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; } } 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" } ]; exports.V1StatusDetails = V1StatusDetails; /** * 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; } } 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" } ]; exports.V1StorageClass = V1StorageClass; /** * StorageClassList is a collection of storage classes. */ class V1StorageClassList { static getAttributeTypeMap() { return V1StorageClassList.attributeTypeMap; } } 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" } ]; exports.V1StorageClassList = V1StorageClassList; /** * Represents a StorageOS persistent volume resource. */ class V1StorageOSPersistentVolumeSource { static getAttributeTypeMap() { return V1StorageOSPersistentVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource; /** * Represents a StorageOS persistent volume resource. */ class V1StorageOSVolumeSource { static getAttributeTypeMap() { return V1StorageOSVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1StorageOSVolumeSource = V1StorageOSVolumeSource; /** * 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; } } 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" } ]; exports.V1Subject = V1Subject; /** * SubjectAccessReview checks whether or not a user or group can perform an action. */ class V1SubjectAccessReview { static getAttributeTypeMap() { return V1SubjectAccessReview.attributeTypeMap; } } 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" } ]; exports.V1SubjectAccessReview = V1SubjectAccessReview; /** * SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ class V1SubjectAccessReviewSpec { static getAttributeTypeMap() { return V1SubjectAccessReviewSpec.attributeTypeMap; } } 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" } ]; exports.V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec; /** * SubjectAccessReviewStatus */ class V1SubjectAccessReviewStatus { static getAttributeTypeMap() { return V1SubjectAccessReviewStatus.attributeTypeMap; } } 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" } ]; exports.V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus; /** * 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; } } 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" } ]; exports.V1SubjectRulesReviewStatus = V1SubjectRulesReviewStatus; /** * Sysctl defines a kernel parameter to be set */ class V1Sysctl { static getAttributeTypeMap() { return V1Sysctl.attributeTypeMap; } } V1Sysctl.discriminator = undefined; V1Sysctl.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "value", "baseName": "value", "type": "string" } ]; exports.V1Sysctl = V1Sysctl; /** * TCPSocketAction describes an action based on opening a socket */ class V1TCPSocketAction { static getAttributeTypeMap() { return V1TCPSocketAction.attributeTypeMap; } } V1TCPSocketAction.discriminator = undefined; V1TCPSocketAction.attributeTypeMap = [ { "name": "host", "baseName": "host", "type": "string" }, { "name": "port", "baseName": "port", "type": "any" } ]; exports.V1TCPSocketAction = V1TCPSocketAction; /** * 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; } } 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" } ]; exports.V1Taint = V1Taint; /** * 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; } } 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" } ]; exports.V1TokenReview = V1TokenReview; /** * TokenReviewSpec is a description of the token authentication request. */ class V1TokenReviewSpec { static getAttributeTypeMap() { return V1TokenReviewSpec.attributeTypeMap; } } V1TokenReviewSpec.discriminator = undefined; V1TokenReviewSpec.attributeTypeMap = [ { "name": "audiences", "baseName": "audiences", "type": "Array" }, { "name": "token", "baseName": "token", "type": "string" } ]; exports.V1TokenReviewSpec = V1TokenReviewSpec; /** * TokenReviewStatus is the result of the token authentication request. */ class V1TokenReviewStatus { static getAttributeTypeMap() { return V1TokenReviewStatus.attributeTypeMap; } } 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" } ]; exports.V1TokenReviewStatus = V1TokenReviewStatus; /** * 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; } } 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" } ]; exports.V1Toleration = V1Toleration; /** * 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; } } V1TopologySelectorLabelRequirement.discriminator = undefined; V1TopologySelectorLabelRequirement.attributeTypeMap = [ { "name": "key", "baseName": "key", "type": "string" }, { "name": "values", "baseName": "values", "type": "Array" } ]; exports.V1TopologySelectorLabelRequirement = V1TopologySelectorLabelRequirement; /** * 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; } } V1TopologySelectorTerm.discriminator = undefined; V1TopologySelectorTerm.attributeTypeMap = [ { "name": "matchLabelExpressions", "baseName": "matchLabelExpressions", "type": "Array" } ]; exports.V1TopologySelectorTerm = V1TopologySelectorTerm; /** * TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. */ class V1TypedLocalObjectReference { static getAttributeTypeMap() { return V1TypedLocalObjectReference.attributeTypeMap; } } V1TypedLocalObjectReference.discriminator = undefined; V1TypedLocalObjectReference.attributeTypeMap = [ { "name": "apiGroup", "baseName": "apiGroup", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1TypedLocalObjectReference = V1TypedLocalObjectReference; /** * UserInfo holds the information about the user needed to implement the user.Info interface. */ class V1UserInfo { static getAttributeTypeMap() { return V1UserInfo.attributeTypeMap; } } 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" } ]; exports.V1UserInfo = V1UserInfo; /** * 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; } } 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": "downwardAPI", "baseName": "downwardAPI", "type": "V1DownwardAPIVolumeSource" }, { "name": "emptyDir", "baseName": "emptyDir", "type": "V1EmptyDirVolumeSource" }, { "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" } ]; exports.V1Volume = V1Volume; /** * 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; } } 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" } ]; exports.V1VolumeAttachment = V1VolumeAttachment; /** * VolumeAttachmentList is a collection of VolumeAttachment objects. */ class V1VolumeAttachmentList { static getAttributeTypeMap() { return V1VolumeAttachmentList.attributeTypeMap; } } 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" } ]; exports.V1VolumeAttachmentList = V1VolumeAttachmentList; /** * 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; } } V1VolumeAttachmentSource.discriminator = undefined; V1VolumeAttachmentSource.attributeTypeMap = [ { "name": "persistentVolumeName", "baseName": "persistentVolumeName", "type": "string" } ]; exports.V1VolumeAttachmentSource = V1VolumeAttachmentSource; /** * VolumeAttachmentSpec is the specification of a VolumeAttachment request. */ class V1VolumeAttachmentSpec { static getAttributeTypeMap() { return V1VolumeAttachmentSpec.attributeTypeMap; } } V1VolumeAttachmentSpec.discriminator = undefined; V1VolumeAttachmentSpec.attributeTypeMap = [ { "name": "attacher", "baseName": "attacher", "type": "string" }, { "name": "nodeName", "baseName": "nodeName", "type": "string" }, { "name": "source", "baseName": "source", "type": "V1VolumeAttachmentSource" } ]; exports.V1VolumeAttachmentSpec = V1VolumeAttachmentSpec; /** * VolumeAttachmentStatus is the status of a VolumeAttachment request. */ class V1VolumeAttachmentStatus { static getAttributeTypeMap() { return V1VolumeAttachmentStatus.attributeTypeMap; } } 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" } ]; exports.V1VolumeAttachmentStatus = V1VolumeAttachmentStatus; /** * volumeDevice describes a mapping of a raw block device within a container. */ class V1VolumeDevice { static getAttributeTypeMap() { return V1VolumeDevice.attributeTypeMap; } } V1VolumeDevice.discriminator = undefined; V1VolumeDevice.attributeTypeMap = [ { "name": "devicePath", "baseName": "devicePath", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1VolumeDevice = V1VolumeDevice; /** * VolumeError captures an error encountered during a volume operation. */ class V1VolumeError { static getAttributeTypeMap() { return V1VolumeError.attributeTypeMap; } } V1VolumeError.discriminator = undefined; V1VolumeError.attributeTypeMap = [ { "name": "message", "baseName": "message", "type": "string" }, { "name": "time", "baseName": "time", "type": "Date" } ]; exports.V1VolumeError = V1VolumeError; /** * VolumeMount describes a mounting of a Volume within a container. */ class V1VolumeMount { static getAttributeTypeMap() { return V1VolumeMount.attributeTypeMap; } } 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" } ]; exports.V1VolumeMount = V1VolumeMount; /** * VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. */ class V1VolumeNodeAffinity { static getAttributeTypeMap() { return V1VolumeNodeAffinity.attributeTypeMap; } } V1VolumeNodeAffinity.discriminator = undefined; V1VolumeNodeAffinity.attributeTypeMap = [ { "name": "required", "baseName": "required", "type": "V1NodeSelector" } ]; exports.V1VolumeNodeAffinity = V1VolumeNodeAffinity; /** * Projection that may be projected along with other supported volume types */ class V1VolumeProjection { static getAttributeTypeMap() { return V1VolumeProjection.attributeTypeMap; } } 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" } ]; exports.V1VolumeProjection = V1VolumeProjection; /** * Represents a vSphere volume resource. */ class V1VsphereVirtualDiskVolumeSource { static getAttributeTypeMap() { return V1VsphereVirtualDiskVolumeSource.attributeTypeMap; } } 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" } ]; exports.V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource; /** * Event represents a single event to a watched resource. */ class V1WatchEvent { static getAttributeTypeMap() { return V1WatchEvent.attributeTypeMap; } } V1WatchEvent.discriminator = undefined; V1WatchEvent.attributeTypeMap = [ { "name": "object", "baseName": "object", "type": "RuntimeRawExtension" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1WatchEvent = V1WatchEvent; /** * 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; } } V1WeightedPodAffinityTerm.discriminator = undefined; V1WeightedPodAffinityTerm.attributeTypeMap = [ { "name": "podAffinityTerm", "baseName": "podAffinityTerm", "type": "V1PodAffinityTerm" }, { "name": "weight", "baseName": "weight", "type": "number" } ]; exports.V1WeightedPodAffinityTerm = V1WeightedPodAffinityTerm; /** * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole */ class V1alpha1AggregationRule { static getAttributeTypeMap() { return V1alpha1AggregationRule.attributeTypeMap; } } V1alpha1AggregationRule.discriminator = undefined; V1alpha1AggregationRule.attributeTypeMap = [ { "name": "clusterRoleSelectors", "baseName": "clusterRoleSelectors", "type": "Array" } ]; exports.V1alpha1AggregationRule = V1alpha1AggregationRule; /** * AuditSink represents a cluster level audit sink */ class V1alpha1AuditSink { static getAttributeTypeMap() { return V1alpha1AuditSink.attributeTypeMap; } } V1alpha1AuditSink.discriminator = undefined; V1alpha1AuditSink.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1alpha1AuditSinkSpec" } ]; exports.V1alpha1AuditSink = V1alpha1AuditSink; /** * AuditSinkList is a list of AuditSink items. */ class V1alpha1AuditSinkList { static getAttributeTypeMap() { return V1alpha1AuditSinkList.attributeTypeMap; } } V1alpha1AuditSinkList.discriminator = undefined; V1alpha1AuditSinkList.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" } ]; exports.V1alpha1AuditSinkList = V1alpha1AuditSinkList; /** * AuditSinkSpec holds the spec for the audit sink */ class V1alpha1AuditSinkSpec { static getAttributeTypeMap() { return V1alpha1AuditSinkSpec.attributeTypeMap; } } V1alpha1AuditSinkSpec.discriminator = undefined; V1alpha1AuditSinkSpec.attributeTypeMap = [ { "name": "policy", "baseName": "policy", "type": "V1alpha1Policy" }, { "name": "webhook", "baseName": "webhook", "type": "V1alpha1Webhook" } ]; exports.V1alpha1AuditSinkSpec = V1alpha1AuditSinkSpec; /** * ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. */ class V1alpha1ClusterRole { static getAttributeTypeMap() { return V1alpha1ClusterRole.attributeTypeMap; } } 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" } ]; exports.V1alpha1ClusterRole = V1alpha1ClusterRole; /** * ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. */ class V1alpha1ClusterRoleBinding { static getAttributeTypeMap() { return V1alpha1ClusterRoleBinding.attributeTypeMap; } } 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" } ]; exports.V1alpha1ClusterRoleBinding = V1alpha1ClusterRoleBinding; /** * ClusterRoleBindingList is a collection of ClusterRoleBindings */ class V1alpha1ClusterRoleBindingList { static getAttributeTypeMap() { return V1alpha1ClusterRoleBindingList.attributeTypeMap; } } 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" } ]; exports.V1alpha1ClusterRoleBindingList = V1alpha1ClusterRoleBindingList; /** * ClusterRoleList is a collection of ClusterRoles */ class V1alpha1ClusterRoleList { static getAttributeTypeMap() { return V1alpha1ClusterRoleList.attributeTypeMap; } } 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" } ]; exports.V1alpha1ClusterRoleList = V1alpha1ClusterRoleList; /** * Initializer describes the name and the failure policy of an initializer, and what resources it applies to. */ class V1alpha1Initializer { static getAttributeTypeMap() { return V1alpha1Initializer.attributeTypeMap; } } V1alpha1Initializer.discriminator = undefined; V1alpha1Initializer.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "rules", "baseName": "rules", "type": "Array" } ]; exports.V1alpha1Initializer = V1alpha1Initializer; /** * InitializerConfiguration describes the configuration of initializers. */ class V1alpha1InitializerConfiguration { static getAttributeTypeMap() { return V1alpha1InitializerConfiguration.attributeTypeMap; } } V1alpha1InitializerConfiguration.discriminator = undefined; V1alpha1InitializerConfiguration.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "initializers", "baseName": "initializers", "type": "Array" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" } ]; exports.V1alpha1InitializerConfiguration = V1alpha1InitializerConfiguration; /** * InitializerConfigurationList is a list of InitializerConfiguration. */ class V1alpha1InitializerConfigurationList { static getAttributeTypeMap() { return V1alpha1InitializerConfigurationList.attributeTypeMap; } } V1alpha1InitializerConfigurationList.discriminator = undefined; V1alpha1InitializerConfigurationList.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" } ]; exports.V1alpha1InitializerConfigurationList = V1alpha1InitializerConfigurationList; /** * PodPreset is a policy resource that defines additional runtime requirements for a Pod. */ class V1alpha1PodPreset { static getAttributeTypeMap() { return V1alpha1PodPreset.attributeTypeMap; } } V1alpha1PodPreset.discriminator = undefined; V1alpha1PodPreset.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1alpha1PodPresetSpec" } ]; exports.V1alpha1PodPreset = V1alpha1PodPreset; /** * PodPresetList is a list of PodPreset objects. */ class V1alpha1PodPresetList { static getAttributeTypeMap() { return V1alpha1PodPresetList.attributeTypeMap; } } V1alpha1PodPresetList.discriminator = undefined; V1alpha1PodPresetList.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" } ]; exports.V1alpha1PodPresetList = V1alpha1PodPresetList; /** * PodPresetSpec is a description of a pod preset. */ class V1alpha1PodPresetSpec { static getAttributeTypeMap() { return V1alpha1PodPresetSpec.attributeTypeMap; } } V1alpha1PodPresetSpec.discriminator = undefined; V1alpha1PodPresetSpec.attributeTypeMap = [ { "name": "env", "baseName": "env", "type": "Array" }, { "name": "envFrom", "baseName": "envFrom", "type": "Array" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" }, { "name": "volumeMounts", "baseName": "volumeMounts", "type": "Array" }, { "name": "volumes", "baseName": "volumes", "type": "Array" } ]; exports.V1alpha1PodPresetSpec = V1alpha1PodPresetSpec; /** * Policy defines the configuration of how audit events are logged */ class V1alpha1Policy { static getAttributeTypeMap() { return V1alpha1Policy.attributeTypeMap; } } V1alpha1Policy.discriminator = undefined; V1alpha1Policy.attributeTypeMap = [ { "name": "level", "baseName": "level", "type": "string" }, { "name": "stages", "baseName": "stages", "type": "Array" } ]; exports.V1alpha1Policy = V1alpha1Policy; /** * 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; } } 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" } ]; exports.V1alpha1PolicyRule = V1alpha1PolicyRule; /** * 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; } } 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": "value", "baseName": "value", "type": "number" } ]; exports.V1alpha1PriorityClass = V1alpha1PriorityClass; /** * PriorityClassList is a collection of priority classes. */ class V1alpha1PriorityClassList { static getAttributeTypeMap() { return V1alpha1PriorityClassList.attributeTypeMap; } } 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" } ]; exports.V1alpha1PriorityClassList = V1alpha1PriorityClassList; /** * Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. */ class V1alpha1Role { static getAttributeTypeMap() { return V1alpha1Role.attributeTypeMap; } } 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" } ]; exports.V1alpha1Role = V1alpha1Role; /** * 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 V1alpha1RoleBinding { static getAttributeTypeMap() { return V1alpha1RoleBinding.attributeTypeMap; } } 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" } ]; exports.V1alpha1RoleBinding = V1alpha1RoleBinding; /** * RoleBindingList is a collection of RoleBindings */ class V1alpha1RoleBindingList { static getAttributeTypeMap() { return V1alpha1RoleBindingList.attributeTypeMap; } } 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" } ]; exports.V1alpha1RoleBindingList = V1alpha1RoleBindingList; /** * RoleList is a collection of Roles */ class V1alpha1RoleList { static getAttributeTypeMap() { return V1alpha1RoleList.attributeTypeMap; } } 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" } ]; exports.V1alpha1RoleList = V1alpha1RoleList; /** * RoleRef contains information that points to the role being used */ class V1alpha1RoleRef { static getAttributeTypeMap() { return V1alpha1RoleRef.attributeTypeMap; } } V1alpha1RoleRef.discriminator = undefined; V1alpha1RoleRef.attributeTypeMap = [ { "name": "apiGroup", "baseName": "apiGroup", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1alpha1RoleRef = V1alpha1RoleRef; /** * Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid. */ class V1alpha1Rule { static getAttributeTypeMap() { return V1alpha1Rule.attributeTypeMap; } } V1alpha1Rule.discriminator = undefined; V1alpha1Rule.attributeTypeMap = [ { "name": "apiGroups", "baseName": "apiGroups", "type": "Array" }, { "name": "apiVersions", "baseName": "apiVersions", "type": "Array" }, { "name": "resources", "baseName": "resources", "type": "Array" } ]; exports.V1alpha1Rule = V1alpha1Rule; /** * ServiceReference holds a reference to Service.legacy.k8s.io */ class V1alpha1ServiceReference { static getAttributeTypeMap() { return V1alpha1ServiceReference.attributeTypeMap; } } V1alpha1ServiceReference.discriminator = undefined; V1alpha1ServiceReference.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.V1alpha1ServiceReference = V1alpha1ServiceReference; /** * Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. */ class V1alpha1Subject { static getAttributeTypeMap() { return V1alpha1Subject.attributeTypeMap; } } V1alpha1Subject.discriminator = undefined; V1alpha1Subject.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespace", "baseName": "namespace", "type": "string" } ]; exports.V1alpha1Subject = V1alpha1Subject; /** * 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; } } 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" } ]; exports.V1alpha1VolumeAttachment = V1alpha1VolumeAttachment; /** * VolumeAttachmentList is a collection of VolumeAttachment objects. */ class V1alpha1VolumeAttachmentList { static getAttributeTypeMap() { return V1alpha1VolumeAttachmentList.attributeTypeMap; } } 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" } ]; exports.V1alpha1VolumeAttachmentList = V1alpha1VolumeAttachmentList; /** * 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; } } V1alpha1VolumeAttachmentSource.discriminator = undefined; V1alpha1VolumeAttachmentSource.attributeTypeMap = [ { "name": "persistentVolumeName", "baseName": "persistentVolumeName", "type": "string" } ]; exports.V1alpha1VolumeAttachmentSource = V1alpha1VolumeAttachmentSource; /** * VolumeAttachmentSpec is the specification of a VolumeAttachment request. */ class V1alpha1VolumeAttachmentSpec { static getAttributeTypeMap() { return V1alpha1VolumeAttachmentSpec.attributeTypeMap; } } V1alpha1VolumeAttachmentSpec.discriminator = undefined; V1alpha1VolumeAttachmentSpec.attributeTypeMap = [ { "name": "attacher", "baseName": "attacher", "type": "string" }, { "name": "nodeName", "baseName": "nodeName", "type": "string" }, { "name": "source", "baseName": "source", "type": "V1alpha1VolumeAttachmentSource" } ]; exports.V1alpha1VolumeAttachmentSpec = V1alpha1VolumeAttachmentSpec; /** * VolumeAttachmentStatus is the status of a VolumeAttachment request. */ class V1alpha1VolumeAttachmentStatus { static getAttributeTypeMap() { return V1alpha1VolumeAttachmentStatus.attributeTypeMap; } } 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" } ]; exports.V1alpha1VolumeAttachmentStatus = V1alpha1VolumeAttachmentStatus; /** * VolumeError captures an error encountered during a volume operation. */ class V1alpha1VolumeError { static getAttributeTypeMap() { return V1alpha1VolumeError.attributeTypeMap; } } V1alpha1VolumeError.discriminator = undefined; V1alpha1VolumeError.attributeTypeMap = [ { "name": "message", "baseName": "message", "type": "string" }, { "name": "time", "baseName": "time", "type": "Date" } ]; exports.V1alpha1VolumeError = V1alpha1VolumeError; /** * Webhook holds the configuration of the webhook */ class V1alpha1Webhook { static getAttributeTypeMap() { return V1alpha1Webhook.attributeTypeMap; } } V1alpha1Webhook.discriminator = undefined; V1alpha1Webhook.attributeTypeMap = [ { "name": "clientConfig", "baseName": "clientConfig", "type": "V1alpha1WebhookClientConfig" }, { "name": "throttle", "baseName": "throttle", "type": "V1alpha1WebhookThrottleConfig" } ]; exports.V1alpha1Webhook = V1alpha1Webhook; /** * WebhookClientConfig contains the information to make a connection with the webhook */ class V1alpha1WebhookClientConfig { static getAttributeTypeMap() { return V1alpha1WebhookClientConfig.attributeTypeMap; } } V1alpha1WebhookClientConfig.discriminator = undefined; V1alpha1WebhookClientConfig.attributeTypeMap = [ { "name": "caBundle", "baseName": "caBundle", "type": "string" }, { "name": "service", "baseName": "service", "type": "V1alpha1ServiceReference" }, { "name": "url", "baseName": "url", "type": "string" } ]; exports.V1alpha1WebhookClientConfig = V1alpha1WebhookClientConfig; /** * WebhookThrottleConfig holds the configuration for throttling events */ class V1alpha1WebhookThrottleConfig { static getAttributeTypeMap() { return V1alpha1WebhookThrottleConfig.attributeTypeMap; } } V1alpha1WebhookThrottleConfig.discriminator = undefined; V1alpha1WebhookThrottleConfig.attributeTypeMap = [ { "name": "burst", "baseName": "burst", "type": "number" }, { "name": "qps", "baseName": "qps", "type": "number" } ]; exports.V1alpha1WebhookThrottleConfig = V1alpha1WebhookThrottleConfig; /** * APIService represents a server for a particular GroupVersion. Name must be \"version.group\". */ class V1beta1APIService { static getAttributeTypeMap() { return V1beta1APIService.attributeTypeMap; } } 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" } ]; exports.V1beta1APIService = V1beta1APIService; class V1beta1APIServiceCondition { static getAttributeTypeMap() { return V1beta1APIServiceCondition.attributeTypeMap; } } 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" } ]; exports.V1beta1APIServiceCondition = V1beta1APIServiceCondition; /** * APIServiceList is a list of APIService objects. */ class V1beta1APIServiceList { static getAttributeTypeMap() { return V1beta1APIServiceList.attributeTypeMap; } } 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" } ]; exports.V1beta1APIServiceList = V1beta1APIServiceList; /** * 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; } } 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" } ]; exports.V1beta1APIServiceSpec = V1beta1APIServiceSpec; /** * APIServiceStatus contains derived information about an API server */ class V1beta1APIServiceStatus { static getAttributeTypeMap() { return V1beta1APIServiceStatus.attributeTypeMap; } } V1beta1APIServiceStatus.discriminator = undefined; V1beta1APIServiceStatus.attributeTypeMap = [ { "name": "conditions", "baseName": "conditions", "type": "Array" } ]; exports.V1beta1APIServiceStatus = V1beta1APIServiceStatus; /** * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole */ class V1beta1AggregationRule { static getAttributeTypeMap() { return V1beta1AggregationRule.attributeTypeMap; } } V1beta1AggregationRule.discriminator = undefined; V1beta1AggregationRule.attributeTypeMap = [ { "name": "clusterRoleSelectors", "baseName": "clusterRoleSelectors", "type": "Array" } ]; exports.V1beta1AggregationRule = V1beta1AggregationRule; /** * Describes a certificate signing request */ class V1beta1CertificateSigningRequest { static getAttributeTypeMap() { return V1beta1CertificateSigningRequest.attributeTypeMap; } } 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" } ]; exports.V1beta1CertificateSigningRequest = V1beta1CertificateSigningRequest; class V1beta1CertificateSigningRequestCondition { static getAttributeTypeMap() { return V1beta1CertificateSigningRequestCondition.attributeTypeMap; } } V1beta1CertificateSigningRequestCondition.discriminator = undefined; V1beta1CertificateSigningRequestCondition.attributeTypeMap = [ { "name": "lastUpdateTime", "baseName": "lastUpdateTime", "type": "Date" }, { "name": "message", "baseName": "message", "type": "string" }, { "name": "reason", "baseName": "reason", "type": "string" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1beta1CertificateSigningRequestCondition = V1beta1CertificateSigningRequestCondition; class V1beta1CertificateSigningRequestList { static getAttributeTypeMap() { return V1beta1CertificateSigningRequestList.attributeTypeMap; } } 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" } ]; exports.V1beta1CertificateSigningRequestList = V1beta1CertificateSigningRequestList; /** * 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; } } 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": "uid", "baseName": "uid", "type": "string" }, { "name": "usages", "baseName": "usages", "type": "Array" }, { "name": "username", "baseName": "username", "type": "string" } ]; exports.V1beta1CertificateSigningRequestSpec = V1beta1CertificateSigningRequestSpec; class V1beta1CertificateSigningRequestStatus { static getAttributeTypeMap() { return V1beta1CertificateSigningRequestStatus.attributeTypeMap; } } V1beta1CertificateSigningRequestStatus.discriminator = undefined; V1beta1CertificateSigningRequestStatus.attributeTypeMap = [ { "name": "certificate", "baseName": "certificate", "type": "string" }, { "name": "conditions", "baseName": "conditions", "type": "Array" } ]; exports.V1beta1CertificateSigningRequestStatus = V1beta1CertificateSigningRequestStatus; /** * ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. */ class V1beta1ClusterRole { static getAttributeTypeMap() { return V1beta1ClusterRole.attributeTypeMap; } } 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" } ]; exports.V1beta1ClusterRole = V1beta1ClusterRole; /** * ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. */ class V1beta1ClusterRoleBinding { static getAttributeTypeMap() { return V1beta1ClusterRoleBinding.attributeTypeMap; } } 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" } ]; exports.V1beta1ClusterRoleBinding = V1beta1ClusterRoleBinding; /** * ClusterRoleBindingList is a collection of ClusterRoleBindings */ class V1beta1ClusterRoleBindingList { static getAttributeTypeMap() { return V1beta1ClusterRoleBindingList.attributeTypeMap; } } 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" } ]; exports.V1beta1ClusterRoleBindingList = V1beta1ClusterRoleBindingList; /** * ClusterRoleList is a collection of ClusterRoles */ class V1beta1ClusterRoleList { static getAttributeTypeMap() { return V1beta1ClusterRoleList.attributeTypeMap; } } 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" } ]; exports.V1beta1ClusterRoleList = V1beta1ClusterRoleList; /** * DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. 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 V1beta1ControllerRevision { static getAttributeTypeMap() { return V1beta1ControllerRevision.attributeTypeMap; } } V1beta1ControllerRevision.discriminator = undefined; V1beta1ControllerRevision.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "data", "baseName": "data", "type": "RuntimeRawExtension" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "revision", "baseName": "revision", "type": "number" } ]; exports.V1beta1ControllerRevision = V1beta1ControllerRevision; /** * ControllerRevisionList is a resource containing a list of ControllerRevision objects. */ class V1beta1ControllerRevisionList { static getAttributeTypeMap() { return V1beta1ControllerRevisionList.attributeTypeMap; } } V1beta1ControllerRevisionList.discriminator = undefined; V1beta1ControllerRevisionList.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" } ]; exports.V1beta1ControllerRevisionList = V1beta1ControllerRevisionList; /** * CronJob represents the configuration of a single cron job. */ class V1beta1CronJob { static getAttributeTypeMap() { return V1beta1CronJob.attributeTypeMap; } } 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" } ]; exports.V1beta1CronJob = V1beta1CronJob; /** * CronJobList is a collection of cron jobs. */ class V1beta1CronJobList { static getAttributeTypeMap() { return V1beta1CronJobList.attributeTypeMap; } } 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" } ]; exports.V1beta1CronJobList = V1beta1CronJobList; /** * CronJobSpec describes how the job execution will look like and when it will actually run. */ class V1beta1CronJobSpec { static getAttributeTypeMap() { return V1beta1CronJobSpec.attributeTypeMap; } } 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" } ]; exports.V1beta1CronJobSpec = V1beta1CronJobSpec; /** * CronJobStatus represents the current state of a cron job. */ class V1beta1CronJobStatus { static getAttributeTypeMap() { return V1beta1CronJobStatus.attributeTypeMap; } } V1beta1CronJobStatus.discriminator = undefined; V1beta1CronJobStatus.attributeTypeMap = [ { "name": "active", "baseName": "active", "type": "Array" }, { "name": "lastScheduleTime", "baseName": "lastScheduleTime", "type": "Date" } ]; exports.V1beta1CronJobStatus = V1beta1CronJobStatus; /** * CustomResourceColumnDefinition specifies a column for server side printing. */ class V1beta1CustomResourceColumnDefinition { static getAttributeTypeMap() { return V1beta1CustomResourceColumnDefinition.attributeTypeMap; } } 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" } ]; exports.V1beta1CustomResourceColumnDefinition = V1beta1CustomResourceColumnDefinition; /** * CustomResourceConversion describes how to convert different versions of a CR. */ class V1beta1CustomResourceConversion { static getAttributeTypeMap() { return V1beta1CustomResourceConversion.attributeTypeMap; } } V1beta1CustomResourceConversion.discriminator = undefined; V1beta1CustomResourceConversion.attributeTypeMap = [ { "name": "strategy", "baseName": "strategy", "type": "string" }, { "name": "webhookClientConfig", "baseName": "webhookClientConfig", "type": "ApiextensionsV1beta1WebhookClientConfig" } ]; exports.V1beta1CustomResourceConversion = V1beta1CustomResourceConversion; /** * CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. */ class V1beta1CustomResourceDefinition { static getAttributeTypeMap() { return V1beta1CustomResourceDefinition.attributeTypeMap; } } 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" } ]; exports.V1beta1CustomResourceDefinition = V1beta1CustomResourceDefinition; /** * CustomResourceDefinitionCondition contains details for the current condition of this pod. */ class V1beta1CustomResourceDefinitionCondition { static getAttributeTypeMap() { return V1beta1CustomResourceDefinitionCondition.attributeTypeMap; } } 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" } ]; exports.V1beta1CustomResourceDefinitionCondition = V1beta1CustomResourceDefinitionCondition; /** * CustomResourceDefinitionList is a list of CustomResourceDefinition objects. */ class V1beta1CustomResourceDefinitionList { static getAttributeTypeMap() { return V1beta1CustomResourceDefinitionList.attributeTypeMap; } } 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" } ]; exports.V1beta1CustomResourceDefinitionList = V1beta1CustomResourceDefinitionList; /** * CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition */ class V1beta1CustomResourceDefinitionNames { static getAttributeTypeMap() { return V1beta1CustomResourceDefinitionNames.attributeTypeMap; } } 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" } ]; exports.V1beta1CustomResourceDefinitionNames = V1beta1CustomResourceDefinitionNames; /** * CustomResourceDefinitionSpec describes how a user wants their resource to appear */ class V1beta1CustomResourceDefinitionSpec { static getAttributeTypeMap() { return V1beta1CustomResourceDefinitionSpec.attributeTypeMap; } } 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": "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" } ]; exports.V1beta1CustomResourceDefinitionSpec = V1beta1CustomResourceDefinitionSpec; /** * CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition */ class V1beta1CustomResourceDefinitionStatus { static getAttributeTypeMap() { return V1beta1CustomResourceDefinitionStatus.attributeTypeMap; } } V1beta1CustomResourceDefinitionStatus.discriminator = undefined; V1beta1CustomResourceDefinitionStatus.attributeTypeMap = [ { "name": "acceptedNames", "baseName": "acceptedNames", "type": "V1beta1CustomResourceDefinitionNames" }, { "name": "conditions", "baseName": "conditions", "type": "Array" }, { "name": "storedVersions", "baseName": "storedVersions", "type": "Array" } ]; exports.V1beta1CustomResourceDefinitionStatus = V1beta1CustomResourceDefinitionStatus; /** * CustomResourceDefinitionVersion describes a version for CRD. */ class V1beta1CustomResourceDefinitionVersion { static getAttributeTypeMap() { return V1beta1CustomResourceDefinitionVersion.attributeTypeMap; } } V1beta1CustomResourceDefinitionVersion.discriminator = undefined; V1beta1CustomResourceDefinitionVersion.attributeTypeMap = [ { "name": "additionalPrinterColumns", "baseName": "additionalPrinterColumns", "type": "Array" }, { "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" } ]; exports.V1beta1CustomResourceDefinitionVersion = V1beta1CustomResourceDefinitionVersion; /** * CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. */ class V1beta1CustomResourceSubresourceScale { static getAttributeTypeMap() { return V1beta1CustomResourceSubresourceScale.attributeTypeMap; } } V1beta1CustomResourceSubresourceScale.discriminator = undefined; V1beta1CustomResourceSubresourceScale.attributeTypeMap = [ { "name": "labelSelectorPath", "baseName": "labelSelectorPath", "type": "string" }, { "name": "specReplicasPath", "baseName": "specReplicasPath", "type": "string" }, { "name": "statusReplicasPath", "baseName": "statusReplicasPath", "type": "string" } ]; exports.V1beta1CustomResourceSubresourceScale = V1beta1CustomResourceSubresourceScale; /** * CustomResourceSubresources defines the status and scale subresources for CustomResources. */ class V1beta1CustomResourceSubresources { static getAttributeTypeMap() { return V1beta1CustomResourceSubresources.attributeTypeMap; } } V1beta1CustomResourceSubresources.discriminator = undefined; V1beta1CustomResourceSubresources.attributeTypeMap = [ { "name": "scale", "baseName": "scale", "type": "V1beta1CustomResourceSubresourceScale" }, { "name": "status", "baseName": "status", "type": "any" } ]; exports.V1beta1CustomResourceSubresources = V1beta1CustomResourceSubresources; /** * CustomResourceValidation is a list of validation methods for CustomResources. */ class V1beta1CustomResourceValidation { static getAttributeTypeMap() { return V1beta1CustomResourceValidation.attributeTypeMap; } } V1beta1CustomResourceValidation.discriminator = undefined; V1beta1CustomResourceValidation.attributeTypeMap = [ { "name": "openAPIV3Schema", "baseName": "openAPIV3Schema", "type": "V1beta1JSONSchemaProps" } ]; exports.V1beta1CustomResourceValidation = V1beta1CustomResourceValidation; /** * DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set. */ class V1beta1DaemonSet { static getAttributeTypeMap() { return V1beta1DaemonSet.attributeTypeMap; } } V1beta1DaemonSet.discriminator = undefined; V1beta1DaemonSet.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta1DaemonSetSpec" }, { "name": "status", "baseName": "status", "type": "V1beta1DaemonSetStatus" } ]; exports.V1beta1DaemonSet = V1beta1DaemonSet; /** * DaemonSetCondition describes the state of a DaemonSet at a certain point. */ class V1beta1DaemonSetCondition { static getAttributeTypeMap() { return V1beta1DaemonSetCondition.attributeTypeMap; } } V1beta1DaemonSetCondition.discriminator = undefined; V1beta1DaemonSetCondition.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" } ]; exports.V1beta1DaemonSetCondition = V1beta1DaemonSetCondition; /** * DaemonSetList is a collection of daemon sets. */ class V1beta1DaemonSetList { static getAttributeTypeMap() { return V1beta1DaemonSetList.attributeTypeMap; } } V1beta1DaemonSetList.discriminator = undefined; V1beta1DaemonSetList.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" } ]; exports.V1beta1DaemonSetList = V1beta1DaemonSetList; /** * DaemonSetSpec is the specification of a daemon set. */ class V1beta1DaemonSetSpec { static getAttributeTypeMap() { return V1beta1DaemonSetSpec.attributeTypeMap; } } V1beta1DaemonSetSpec.discriminator = undefined; V1beta1DaemonSetSpec.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": "templateGeneration", "baseName": "templateGeneration", "type": "number" }, { "name": "updateStrategy", "baseName": "updateStrategy", "type": "V1beta1DaemonSetUpdateStrategy" } ]; exports.V1beta1DaemonSetSpec = V1beta1DaemonSetSpec; /** * DaemonSetStatus represents the current status of a daemon set. */ class V1beta1DaemonSetStatus { static getAttributeTypeMap() { return V1beta1DaemonSetStatus.attributeTypeMap; } } V1beta1DaemonSetStatus.discriminator = undefined; V1beta1DaemonSetStatus.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" } ]; exports.V1beta1DaemonSetStatus = V1beta1DaemonSetStatus; class V1beta1DaemonSetUpdateStrategy { static getAttributeTypeMap() { return V1beta1DaemonSetUpdateStrategy.attributeTypeMap; } } V1beta1DaemonSetUpdateStrategy.discriminator = undefined; V1beta1DaemonSetUpdateStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1beta1RollingUpdateDaemonSet" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1beta1DaemonSetUpdateStrategy = V1beta1DaemonSetUpdateStrategy; /** * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. */ class V1beta1Event { static getAttributeTypeMap() { return V1beta1Event.attributeTypeMap; } } 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" } ]; exports.V1beta1Event = V1beta1Event; /** * EventList is a list of Event objects. */ class V1beta1EventList { static getAttributeTypeMap() { return V1beta1EventList.attributeTypeMap; } } 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" } ]; exports.V1beta1EventList = V1beta1EventList; /** * 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; } } V1beta1EventSeries.discriminator = undefined; V1beta1EventSeries.attributeTypeMap = [ { "name": "count", "baseName": "count", "type": "number" }, { "name": "lastObservedTime", "baseName": "lastObservedTime", "type": "Date" }, { "name": "state", "baseName": "state", "type": "string" } ]; exports.V1beta1EventSeries = V1beta1EventSeries; /** * 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; } } 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" } ]; exports.V1beta1Eviction = V1beta1Eviction; /** * ExternalDocumentation allows referencing an external resource for extended documentation. */ class V1beta1ExternalDocumentation { static getAttributeTypeMap() { return V1beta1ExternalDocumentation.attributeTypeMap; } } V1beta1ExternalDocumentation.discriminator = undefined; V1beta1ExternalDocumentation.attributeTypeMap = [ { "name": "description", "baseName": "description", "type": "string" }, { "name": "url", "baseName": "url", "type": "string" } ]; exports.V1beta1ExternalDocumentation = V1beta1ExternalDocumentation; /** * HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend. */ class V1beta1HTTPIngressPath { static getAttributeTypeMap() { return V1beta1HTTPIngressPath.attributeTypeMap; } } V1beta1HTTPIngressPath.discriminator = undefined; V1beta1HTTPIngressPath.attributeTypeMap = [ { "name": "backend", "baseName": "backend", "type": "V1beta1IngressBackend" }, { "name": "path", "baseName": "path", "type": "string" } ]; exports.V1beta1HTTPIngressPath = V1beta1HTTPIngressPath; /** * 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 V1beta1HTTPIngressRuleValue { static getAttributeTypeMap() { return V1beta1HTTPIngressRuleValue.attributeTypeMap; } } V1beta1HTTPIngressRuleValue.discriminator = undefined; V1beta1HTTPIngressRuleValue.attributeTypeMap = [ { "name": "paths", "baseName": "paths", "type": "Array" } ]; exports.V1beta1HTTPIngressRuleValue = V1beta1HTTPIngressRuleValue; /** * DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") 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 V1beta1IPBlock { static getAttributeTypeMap() { return V1beta1IPBlock.attributeTypeMap; } } V1beta1IPBlock.discriminator = undefined; V1beta1IPBlock.attributeTypeMap = [ { "name": "cidr", "baseName": "cidr", "type": "string" }, { "name": "except", "baseName": "except", "type": "Array" } ]; exports.V1beta1IPBlock = V1beta1IPBlock; /** * 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 V1beta1Ingress { static getAttributeTypeMap() { return V1beta1Ingress.attributeTypeMap; } } V1beta1Ingress.discriminator = undefined; V1beta1Ingress.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta1IngressSpec" }, { "name": "status", "baseName": "status", "type": "V1beta1IngressStatus" } ]; exports.V1beta1Ingress = V1beta1Ingress; /** * IngressBackend describes all endpoints for a given service and port. */ class V1beta1IngressBackend { static getAttributeTypeMap() { return V1beta1IngressBackend.attributeTypeMap; } } V1beta1IngressBackend.discriminator = undefined; V1beta1IngressBackend.attributeTypeMap = [ { "name": "serviceName", "baseName": "serviceName", "type": "string" }, { "name": "servicePort", "baseName": "servicePort", "type": "any" } ]; exports.V1beta1IngressBackend = V1beta1IngressBackend; /** * IngressList is a collection of Ingress. */ class V1beta1IngressList { static getAttributeTypeMap() { return V1beta1IngressList.attributeTypeMap; } } V1beta1IngressList.discriminator = undefined; V1beta1IngressList.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" } ]; exports.V1beta1IngressList = V1beta1IngressList; /** * 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 V1beta1IngressRule { static getAttributeTypeMap() { return V1beta1IngressRule.attributeTypeMap; } } V1beta1IngressRule.discriminator = undefined; V1beta1IngressRule.attributeTypeMap = [ { "name": "host", "baseName": "host", "type": "string" }, { "name": "http", "baseName": "http", "type": "V1beta1HTTPIngressRuleValue" } ]; exports.V1beta1IngressRule = V1beta1IngressRule; /** * IngressSpec describes the Ingress the user wishes to exist. */ class V1beta1IngressSpec { static getAttributeTypeMap() { return V1beta1IngressSpec.attributeTypeMap; } } V1beta1IngressSpec.discriminator = undefined; V1beta1IngressSpec.attributeTypeMap = [ { "name": "backend", "baseName": "backend", "type": "V1beta1IngressBackend" }, { "name": "rules", "baseName": "rules", "type": "Array" }, { "name": "tls", "baseName": "tls", "type": "Array" } ]; exports.V1beta1IngressSpec = V1beta1IngressSpec; /** * IngressStatus describe the current state of the Ingress. */ class V1beta1IngressStatus { static getAttributeTypeMap() { return V1beta1IngressStatus.attributeTypeMap; } } V1beta1IngressStatus.discriminator = undefined; V1beta1IngressStatus.attributeTypeMap = [ { "name": "loadBalancer", "baseName": "loadBalancer", "type": "V1LoadBalancerStatus" } ]; exports.V1beta1IngressStatus = V1beta1IngressStatus; /** * IngressTLS describes the transport layer security associated with an Ingress. */ class V1beta1IngressTLS { static getAttributeTypeMap() { return V1beta1IngressTLS.attributeTypeMap; } } V1beta1IngressTLS.discriminator = undefined; V1beta1IngressTLS.attributeTypeMap = [ { "name": "hosts", "baseName": "hosts", "type": "Array" }, { "name": "secretName", "baseName": "secretName", "type": "string" } ]; exports.V1beta1IngressTLS = V1beta1IngressTLS; /** * JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). */ class V1beta1JSONSchemaProps { static getAttributeTypeMap() { return V1beta1JSONSchemaProps.attributeTypeMap; } } V1beta1JSONSchemaProps.discriminator = undefined; V1beta1JSONSchemaProps.attributeTypeMap = [ { "name": "ref", "baseName": "$ref", "type": "string" }, { "name": "schema", "baseName": "$schema", "type": "string" }, { "name": "additionalItems", "baseName": "additionalItems", "type": "any" }, { "name": "additionalProperties", "baseName": "additionalProperties", "type": "any" }, { "name": "allOf", "baseName": "allOf", "type": "Array" }, { "name": "anyOf", "baseName": "anyOf", "type": "Array" }, { "name": "_default", "baseName": "default", "type": "any" }, { "name": "definitions", "baseName": "definitions", "type": "{ [key: string]: V1beta1JSONSchemaProps; }" }, { "name": "dependencies", "baseName": "dependencies", "type": "{ [key: string]: any; }" }, { "name": "description", "baseName": "description", "type": "string" }, { "name": "_enum", "baseName": "enum", "type": "Array" }, { "name": "example", "baseName": "example", "type": "any" }, { "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": "any" }, { "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": "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" } ]; exports.V1beta1JSONSchemaProps = V1beta1JSONSchemaProps; /** * JobTemplateSpec describes the data a Job should have when created from a template */ class V1beta1JobTemplateSpec { static getAttributeTypeMap() { return V1beta1JobTemplateSpec.attributeTypeMap; } } V1beta1JobTemplateSpec.discriminator = undefined; V1beta1JobTemplateSpec.attributeTypeMap = [ { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1JobSpec" } ]; exports.V1beta1JobTemplateSpec = V1beta1JobTemplateSpec; /** * Lease defines a lease concept. */ class V1beta1Lease { static getAttributeTypeMap() { return V1beta1Lease.attributeTypeMap; } } 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" } ]; exports.V1beta1Lease = V1beta1Lease; /** * LeaseList is a list of Lease objects. */ class V1beta1LeaseList { static getAttributeTypeMap() { return V1beta1LeaseList.attributeTypeMap; } } 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" } ]; exports.V1beta1LeaseList = V1beta1LeaseList; /** * LeaseSpec is a specification of a Lease. */ class V1beta1LeaseSpec { static getAttributeTypeMap() { return V1beta1LeaseSpec.attributeTypeMap; } } 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" } ]; exports.V1beta1LeaseSpec = V1beta1LeaseSpec; /** * 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; } } 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" } ]; exports.V1beta1LocalSubjectAccessReview = V1beta1LocalSubjectAccessReview; /** * MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. */ class V1beta1MutatingWebhookConfiguration { static getAttributeTypeMap() { return V1beta1MutatingWebhookConfiguration.attributeTypeMap; } } 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" } ]; exports.V1beta1MutatingWebhookConfiguration = V1beta1MutatingWebhookConfiguration; /** * MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. */ class V1beta1MutatingWebhookConfigurationList { static getAttributeTypeMap() { return V1beta1MutatingWebhookConfigurationList.attributeTypeMap; } } 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" } ]; exports.V1beta1MutatingWebhookConfigurationList = V1beta1MutatingWebhookConfigurationList; /** * DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods */ class V1beta1NetworkPolicy { static getAttributeTypeMap() { return V1beta1NetworkPolicy.attributeTypeMap; } } V1beta1NetworkPolicy.discriminator = undefined; V1beta1NetworkPolicy.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta1NetworkPolicySpec" } ]; exports.V1beta1NetworkPolicy = V1beta1NetworkPolicy; /** * DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. 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 V1beta1NetworkPolicyEgressRule { static getAttributeTypeMap() { return V1beta1NetworkPolicyEgressRule.attributeTypeMap; } } V1beta1NetworkPolicyEgressRule.discriminator = undefined; V1beta1NetworkPolicyEgressRule.attributeTypeMap = [ { "name": "ports", "baseName": "ports", "type": "Array" }, { "name": "to", "baseName": "to", "type": "Array" } ]; exports.V1beta1NetworkPolicyEgressRule = V1beta1NetworkPolicyEgressRule; /** * DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. */ class V1beta1NetworkPolicyIngressRule { static getAttributeTypeMap() { return V1beta1NetworkPolicyIngressRule.attributeTypeMap; } } V1beta1NetworkPolicyIngressRule.discriminator = undefined; V1beta1NetworkPolicyIngressRule.attributeTypeMap = [ { "name": "from", "baseName": "from", "type": "Array" }, { "name": "ports", "baseName": "ports", "type": "Array" } ]; exports.V1beta1NetworkPolicyIngressRule = V1beta1NetworkPolicyIngressRule; /** * DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects. */ class V1beta1NetworkPolicyList { static getAttributeTypeMap() { return V1beta1NetworkPolicyList.attributeTypeMap; } } V1beta1NetworkPolicyList.discriminator = undefined; V1beta1NetworkPolicyList.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" } ]; exports.V1beta1NetworkPolicyList = V1beta1NetworkPolicyList; /** * DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer. */ class V1beta1NetworkPolicyPeer { static getAttributeTypeMap() { return V1beta1NetworkPolicyPeer.attributeTypeMap; } } V1beta1NetworkPolicyPeer.discriminator = undefined; V1beta1NetworkPolicyPeer.attributeTypeMap = [ { "name": "ipBlock", "baseName": "ipBlock", "type": "V1beta1IPBlock" }, { "name": "namespaceSelector", "baseName": "namespaceSelector", "type": "V1LabelSelector" }, { "name": "podSelector", "baseName": "podSelector", "type": "V1LabelSelector" } ]; exports.V1beta1NetworkPolicyPeer = V1beta1NetworkPolicyPeer; /** * DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort. */ class V1beta1NetworkPolicyPort { static getAttributeTypeMap() { return V1beta1NetworkPolicyPort.attributeTypeMap; } } V1beta1NetworkPolicyPort.discriminator = undefined; V1beta1NetworkPolicyPort.attributeTypeMap = [ { "name": "port", "baseName": "port", "type": "any" }, { "name": "protocol", "baseName": "protocol", "type": "string" } ]; exports.V1beta1NetworkPolicyPort = V1beta1NetworkPolicyPort; /** * DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec. */ class V1beta1NetworkPolicySpec { static getAttributeTypeMap() { return V1beta1NetworkPolicySpec.attributeTypeMap; } } V1beta1NetworkPolicySpec.discriminator = undefined; V1beta1NetworkPolicySpec.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" } ]; exports.V1beta1NetworkPolicySpec = V1beta1NetworkPolicySpec; /** * NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface */ class V1beta1NonResourceAttributes { static getAttributeTypeMap() { return V1beta1NonResourceAttributes.attributeTypeMap; } } V1beta1NonResourceAttributes.discriminator = undefined; V1beta1NonResourceAttributes.attributeTypeMap = [ { "name": "path", "baseName": "path", "type": "string" }, { "name": "verb", "baseName": "verb", "type": "string" } ]; exports.V1beta1NonResourceAttributes = V1beta1NonResourceAttributes; /** * NonResourceRule holds information that describes a rule for the non-resource */ class V1beta1NonResourceRule { static getAttributeTypeMap() { return V1beta1NonResourceRule.attributeTypeMap; } } V1beta1NonResourceRule.discriminator = undefined; V1beta1NonResourceRule.attributeTypeMap = [ { "name": "nonResourceURLs", "baseName": "nonResourceURLs", "type": "Array" }, { "name": "verbs", "baseName": "verbs", "type": "Array" } ]; exports.V1beta1NonResourceRule = V1beta1NonResourceRule; /** * 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; } } 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" } ]; exports.V1beta1PodDisruptionBudget = V1beta1PodDisruptionBudget; /** * PodDisruptionBudgetList is a collection of PodDisruptionBudgets. */ class V1beta1PodDisruptionBudgetList { static getAttributeTypeMap() { return V1beta1PodDisruptionBudgetList.attributeTypeMap; } } 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" } ]; exports.V1beta1PodDisruptionBudgetList = V1beta1PodDisruptionBudgetList; /** * PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. */ class V1beta1PodDisruptionBudgetSpec { static getAttributeTypeMap() { return V1beta1PodDisruptionBudgetSpec.attributeTypeMap; } } V1beta1PodDisruptionBudgetSpec.discriminator = undefined; V1beta1PodDisruptionBudgetSpec.attributeTypeMap = [ { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" }, { "name": "minAvailable", "baseName": "minAvailable", "type": "any" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" } ]; exports.V1beta1PodDisruptionBudgetSpec = V1beta1PodDisruptionBudgetSpec; /** * 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; } } 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" } ]; exports.V1beta1PodDisruptionBudgetStatus = V1beta1PodDisruptionBudgetStatus; /** * 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; } } 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" } ]; exports.V1beta1PolicyRule = V1beta1PolicyRule; /** * 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; } } 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": "value", "baseName": "value", "type": "number" } ]; exports.V1beta1PriorityClass = V1beta1PriorityClass; /** * PriorityClassList is a collection of priority classes. */ class V1beta1PriorityClassList { static getAttributeTypeMap() { return V1beta1PriorityClassList.attributeTypeMap; } } 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" } ]; exports.V1beta1PriorityClassList = V1beta1PriorityClassList; /** * DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time. */ class V1beta1ReplicaSet { static getAttributeTypeMap() { return V1beta1ReplicaSet.attributeTypeMap; } } V1beta1ReplicaSet.discriminator = undefined; V1beta1ReplicaSet.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta1ReplicaSetSpec" }, { "name": "status", "baseName": "status", "type": "V1beta1ReplicaSetStatus" } ]; exports.V1beta1ReplicaSet = V1beta1ReplicaSet; /** * ReplicaSetCondition describes the state of a replica set at a certain point. */ class V1beta1ReplicaSetCondition { static getAttributeTypeMap() { return V1beta1ReplicaSetCondition.attributeTypeMap; } } V1beta1ReplicaSetCondition.discriminator = undefined; V1beta1ReplicaSetCondition.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" } ]; exports.V1beta1ReplicaSetCondition = V1beta1ReplicaSetCondition; /** * ReplicaSetList is a collection of ReplicaSets. */ class V1beta1ReplicaSetList { static getAttributeTypeMap() { return V1beta1ReplicaSetList.attributeTypeMap; } } V1beta1ReplicaSetList.discriminator = undefined; V1beta1ReplicaSetList.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" } ]; exports.V1beta1ReplicaSetList = V1beta1ReplicaSetList; /** * ReplicaSetSpec is the specification of a ReplicaSet. */ class V1beta1ReplicaSetSpec { static getAttributeTypeMap() { return V1beta1ReplicaSetSpec.attributeTypeMap; } } V1beta1ReplicaSetSpec.discriminator = undefined; V1beta1ReplicaSetSpec.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" } ]; exports.V1beta1ReplicaSetSpec = V1beta1ReplicaSetSpec; /** * ReplicaSetStatus represents the current status of a ReplicaSet. */ class V1beta1ReplicaSetStatus { static getAttributeTypeMap() { return V1beta1ReplicaSetStatus.attributeTypeMap; } } V1beta1ReplicaSetStatus.discriminator = undefined; V1beta1ReplicaSetStatus.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" } ]; exports.V1beta1ReplicaSetStatus = V1beta1ReplicaSetStatus; /** * ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface */ class V1beta1ResourceAttributes { static getAttributeTypeMap() { return V1beta1ResourceAttributes.attributeTypeMap; } } 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" } ]; exports.V1beta1ResourceAttributes = V1beta1ResourceAttributes; /** * 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; } } 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" } ]; exports.V1beta1ResourceRule = V1beta1ResourceRule; /** * Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. */ class V1beta1Role { static getAttributeTypeMap() { return V1beta1Role.attributeTypeMap; } } 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" } ]; exports.V1beta1Role = V1beta1Role; /** * 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 V1beta1RoleBinding { static getAttributeTypeMap() { return V1beta1RoleBinding.attributeTypeMap; } } 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" } ]; exports.V1beta1RoleBinding = V1beta1RoleBinding; /** * RoleBindingList is a collection of RoleBindings */ class V1beta1RoleBindingList { static getAttributeTypeMap() { return V1beta1RoleBindingList.attributeTypeMap; } } 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" } ]; exports.V1beta1RoleBindingList = V1beta1RoleBindingList; /** * RoleList is a collection of Roles */ class V1beta1RoleList { static getAttributeTypeMap() { return V1beta1RoleList.attributeTypeMap; } } 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" } ]; exports.V1beta1RoleList = V1beta1RoleList; /** * RoleRef contains information that points to the role being used */ class V1beta1RoleRef { static getAttributeTypeMap() { return V1beta1RoleRef.attributeTypeMap; } } V1beta1RoleRef.discriminator = undefined; V1beta1RoleRef.attributeTypeMap = [ { "name": "apiGroup", "baseName": "apiGroup", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V1beta1RoleRef = V1beta1RoleRef; /** * Spec to control the desired behavior of daemon set rolling update. */ class V1beta1RollingUpdateDaemonSet { static getAttributeTypeMap() { return V1beta1RollingUpdateDaemonSet.attributeTypeMap; } } V1beta1RollingUpdateDaemonSet.discriminator = undefined; V1beta1RollingUpdateDaemonSet.attributeTypeMap = [ { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.V1beta1RollingUpdateDaemonSet = V1beta1RollingUpdateDaemonSet; /** * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. */ class V1beta1RollingUpdateStatefulSetStrategy { static getAttributeTypeMap() { return V1beta1RollingUpdateStatefulSetStrategy.attributeTypeMap; } } V1beta1RollingUpdateStatefulSetStrategy.discriminator = undefined; V1beta1RollingUpdateStatefulSetStrategy.attributeTypeMap = [ { "name": "partition", "baseName": "partition", "type": "number" } ]; exports.V1beta1RollingUpdateStatefulSetStrategy = V1beta1RollingUpdateStatefulSetStrategy; /** * 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; } } 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" } ]; exports.V1beta1RuleWithOperations = V1beta1RuleWithOperations; /** * 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; } } 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" } ]; exports.V1beta1SelfSubjectAccessReview = V1beta1SelfSubjectAccessReview; /** * SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ class V1beta1SelfSubjectAccessReviewSpec { static getAttributeTypeMap() { return V1beta1SelfSubjectAccessReviewSpec.attributeTypeMap; } } V1beta1SelfSubjectAccessReviewSpec.discriminator = undefined; V1beta1SelfSubjectAccessReviewSpec.attributeTypeMap = [ { "name": "nonResourceAttributes", "baseName": "nonResourceAttributes", "type": "V1beta1NonResourceAttributes" }, { "name": "resourceAttributes", "baseName": "resourceAttributes", "type": "V1beta1ResourceAttributes" } ]; exports.V1beta1SelfSubjectAccessReviewSpec = V1beta1SelfSubjectAccessReviewSpec; /** * 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; } } 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" } ]; exports.V1beta1SelfSubjectRulesReview = V1beta1SelfSubjectRulesReview; class V1beta1SelfSubjectRulesReviewSpec { static getAttributeTypeMap() { return V1beta1SelfSubjectRulesReviewSpec.attributeTypeMap; } } V1beta1SelfSubjectRulesReviewSpec.discriminator = undefined; V1beta1SelfSubjectRulesReviewSpec.attributeTypeMap = [ { "name": "namespace", "baseName": "namespace", "type": "string" } ]; exports.V1beta1SelfSubjectRulesReviewSpec = V1beta1SelfSubjectRulesReviewSpec; /** * DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. 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 V1beta1StatefulSet { static getAttributeTypeMap() { return V1beta1StatefulSet.attributeTypeMap; } } V1beta1StatefulSet.discriminator = undefined; V1beta1StatefulSet.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta1StatefulSetSpec" }, { "name": "status", "baseName": "status", "type": "V1beta1StatefulSetStatus" } ]; exports.V1beta1StatefulSet = V1beta1StatefulSet; /** * StatefulSetCondition describes the state of a statefulset at a certain point. */ class V1beta1StatefulSetCondition { static getAttributeTypeMap() { return V1beta1StatefulSetCondition.attributeTypeMap; } } V1beta1StatefulSetCondition.discriminator = undefined; V1beta1StatefulSetCondition.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" } ]; exports.V1beta1StatefulSetCondition = V1beta1StatefulSetCondition; /** * StatefulSetList is a collection of StatefulSets. */ class V1beta1StatefulSetList { static getAttributeTypeMap() { return V1beta1StatefulSetList.attributeTypeMap; } } V1beta1StatefulSetList.discriminator = undefined; V1beta1StatefulSetList.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" } ]; exports.V1beta1StatefulSetList = V1beta1StatefulSetList; /** * A StatefulSetSpec is the specification of a StatefulSet. */ class V1beta1StatefulSetSpec { static getAttributeTypeMap() { return V1beta1StatefulSetSpec.attributeTypeMap; } } V1beta1StatefulSetSpec.discriminator = undefined; V1beta1StatefulSetSpec.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": "V1beta1StatefulSetUpdateStrategy" }, { "name": "volumeClaimTemplates", "baseName": "volumeClaimTemplates", "type": "Array" } ]; exports.V1beta1StatefulSetSpec = V1beta1StatefulSetSpec; /** * StatefulSetStatus represents the current state of a StatefulSet. */ class V1beta1StatefulSetStatus { static getAttributeTypeMap() { return V1beta1StatefulSetStatus.attributeTypeMap; } } V1beta1StatefulSetStatus.discriminator = undefined; V1beta1StatefulSetStatus.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" } ]; exports.V1beta1StatefulSetStatus = V1beta1StatefulSetStatus; /** * 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 V1beta1StatefulSetUpdateStrategy { static getAttributeTypeMap() { return V1beta1StatefulSetUpdateStrategy.attributeTypeMap; } } V1beta1StatefulSetUpdateStrategy.discriminator = undefined; V1beta1StatefulSetUpdateStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1beta1RollingUpdateStatefulSetStrategy" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1beta1StatefulSetUpdateStrategy = V1beta1StatefulSetUpdateStrategy; /** * 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; } } 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" } ]; exports.V1beta1StorageClass = V1beta1StorageClass; /** * StorageClassList is a collection of storage classes. */ class V1beta1StorageClassList { static getAttributeTypeMap() { return V1beta1StorageClassList.attributeTypeMap; } } 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" } ]; exports.V1beta1StorageClassList = V1beta1StorageClassList; /** * 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 V1beta1Subject { static getAttributeTypeMap() { return V1beta1Subject.attributeTypeMap; } } V1beta1Subject.discriminator = undefined; V1beta1Subject.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" } ]; exports.V1beta1Subject = V1beta1Subject; /** * SubjectAccessReview checks whether or not a user or group can perform an action. */ class V1beta1SubjectAccessReview { static getAttributeTypeMap() { return V1beta1SubjectAccessReview.attributeTypeMap; } } 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" } ]; exports.V1beta1SubjectAccessReview = V1beta1SubjectAccessReview; /** * SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ class V1beta1SubjectAccessReviewSpec { static getAttributeTypeMap() { return V1beta1SubjectAccessReviewSpec.attributeTypeMap; } } 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" } ]; exports.V1beta1SubjectAccessReviewSpec = V1beta1SubjectAccessReviewSpec; /** * SubjectAccessReviewStatus */ class V1beta1SubjectAccessReviewStatus { static getAttributeTypeMap() { return V1beta1SubjectAccessReviewStatus.attributeTypeMap; } } 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" } ]; exports.V1beta1SubjectAccessReviewStatus = V1beta1SubjectAccessReviewStatus; /** * 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; } } 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" } ]; exports.V1beta1SubjectRulesReviewStatus = V1beta1SubjectRulesReviewStatus; /** * 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; } } 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" } ]; exports.V1beta1TokenReview = V1beta1TokenReview; /** * TokenReviewSpec is a description of the token authentication request. */ class V1beta1TokenReviewSpec { static getAttributeTypeMap() { return V1beta1TokenReviewSpec.attributeTypeMap; } } V1beta1TokenReviewSpec.discriminator = undefined; V1beta1TokenReviewSpec.attributeTypeMap = [ { "name": "audiences", "baseName": "audiences", "type": "Array" }, { "name": "token", "baseName": "token", "type": "string" } ]; exports.V1beta1TokenReviewSpec = V1beta1TokenReviewSpec; /** * TokenReviewStatus is the result of the token authentication request. */ class V1beta1TokenReviewStatus { static getAttributeTypeMap() { return V1beta1TokenReviewStatus.attributeTypeMap; } } 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" } ]; exports.V1beta1TokenReviewStatus = V1beta1TokenReviewStatus; /** * UserInfo holds the information about the user needed to implement the user.Info interface. */ class V1beta1UserInfo { static getAttributeTypeMap() { return V1beta1UserInfo.attributeTypeMap; } } 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" } ]; exports.V1beta1UserInfo = V1beta1UserInfo; /** * ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. */ class V1beta1ValidatingWebhookConfiguration { static getAttributeTypeMap() { return V1beta1ValidatingWebhookConfiguration.attributeTypeMap; } } 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" } ]; exports.V1beta1ValidatingWebhookConfiguration = V1beta1ValidatingWebhookConfiguration; /** * ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. */ class V1beta1ValidatingWebhookConfigurationList { static getAttributeTypeMap() { return V1beta1ValidatingWebhookConfigurationList.attributeTypeMap; } } 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" } ]; exports.V1beta1ValidatingWebhookConfigurationList = V1beta1ValidatingWebhookConfigurationList; /** * 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; } } 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" } ]; exports.V1beta1VolumeAttachment = V1beta1VolumeAttachment; /** * VolumeAttachmentList is a collection of VolumeAttachment objects. */ class V1beta1VolumeAttachmentList { static getAttributeTypeMap() { return V1beta1VolumeAttachmentList.attributeTypeMap; } } 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" } ]; exports.V1beta1VolumeAttachmentList = V1beta1VolumeAttachmentList; /** * 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; } } V1beta1VolumeAttachmentSource.discriminator = undefined; V1beta1VolumeAttachmentSource.attributeTypeMap = [ { "name": "persistentVolumeName", "baseName": "persistentVolumeName", "type": "string" } ]; exports.V1beta1VolumeAttachmentSource = V1beta1VolumeAttachmentSource; /** * VolumeAttachmentSpec is the specification of a VolumeAttachment request. */ class V1beta1VolumeAttachmentSpec { static getAttributeTypeMap() { return V1beta1VolumeAttachmentSpec.attributeTypeMap; } } V1beta1VolumeAttachmentSpec.discriminator = undefined; V1beta1VolumeAttachmentSpec.attributeTypeMap = [ { "name": "attacher", "baseName": "attacher", "type": "string" }, { "name": "nodeName", "baseName": "nodeName", "type": "string" }, { "name": "source", "baseName": "source", "type": "V1beta1VolumeAttachmentSource" } ]; exports.V1beta1VolumeAttachmentSpec = V1beta1VolumeAttachmentSpec; /** * VolumeAttachmentStatus is the status of a VolumeAttachment request. */ class V1beta1VolumeAttachmentStatus { static getAttributeTypeMap() { return V1beta1VolumeAttachmentStatus.attributeTypeMap; } } 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" } ]; exports.V1beta1VolumeAttachmentStatus = V1beta1VolumeAttachmentStatus; /** * VolumeError captures an error encountered during a volume operation. */ class V1beta1VolumeError { static getAttributeTypeMap() { return V1beta1VolumeError.attributeTypeMap; } } V1beta1VolumeError.discriminator = undefined; V1beta1VolumeError.attributeTypeMap = [ { "name": "message", "baseName": "message", "type": "string" }, { "name": "time", "baseName": "time", "type": "Date" } ]; exports.V1beta1VolumeError = V1beta1VolumeError; /** * Webhook describes an admission webhook and the resources and operations it applies to. */ class V1beta1Webhook { static getAttributeTypeMap() { return V1beta1Webhook.attributeTypeMap; } } V1beta1Webhook.discriminator = undefined; V1beta1Webhook.attributeTypeMap = [ { "name": "clientConfig", "baseName": "clientConfig", "type": "AdmissionregistrationV1beta1WebhookClientConfig" }, { "name": "failurePolicy", "baseName": "failurePolicy", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" }, { "name": "namespaceSelector", "baseName": "namespaceSelector", "type": "V1LabelSelector" }, { "name": "rules", "baseName": "rules", "type": "Array" }, { "name": "sideEffects", "baseName": "sideEffects", "type": "string" } ]; exports.V1beta1Webhook = V1beta1Webhook; /** * DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. 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 V1beta2ControllerRevision { static getAttributeTypeMap() { return V1beta2ControllerRevision.attributeTypeMap; } } V1beta2ControllerRevision.discriminator = undefined; V1beta2ControllerRevision.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "data", "baseName": "data", "type": "RuntimeRawExtension" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "revision", "baseName": "revision", "type": "number" } ]; exports.V1beta2ControllerRevision = V1beta2ControllerRevision; /** * ControllerRevisionList is a resource containing a list of ControllerRevision objects. */ class V1beta2ControllerRevisionList { static getAttributeTypeMap() { return V1beta2ControllerRevisionList.attributeTypeMap; } } V1beta2ControllerRevisionList.discriminator = undefined; V1beta2ControllerRevisionList.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" } ]; exports.V1beta2ControllerRevisionList = V1beta2ControllerRevisionList; /** * DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set. */ class V1beta2DaemonSet { static getAttributeTypeMap() { return V1beta2DaemonSet.attributeTypeMap; } } V1beta2DaemonSet.discriminator = undefined; V1beta2DaemonSet.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta2DaemonSetSpec" }, { "name": "status", "baseName": "status", "type": "V1beta2DaemonSetStatus" } ]; exports.V1beta2DaemonSet = V1beta2DaemonSet; /** * DaemonSetCondition describes the state of a DaemonSet at a certain point. */ class V1beta2DaemonSetCondition { static getAttributeTypeMap() { return V1beta2DaemonSetCondition.attributeTypeMap; } } V1beta2DaemonSetCondition.discriminator = undefined; V1beta2DaemonSetCondition.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" } ]; exports.V1beta2DaemonSetCondition = V1beta2DaemonSetCondition; /** * DaemonSetList is a collection of daemon sets. */ class V1beta2DaemonSetList { static getAttributeTypeMap() { return V1beta2DaemonSetList.attributeTypeMap; } } V1beta2DaemonSetList.discriminator = undefined; V1beta2DaemonSetList.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" } ]; exports.V1beta2DaemonSetList = V1beta2DaemonSetList; /** * DaemonSetSpec is the specification of a daemon set. */ class V1beta2DaemonSetSpec { static getAttributeTypeMap() { return V1beta2DaemonSetSpec.attributeTypeMap; } } V1beta2DaemonSetSpec.discriminator = undefined; V1beta2DaemonSetSpec.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": "V1beta2DaemonSetUpdateStrategy" } ]; exports.V1beta2DaemonSetSpec = V1beta2DaemonSetSpec; /** * DaemonSetStatus represents the current status of a daemon set. */ class V1beta2DaemonSetStatus { static getAttributeTypeMap() { return V1beta2DaemonSetStatus.attributeTypeMap; } } V1beta2DaemonSetStatus.discriminator = undefined; V1beta2DaemonSetStatus.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" } ]; exports.V1beta2DaemonSetStatus = V1beta2DaemonSetStatus; /** * DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. */ class V1beta2DaemonSetUpdateStrategy { static getAttributeTypeMap() { return V1beta2DaemonSetUpdateStrategy.attributeTypeMap; } } V1beta2DaemonSetUpdateStrategy.discriminator = undefined; V1beta2DaemonSetUpdateStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1beta2RollingUpdateDaemonSet" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1beta2DaemonSetUpdateStrategy = V1beta2DaemonSetUpdateStrategy; /** * DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. */ class V1beta2Deployment { static getAttributeTypeMap() { return V1beta2Deployment.attributeTypeMap; } } V1beta2Deployment.discriminator = undefined; V1beta2Deployment.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta2DeploymentSpec" }, { "name": "status", "baseName": "status", "type": "V1beta2DeploymentStatus" } ]; exports.V1beta2Deployment = V1beta2Deployment; /** * DeploymentCondition describes the state of a deployment at a certain point. */ class V1beta2DeploymentCondition { static getAttributeTypeMap() { return V1beta2DeploymentCondition.attributeTypeMap; } } V1beta2DeploymentCondition.discriminator = undefined; V1beta2DeploymentCondition.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" } ]; exports.V1beta2DeploymentCondition = V1beta2DeploymentCondition; /** * DeploymentList is a list of Deployments. */ class V1beta2DeploymentList { static getAttributeTypeMap() { return V1beta2DeploymentList.attributeTypeMap; } } V1beta2DeploymentList.discriminator = undefined; V1beta2DeploymentList.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" } ]; exports.V1beta2DeploymentList = V1beta2DeploymentList; /** * DeploymentSpec is the specification of the desired behavior of the Deployment. */ class V1beta2DeploymentSpec { static getAttributeTypeMap() { return V1beta2DeploymentSpec.attributeTypeMap; } } V1beta2DeploymentSpec.discriminator = undefined; V1beta2DeploymentSpec.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": "V1beta2DeploymentStrategy" }, { "name": "template", "baseName": "template", "type": "V1PodTemplateSpec" } ]; exports.V1beta2DeploymentSpec = V1beta2DeploymentSpec; /** * DeploymentStatus is the most recently observed status of the Deployment. */ class V1beta2DeploymentStatus { static getAttributeTypeMap() { return V1beta2DeploymentStatus.attributeTypeMap; } } V1beta2DeploymentStatus.discriminator = undefined; V1beta2DeploymentStatus.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" } ]; exports.V1beta2DeploymentStatus = V1beta2DeploymentStatus; /** * DeploymentStrategy describes how to replace existing pods with new ones. */ class V1beta2DeploymentStrategy { static getAttributeTypeMap() { return V1beta2DeploymentStrategy.attributeTypeMap; } } V1beta2DeploymentStrategy.discriminator = undefined; V1beta2DeploymentStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1beta2RollingUpdateDeployment" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1beta2DeploymentStrategy = V1beta2DeploymentStrategy; /** * DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time. */ class V1beta2ReplicaSet { static getAttributeTypeMap() { return V1beta2ReplicaSet.attributeTypeMap; } } V1beta2ReplicaSet.discriminator = undefined; V1beta2ReplicaSet.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta2ReplicaSetSpec" }, { "name": "status", "baseName": "status", "type": "V1beta2ReplicaSetStatus" } ]; exports.V1beta2ReplicaSet = V1beta2ReplicaSet; /** * ReplicaSetCondition describes the state of a replica set at a certain point. */ class V1beta2ReplicaSetCondition { static getAttributeTypeMap() { return V1beta2ReplicaSetCondition.attributeTypeMap; } } V1beta2ReplicaSetCondition.discriminator = undefined; V1beta2ReplicaSetCondition.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" } ]; exports.V1beta2ReplicaSetCondition = V1beta2ReplicaSetCondition; /** * ReplicaSetList is a collection of ReplicaSets. */ class V1beta2ReplicaSetList { static getAttributeTypeMap() { return V1beta2ReplicaSetList.attributeTypeMap; } } V1beta2ReplicaSetList.discriminator = undefined; V1beta2ReplicaSetList.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" } ]; exports.V1beta2ReplicaSetList = V1beta2ReplicaSetList; /** * ReplicaSetSpec is the specification of a ReplicaSet. */ class V1beta2ReplicaSetSpec { static getAttributeTypeMap() { return V1beta2ReplicaSetSpec.attributeTypeMap; } } V1beta2ReplicaSetSpec.discriminator = undefined; V1beta2ReplicaSetSpec.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" } ]; exports.V1beta2ReplicaSetSpec = V1beta2ReplicaSetSpec; /** * ReplicaSetStatus represents the current status of a ReplicaSet. */ class V1beta2ReplicaSetStatus { static getAttributeTypeMap() { return V1beta2ReplicaSetStatus.attributeTypeMap; } } V1beta2ReplicaSetStatus.discriminator = undefined; V1beta2ReplicaSetStatus.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" } ]; exports.V1beta2ReplicaSetStatus = V1beta2ReplicaSetStatus; /** * Spec to control the desired behavior of daemon set rolling update. */ class V1beta2RollingUpdateDaemonSet { static getAttributeTypeMap() { return V1beta2RollingUpdateDaemonSet.attributeTypeMap; } } V1beta2RollingUpdateDaemonSet.discriminator = undefined; V1beta2RollingUpdateDaemonSet.attributeTypeMap = [ { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.V1beta2RollingUpdateDaemonSet = V1beta2RollingUpdateDaemonSet; /** * Spec to control the desired behavior of rolling update. */ class V1beta2RollingUpdateDeployment { static getAttributeTypeMap() { return V1beta2RollingUpdateDeployment.attributeTypeMap; } } V1beta2RollingUpdateDeployment.discriminator = undefined; V1beta2RollingUpdateDeployment.attributeTypeMap = [ { "name": "maxSurge", "baseName": "maxSurge", "type": "any" }, { "name": "maxUnavailable", "baseName": "maxUnavailable", "type": "any" } ]; exports.V1beta2RollingUpdateDeployment = V1beta2RollingUpdateDeployment; /** * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. */ class V1beta2RollingUpdateStatefulSetStrategy { static getAttributeTypeMap() { return V1beta2RollingUpdateStatefulSetStrategy.attributeTypeMap; } } V1beta2RollingUpdateStatefulSetStrategy.discriminator = undefined; V1beta2RollingUpdateStatefulSetStrategy.attributeTypeMap = [ { "name": "partition", "baseName": "partition", "type": "number" } ]; exports.V1beta2RollingUpdateStatefulSetStrategy = V1beta2RollingUpdateStatefulSetStrategy; /** * Scale represents a scaling request for a resource. */ class V1beta2Scale { static getAttributeTypeMap() { return V1beta2Scale.attributeTypeMap; } } V1beta2Scale.discriminator = undefined; V1beta2Scale.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta2ScaleSpec" }, { "name": "status", "baseName": "status", "type": "V1beta2ScaleStatus" } ]; exports.V1beta2Scale = V1beta2Scale; /** * ScaleSpec describes the attributes of a scale subresource */ class V1beta2ScaleSpec { static getAttributeTypeMap() { return V1beta2ScaleSpec.attributeTypeMap; } } V1beta2ScaleSpec.discriminator = undefined; V1beta2ScaleSpec.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" } ]; exports.V1beta2ScaleSpec = V1beta2ScaleSpec; /** * ScaleStatus represents the current status of a scale subresource. */ class V1beta2ScaleStatus { static getAttributeTypeMap() { return V1beta2ScaleStatus.attributeTypeMap; } } V1beta2ScaleStatus.discriminator = undefined; V1beta2ScaleStatus.attributeTypeMap = [ { "name": "replicas", "baseName": "replicas", "type": "number" }, { "name": "selector", "baseName": "selector", "type": "{ [key: string]: string; }" }, { "name": "targetSelector", "baseName": "targetSelector", "type": "string" } ]; exports.V1beta2ScaleStatus = V1beta2ScaleStatus; /** * DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. 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 V1beta2StatefulSet { static getAttributeTypeMap() { return V1beta2StatefulSet.attributeTypeMap; } } V1beta2StatefulSet.discriminator = undefined; V1beta2StatefulSet.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1beta2StatefulSetSpec" }, { "name": "status", "baseName": "status", "type": "V1beta2StatefulSetStatus" } ]; exports.V1beta2StatefulSet = V1beta2StatefulSet; /** * StatefulSetCondition describes the state of a statefulset at a certain point. */ class V1beta2StatefulSetCondition { static getAttributeTypeMap() { return V1beta2StatefulSetCondition.attributeTypeMap; } } V1beta2StatefulSetCondition.discriminator = undefined; V1beta2StatefulSetCondition.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" } ]; exports.V1beta2StatefulSetCondition = V1beta2StatefulSetCondition; /** * StatefulSetList is a collection of StatefulSets. */ class V1beta2StatefulSetList { static getAttributeTypeMap() { return V1beta2StatefulSetList.attributeTypeMap; } } V1beta2StatefulSetList.discriminator = undefined; V1beta2StatefulSetList.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" } ]; exports.V1beta2StatefulSetList = V1beta2StatefulSetList; /** * A StatefulSetSpec is the specification of a StatefulSet. */ class V1beta2StatefulSetSpec { static getAttributeTypeMap() { return V1beta2StatefulSetSpec.attributeTypeMap; } } V1beta2StatefulSetSpec.discriminator = undefined; V1beta2StatefulSetSpec.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": "V1beta2StatefulSetUpdateStrategy" }, { "name": "volumeClaimTemplates", "baseName": "volumeClaimTemplates", "type": "Array" } ]; exports.V1beta2StatefulSetSpec = V1beta2StatefulSetSpec; /** * StatefulSetStatus represents the current state of a StatefulSet. */ class V1beta2StatefulSetStatus { static getAttributeTypeMap() { return V1beta2StatefulSetStatus.attributeTypeMap; } } V1beta2StatefulSetStatus.discriminator = undefined; V1beta2StatefulSetStatus.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" } ]; exports.V1beta2StatefulSetStatus = V1beta2StatefulSetStatus; /** * 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 V1beta2StatefulSetUpdateStrategy { static getAttributeTypeMap() { return V1beta2StatefulSetUpdateStrategy.attributeTypeMap; } } V1beta2StatefulSetUpdateStrategy.discriminator = undefined; V1beta2StatefulSetUpdateStrategy.attributeTypeMap = [ { "name": "rollingUpdate", "baseName": "rollingUpdate", "type": "V1beta2RollingUpdateStatefulSetStrategy" }, { "name": "type", "baseName": "type", "type": "string" } ]; exports.V1beta2StatefulSetUpdateStrategy = V1beta2StatefulSetUpdateStrategy; /** * CronJob represents the configuration of a single cron job. */ class V2alpha1CronJob { static getAttributeTypeMap() { return V2alpha1CronJob.attributeTypeMap; } } 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" } ]; exports.V2alpha1CronJob = V2alpha1CronJob; /** * CronJobList is a collection of cron jobs. */ class V2alpha1CronJobList { static getAttributeTypeMap() { return V2alpha1CronJobList.attributeTypeMap; } } 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" } ]; exports.V2alpha1CronJobList = V2alpha1CronJobList; /** * CronJobSpec describes how the job execution will look like and when it will actually run. */ class V2alpha1CronJobSpec { static getAttributeTypeMap() { return V2alpha1CronJobSpec.attributeTypeMap; } } 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" } ]; exports.V2alpha1CronJobSpec = V2alpha1CronJobSpec; /** * CronJobStatus represents the current state of a cron job. */ class V2alpha1CronJobStatus { static getAttributeTypeMap() { return V2alpha1CronJobStatus.attributeTypeMap; } } V2alpha1CronJobStatus.discriminator = undefined; V2alpha1CronJobStatus.attributeTypeMap = [ { "name": "active", "baseName": "active", "type": "Array" }, { "name": "lastScheduleTime", "baseName": "lastScheduleTime", "type": "Date" } ]; exports.V2alpha1CronJobStatus = V2alpha1CronJobStatus; /** * JobTemplateSpec describes the data a Job should have when created from a template */ class V2alpha1JobTemplateSpec { static getAttributeTypeMap() { return V2alpha1JobTemplateSpec.attributeTypeMap; } } V2alpha1JobTemplateSpec.discriminator = undefined; V2alpha1JobTemplateSpec.attributeTypeMap = [ { "name": "metadata", "baseName": "metadata", "type": "V1ObjectMeta" }, { "name": "spec", "baseName": "spec", "type": "V1JobSpec" } ]; exports.V2alpha1JobTemplateSpec = V2alpha1JobTemplateSpec; /** * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ class V2beta1CrossVersionObjectReference { static getAttributeTypeMap() { return V2beta1CrossVersionObjectReference.attributeTypeMap; } } V2beta1CrossVersionObjectReference.discriminator = undefined; V2beta1CrossVersionObjectReference.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V2beta1CrossVersionObjectReference = V2beta1CrossVersionObjectReference; /** * 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; } } 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" } ]; exports.V2beta1ExternalMetricSource = V2beta1ExternalMetricSource; /** * ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. */ class V2beta1ExternalMetricStatus { static getAttributeTypeMap() { return V2beta1ExternalMetricStatus.attributeTypeMap; } } 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" } ]; exports.V2beta1ExternalMetricStatus = V2beta1ExternalMetricStatus; /** * 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; } } 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" } ]; exports.V2beta1HorizontalPodAutoscaler = V2beta1HorizontalPodAutoscaler; /** * HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. */ class V2beta1HorizontalPodAutoscalerCondition { static getAttributeTypeMap() { return V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap; } } 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" } ]; exports.V2beta1HorizontalPodAutoscalerCondition = V2beta1HorizontalPodAutoscalerCondition; /** * HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. */ class V2beta1HorizontalPodAutoscalerList { static getAttributeTypeMap() { return V2beta1HorizontalPodAutoscalerList.attributeTypeMap; } } 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" } ]; exports.V2beta1HorizontalPodAutoscalerList = V2beta1HorizontalPodAutoscalerList; /** * HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. */ class V2beta1HorizontalPodAutoscalerSpec { static getAttributeTypeMap() { return V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap; } } 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" } ]; exports.V2beta1HorizontalPodAutoscalerSpec = V2beta1HorizontalPodAutoscalerSpec; /** * HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. */ class V2beta1HorizontalPodAutoscalerStatus { static getAttributeTypeMap() { return V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap; } } 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" } ]; exports.V2beta1HorizontalPodAutoscalerStatus = V2beta1HorizontalPodAutoscalerStatus; /** * 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; } } V2beta1MetricSpec.discriminator = undefined; V2beta1MetricSpec.attributeTypeMap = [ { "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" } ]; exports.V2beta1MetricSpec = V2beta1MetricSpec; /** * MetricStatus describes the last-read state of a single metric. */ class V2beta1MetricStatus { static getAttributeTypeMap() { return V2beta1MetricStatus.attributeTypeMap; } } V2beta1MetricStatus.discriminator = undefined; V2beta1MetricStatus.attributeTypeMap = [ { "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" } ]; exports.V2beta1MetricStatus = V2beta1MetricStatus; /** * 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; } } 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" } ]; exports.V2beta1ObjectMetricSource = V2beta1ObjectMetricSource; /** * 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; } } 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" } ]; exports.V2beta1ObjectMetricStatus = V2beta1ObjectMetricStatus; /** * 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; } } V2beta1PodsMetricSource.discriminator = undefined; V2beta1PodsMetricSource.attributeTypeMap = [ { "name": "metricName", "baseName": "metricName", "type": "string" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" }, { "name": "targetAverageValue", "baseName": "targetAverageValue", "type": "string" } ]; exports.V2beta1PodsMetricSource = V2beta1PodsMetricSource; /** * 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; } } V2beta1PodsMetricStatus.discriminator = undefined; V2beta1PodsMetricStatus.attributeTypeMap = [ { "name": "currentAverageValue", "baseName": "currentAverageValue", "type": "string" }, { "name": "metricName", "baseName": "metricName", "type": "string" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" } ]; exports.V2beta1PodsMetricStatus = V2beta1PodsMetricStatus; /** * 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; } } V2beta1ResourceMetricSource.discriminator = undefined; V2beta1ResourceMetricSource.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "targetAverageUtilization", "baseName": "targetAverageUtilization", "type": "number" }, { "name": "targetAverageValue", "baseName": "targetAverageValue", "type": "string" } ]; exports.V2beta1ResourceMetricSource = V2beta1ResourceMetricSource; /** * 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; } } V2beta1ResourceMetricStatus.discriminator = undefined; V2beta1ResourceMetricStatus.attributeTypeMap = [ { "name": "currentAverageUtilization", "baseName": "currentAverageUtilization", "type": "number" }, { "name": "currentAverageValue", "baseName": "currentAverageValue", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V2beta1ResourceMetricStatus = V2beta1ResourceMetricStatus; /** * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ class V2beta2CrossVersionObjectReference { static getAttributeTypeMap() { return V2beta2CrossVersionObjectReference.attributeTypeMap; } } V2beta2CrossVersionObjectReference.discriminator = undefined; V2beta2CrossVersionObjectReference.attributeTypeMap = [ { "name": "apiVersion", "baseName": "apiVersion", "type": "string" }, { "name": "kind", "baseName": "kind", "type": "string" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V2beta2CrossVersionObjectReference = V2beta2CrossVersionObjectReference; /** * 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; } } V2beta2ExternalMetricSource.discriminator = undefined; V2beta2ExternalMetricSource.attributeTypeMap = [ { "name": "metric", "baseName": "metric", "type": "V2beta2MetricIdentifier" }, { "name": "target", "baseName": "target", "type": "V2beta2MetricTarget" } ]; exports.V2beta2ExternalMetricSource = V2beta2ExternalMetricSource; /** * ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. */ class V2beta2ExternalMetricStatus { static getAttributeTypeMap() { return V2beta2ExternalMetricStatus.attributeTypeMap; } } V2beta2ExternalMetricStatus.discriminator = undefined; V2beta2ExternalMetricStatus.attributeTypeMap = [ { "name": "current", "baseName": "current", "type": "V2beta2MetricValueStatus" }, { "name": "metric", "baseName": "metric", "type": "V2beta2MetricIdentifier" } ]; exports.V2beta2ExternalMetricStatus = V2beta2ExternalMetricStatus; /** * 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; } } 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" } ]; exports.V2beta2HorizontalPodAutoscaler = V2beta2HorizontalPodAutoscaler; /** * HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. */ class V2beta2HorizontalPodAutoscalerCondition { static getAttributeTypeMap() { return V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap; } } 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" } ]; exports.V2beta2HorizontalPodAutoscalerCondition = V2beta2HorizontalPodAutoscalerCondition; /** * HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. */ class V2beta2HorizontalPodAutoscalerList { static getAttributeTypeMap() { return V2beta2HorizontalPodAutoscalerList.attributeTypeMap; } } 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" } ]; exports.V2beta2HorizontalPodAutoscalerList = V2beta2HorizontalPodAutoscalerList; /** * HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. */ class V2beta2HorizontalPodAutoscalerSpec { static getAttributeTypeMap() { return V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap; } } V2beta2HorizontalPodAutoscalerSpec.discriminator = undefined; V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap = [ { "name": "maxReplicas", "baseName": "maxReplicas", "type": "number" }, { "name": "metrics", "baseName": "metrics", "type": "Array" }, { "name": "minReplicas", "baseName": "minReplicas", "type": "number" }, { "name": "scaleTargetRef", "baseName": "scaleTargetRef", "type": "V2beta2CrossVersionObjectReference" } ]; exports.V2beta2HorizontalPodAutoscalerSpec = V2beta2HorizontalPodAutoscalerSpec; /** * HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. */ class V2beta2HorizontalPodAutoscalerStatus { static getAttributeTypeMap() { return V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap; } } 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" } ]; exports.V2beta2HorizontalPodAutoscalerStatus = V2beta2HorizontalPodAutoscalerStatus; /** * MetricIdentifier defines the name and optionally selector for a metric */ class V2beta2MetricIdentifier { static getAttributeTypeMap() { return V2beta2MetricIdentifier.attributeTypeMap; } } V2beta2MetricIdentifier.discriminator = undefined; V2beta2MetricIdentifier.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "selector", "baseName": "selector", "type": "V1LabelSelector" } ]; exports.V2beta2MetricIdentifier = V2beta2MetricIdentifier; /** * 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; } } V2beta2MetricSpec.discriminator = undefined; V2beta2MetricSpec.attributeTypeMap = [ { "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" } ]; exports.V2beta2MetricSpec = V2beta2MetricSpec; /** * MetricStatus describes the last-read state of a single metric. */ class V2beta2MetricStatus { static getAttributeTypeMap() { return V2beta2MetricStatus.attributeTypeMap; } } V2beta2MetricStatus.discriminator = undefined; V2beta2MetricStatus.attributeTypeMap = [ { "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" } ]; exports.V2beta2MetricStatus = V2beta2MetricStatus; /** * MetricTarget defines the target value, average value, or average utilization of a specific metric */ class V2beta2MetricTarget { static getAttributeTypeMap() { return V2beta2MetricTarget.attributeTypeMap; } } 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" } ]; exports.V2beta2MetricTarget = V2beta2MetricTarget; /** * MetricValueStatus holds the current value for a metric */ class V2beta2MetricValueStatus { static getAttributeTypeMap() { return V2beta2MetricValueStatus.attributeTypeMap; } } V2beta2MetricValueStatus.discriminator = undefined; V2beta2MetricValueStatus.attributeTypeMap = [ { "name": "averageUtilization", "baseName": "averageUtilization", "type": "number" }, { "name": "averageValue", "baseName": "averageValue", "type": "string" }, { "name": "value", "baseName": "value", "type": "string" } ]; exports.V2beta2MetricValueStatus = V2beta2MetricValueStatus; /** * 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; } } V2beta2ObjectMetricSource.discriminator = undefined; V2beta2ObjectMetricSource.attributeTypeMap = [ { "name": "describedObject", "baseName": "describedObject", "type": "V2beta2CrossVersionObjectReference" }, { "name": "metric", "baseName": "metric", "type": "V2beta2MetricIdentifier" }, { "name": "target", "baseName": "target", "type": "V2beta2MetricTarget" } ]; exports.V2beta2ObjectMetricSource = V2beta2ObjectMetricSource; /** * 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; } } V2beta2ObjectMetricStatus.discriminator = undefined; V2beta2ObjectMetricStatus.attributeTypeMap = [ { "name": "current", "baseName": "current", "type": "V2beta2MetricValueStatus" }, { "name": "describedObject", "baseName": "describedObject", "type": "V2beta2CrossVersionObjectReference" }, { "name": "metric", "baseName": "metric", "type": "V2beta2MetricIdentifier" } ]; exports.V2beta2ObjectMetricStatus = V2beta2ObjectMetricStatus; /** * 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; } } V2beta2PodsMetricSource.discriminator = undefined; V2beta2PodsMetricSource.attributeTypeMap = [ { "name": "metric", "baseName": "metric", "type": "V2beta2MetricIdentifier" }, { "name": "target", "baseName": "target", "type": "V2beta2MetricTarget" } ]; exports.V2beta2PodsMetricSource = V2beta2PodsMetricSource; /** * 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; } } V2beta2PodsMetricStatus.discriminator = undefined; V2beta2PodsMetricStatus.attributeTypeMap = [ { "name": "current", "baseName": "current", "type": "V2beta2MetricValueStatus" }, { "name": "metric", "baseName": "metric", "type": "V2beta2MetricIdentifier" } ]; exports.V2beta2PodsMetricStatus = V2beta2PodsMetricStatus; /** * 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; } } V2beta2ResourceMetricSource.discriminator = undefined; V2beta2ResourceMetricSource.attributeTypeMap = [ { "name": "name", "baseName": "name", "type": "string" }, { "name": "target", "baseName": "target", "type": "V2beta2MetricTarget" } ]; exports.V2beta2ResourceMetricSource = V2beta2ResourceMetricSource; /** * 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; } } V2beta2ResourceMetricStatus.discriminator = undefined; V2beta2ResourceMetricStatus.attributeTypeMap = [ { "name": "current", "baseName": "current", "type": "V2beta2MetricValueStatus" }, { "name": "name", "baseName": "name", "type": "string" } ]; exports.V2beta2ResourceMetricStatus = V2beta2ResourceMetricStatus; /** * Info contains versioning information. how we'll want to distribute that information. */ class VersionInfo { static getAttributeTypeMap() { return VersionInfo.attributeTypeMap; } } 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" } ]; exports.VersionInfo = VersionInfo; let enumsMap = {}; let typeMap = { "AdmissionregistrationV1beta1ServiceReference": AdmissionregistrationV1beta1ServiceReference, "AdmissionregistrationV1beta1WebhookClientConfig": AdmissionregistrationV1beta1WebhookClientConfig, "ApiextensionsV1beta1ServiceReference": ApiextensionsV1beta1ServiceReference, "ApiextensionsV1beta1WebhookClientConfig": ApiextensionsV1beta1WebhookClientConfig, "ApiregistrationV1beta1ServiceReference": ApiregistrationV1beta1ServiceReference, "AppsV1beta1Deployment": AppsV1beta1Deployment, "AppsV1beta1DeploymentCondition": AppsV1beta1DeploymentCondition, "AppsV1beta1DeploymentList": AppsV1beta1DeploymentList, "AppsV1beta1DeploymentRollback": AppsV1beta1DeploymentRollback, "AppsV1beta1DeploymentSpec": AppsV1beta1DeploymentSpec, "AppsV1beta1DeploymentStatus": AppsV1beta1DeploymentStatus, "AppsV1beta1DeploymentStrategy": AppsV1beta1DeploymentStrategy, "AppsV1beta1RollbackConfig": AppsV1beta1RollbackConfig, "AppsV1beta1RollingUpdateDeployment": AppsV1beta1RollingUpdateDeployment, "AppsV1beta1Scale": AppsV1beta1Scale, "AppsV1beta1ScaleSpec": AppsV1beta1ScaleSpec, "AppsV1beta1ScaleStatus": AppsV1beta1ScaleStatus, "ExtensionsV1beta1AllowedFlexVolume": ExtensionsV1beta1AllowedFlexVolume, "ExtensionsV1beta1AllowedHostPath": ExtensionsV1beta1AllowedHostPath, "ExtensionsV1beta1Deployment": ExtensionsV1beta1Deployment, "ExtensionsV1beta1DeploymentCondition": ExtensionsV1beta1DeploymentCondition, "ExtensionsV1beta1DeploymentList": ExtensionsV1beta1DeploymentList, "ExtensionsV1beta1DeploymentRollback": ExtensionsV1beta1DeploymentRollback, "ExtensionsV1beta1DeploymentSpec": ExtensionsV1beta1DeploymentSpec, "ExtensionsV1beta1DeploymentStatus": ExtensionsV1beta1DeploymentStatus, "ExtensionsV1beta1DeploymentStrategy": ExtensionsV1beta1DeploymentStrategy, "ExtensionsV1beta1FSGroupStrategyOptions": ExtensionsV1beta1FSGroupStrategyOptions, "ExtensionsV1beta1HostPortRange": ExtensionsV1beta1HostPortRange, "ExtensionsV1beta1IDRange": ExtensionsV1beta1IDRange, "ExtensionsV1beta1PodSecurityPolicy": ExtensionsV1beta1PodSecurityPolicy, "ExtensionsV1beta1PodSecurityPolicyList": ExtensionsV1beta1PodSecurityPolicyList, "ExtensionsV1beta1PodSecurityPolicySpec": ExtensionsV1beta1PodSecurityPolicySpec, "ExtensionsV1beta1RollbackConfig": ExtensionsV1beta1RollbackConfig, "ExtensionsV1beta1RollingUpdateDeployment": ExtensionsV1beta1RollingUpdateDeployment, "ExtensionsV1beta1RunAsGroupStrategyOptions": ExtensionsV1beta1RunAsGroupStrategyOptions, "ExtensionsV1beta1RunAsUserStrategyOptions": ExtensionsV1beta1RunAsUserStrategyOptions, "ExtensionsV1beta1SELinuxStrategyOptions": ExtensionsV1beta1SELinuxStrategyOptions, "ExtensionsV1beta1Scale": ExtensionsV1beta1Scale, "ExtensionsV1beta1ScaleSpec": ExtensionsV1beta1ScaleSpec, "ExtensionsV1beta1ScaleStatus": ExtensionsV1beta1ScaleStatus, "ExtensionsV1beta1SupplementalGroupsStrategyOptions": ExtensionsV1beta1SupplementalGroupsStrategyOptions, "PolicyV1beta1AllowedFlexVolume": PolicyV1beta1AllowedFlexVolume, "PolicyV1beta1AllowedHostPath": PolicyV1beta1AllowedHostPath, "PolicyV1beta1FSGroupStrategyOptions": PolicyV1beta1FSGroupStrategyOptions, "PolicyV1beta1HostPortRange": PolicyV1beta1HostPortRange, "PolicyV1beta1IDRange": PolicyV1beta1IDRange, "PolicyV1beta1PodSecurityPolicy": PolicyV1beta1PodSecurityPolicy, "PolicyV1beta1PodSecurityPolicyList": PolicyV1beta1PodSecurityPolicyList, "PolicyV1beta1PodSecurityPolicySpec": PolicyV1beta1PodSecurityPolicySpec, "PolicyV1beta1RunAsGroupStrategyOptions": PolicyV1beta1RunAsGroupStrategyOptions, "PolicyV1beta1RunAsUserStrategyOptions": PolicyV1beta1RunAsUserStrategyOptions, "PolicyV1beta1SELinuxStrategyOptions": PolicyV1beta1SELinuxStrategyOptions, "PolicyV1beta1SupplementalGroupsStrategyOptions": PolicyV1beta1SupplementalGroupsStrategyOptions, "RuntimeRawExtension": RuntimeRawExtension, "V1APIGroup": V1APIGroup, "V1APIGroupList": V1APIGroupList, "V1APIResource": V1APIResource, "V1APIResourceList": V1APIResourceList, "V1APIService": V1APIService, "V1APIServiceCondition": V1APIServiceCondition, "V1APIServiceList": V1APIServiceList, "V1APIServiceSpec": V1APIServiceSpec, "V1APIServiceStatus": V1APIServiceStatus, "V1APIVersions": V1APIVersions, "V1AWSElasticBlockStoreVolumeSource": V1AWSElasticBlockStoreVolumeSource, "V1Affinity": V1Affinity, "V1AggregationRule": V1AggregationRule, "V1AttachedVolume": V1AttachedVolume, "V1AzureDiskVolumeSource": V1AzureDiskVolumeSource, "V1AzureFilePersistentVolumeSource": V1AzureFilePersistentVolumeSource, "V1AzureFileVolumeSource": V1AzureFileVolumeSource, "V1Binding": V1Binding, "V1CSIPersistentVolumeSource": V1CSIPersistentVolumeSource, "V1Capabilities": V1Capabilities, "V1CephFSPersistentVolumeSource": V1CephFSPersistentVolumeSource, "V1CephFSVolumeSource": V1CephFSVolumeSource, "V1CinderPersistentVolumeSource": V1CinderPersistentVolumeSource, "V1CinderVolumeSource": V1CinderVolumeSource, "V1ClientIPConfig": V1ClientIPConfig, "V1ClusterRole": V1ClusterRole, "V1ClusterRoleBinding": V1ClusterRoleBinding, "V1ClusterRoleBindingList": V1ClusterRoleBindingList, "V1ClusterRoleList": V1ClusterRoleList, "V1ComponentCondition": V1ComponentCondition, "V1ComponentStatus": V1ComponentStatus, "V1ComponentStatusList": V1ComponentStatusList, "V1ConfigMap": V1ConfigMap, "V1ConfigMapEnvSource": V1ConfigMapEnvSource, "V1ConfigMapKeySelector": V1ConfigMapKeySelector, "V1ConfigMapList": V1ConfigMapList, "V1ConfigMapNodeConfigSource": V1ConfigMapNodeConfigSource, "V1ConfigMapProjection": V1ConfigMapProjection, "V1ConfigMapVolumeSource": V1ConfigMapVolumeSource, "V1Container": V1Container, "V1ContainerImage": V1ContainerImage, "V1ContainerPort": V1ContainerPort, "V1ContainerState": V1ContainerState, "V1ContainerStateRunning": V1ContainerStateRunning, "V1ContainerStateTerminated": V1ContainerStateTerminated, "V1ContainerStateWaiting": V1ContainerStateWaiting, "V1ContainerStatus": V1ContainerStatus, "V1ControllerRevision": V1ControllerRevision, "V1ControllerRevisionList": V1ControllerRevisionList, "V1CrossVersionObjectReference": V1CrossVersionObjectReference, "V1DaemonEndpoint": V1DaemonEndpoint, "V1DaemonSet": V1DaemonSet, "V1DaemonSetCondition": V1DaemonSetCondition, "V1DaemonSetList": V1DaemonSetList, "V1DaemonSetSpec": V1DaemonSetSpec, "V1DaemonSetStatus": V1DaemonSetStatus, "V1DaemonSetUpdateStrategy": V1DaemonSetUpdateStrategy, "V1DeleteOptions": V1DeleteOptions, "V1Deployment": V1Deployment, "V1DeploymentCondition": V1DeploymentCondition, "V1DeploymentList": V1DeploymentList, "V1DeploymentSpec": V1DeploymentSpec, "V1DeploymentStatus": V1DeploymentStatus, "V1DeploymentStrategy": V1DeploymentStrategy, "V1DownwardAPIProjection": V1DownwardAPIProjection, "V1DownwardAPIVolumeFile": V1DownwardAPIVolumeFile, "V1DownwardAPIVolumeSource": V1DownwardAPIVolumeSource, "V1EmptyDirVolumeSource": V1EmptyDirVolumeSource, "V1EndpointAddress": V1EndpointAddress, "V1EndpointPort": V1EndpointPort, "V1EndpointSubset": V1EndpointSubset, "V1Endpoints": V1Endpoints, "V1EndpointsList": V1EndpointsList, "V1EnvFromSource": V1EnvFromSource, "V1EnvVar": V1EnvVar, "V1EnvVarSource": V1EnvVarSource, "V1Event": V1Event, "V1EventList": V1EventList, "V1EventSeries": V1EventSeries, "V1EventSource": V1EventSource, "V1ExecAction": V1ExecAction, "V1FCVolumeSource": V1FCVolumeSource, "V1FlexPersistentVolumeSource": V1FlexPersistentVolumeSource, "V1FlexVolumeSource": V1FlexVolumeSource, "V1FlockerVolumeSource": V1FlockerVolumeSource, "V1GCEPersistentDiskVolumeSource": V1GCEPersistentDiskVolumeSource, "V1GitRepoVolumeSource": V1GitRepoVolumeSource, "V1GlusterfsPersistentVolumeSource": V1GlusterfsPersistentVolumeSource, "V1GlusterfsVolumeSource": V1GlusterfsVolumeSource, "V1GroupVersionForDiscovery": V1GroupVersionForDiscovery, "V1HTTPGetAction": V1HTTPGetAction, "V1HTTPHeader": V1HTTPHeader, "V1Handler": V1Handler, "V1HorizontalPodAutoscaler": V1HorizontalPodAutoscaler, "V1HorizontalPodAutoscalerList": V1HorizontalPodAutoscalerList, "V1HorizontalPodAutoscalerSpec": V1HorizontalPodAutoscalerSpec, "V1HorizontalPodAutoscalerStatus": V1HorizontalPodAutoscalerStatus, "V1HostAlias": V1HostAlias, "V1HostPathVolumeSource": V1HostPathVolumeSource, "V1IPBlock": V1IPBlock, "V1ISCSIPersistentVolumeSource": V1ISCSIPersistentVolumeSource, "V1ISCSIVolumeSource": V1ISCSIVolumeSource, "V1Initializer": V1Initializer, "V1Initializers": V1Initializers, "V1Job": V1Job, "V1JobCondition": V1JobCondition, "V1JobList": V1JobList, "V1JobSpec": V1JobSpec, "V1JobStatus": V1JobStatus, "V1KeyToPath": V1KeyToPath, "V1LabelSelector": V1LabelSelector, "V1LabelSelectorRequirement": V1LabelSelectorRequirement, "V1Lifecycle": V1Lifecycle, "V1LimitRange": V1LimitRange, "V1LimitRangeItem": V1LimitRangeItem, "V1LimitRangeList": V1LimitRangeList, "V1LimitRangeSpec": V1LimitRangeSpec, "V1ListMeta": V1ListMeta, "V1LoadBalancerIngress": V1LoadBalancerIngress, "V1LoadBalancerStatus": V1LoadBalancerStatus, "V1LocalObjectReference": V1LocalObjectReference, "V1LocalSubjectAccessReview": V1LocalSubjectAccessReview, "V1LocalVolumeSource": V1LocalVolumeSource, "V1NFSVolumeSource": V1NFSVolumeSource, "V1Namespace": V1Namespace, "V1NamespaceList": V1NamespaceList, "V1NamespaceSpec": V1NamespaceSpec, "V1NamespaceStatus": V1NamespaceStatus, "V1NetworkPolicy": V1NetworkPolicy, "V1NetworkPolicyEgressRule": V1NetworkPolicyEgressRule, "V1NetworkPolicyIngressRule": V1NetworkPolicyIngressRule, "V1NetworkPolicyList": V1NetworkPolicyList, "V1NetworkPolicyPeer": V1NetworkPolicyPeer, "V1NetworkPolicyPort": V1NetworkPolicyPort, "V1NetworkPolicySpec": V1NetworkPolicySpec, "V1Node": V1Node, "V1NodeAddress": V1NodeAddress, "V1NodeAffinity": V1NodeAffinity, "V1NodeCondition": V1NodeCondition, "V1NodeConfigSource": V1NodeConfigSource, "V1NodeConfigStatus": V1NodeConfigStatus, "V1NodeDaemonEndpoints": V1NodeDaemonEndpoints, "V1NodeList": V1NodeList, "V1NodeSelector": V1NodeSelector, "V1NodeSelectorRequirement": V1NodeSelectorRequirement, "V1NodeSelectorTerm": V1NodeSelectorTerm, "V1NodeSpec": V1NodeSpec, "V1NodeStatus": V1NodeStatus, "V1NodeSystemInfo": V1NodeSystemInfo, "V1NonResourceAttributes": V1NonResourceAttributes, "V1NonResourceRule": V1NonResourceRule, "V1ObjectFieldSelector": V1ObjectFieldSelector, "V1ObjectMeta": V1ObjectMeta, "V1ObjectReference": V1ObjectReference, "V1OwnerReference": V1OwnerReference, "V1PersistentVolume": V1PersistentVolume, "V1PersistentVolumeClaim": V1PersistentVolumeClaim, "V1PersistentVolumeClaimCondition": V1PersistentVolumeClaimCondition, "V1PersistentVolumeClaimList": V1PersistentVolumeClaimList, "V1PersistentVolumeClaimSpec": V1PersistentVolumeClaimSpec, "V1PersistentVolumeClaimStatus": V1PersistentVolumeClaimStatus, "V1PersistentVolumeClaimVolumeSource": V1PersistentVolumeClaimVolumeSource, "V1PersistentVolumeList": V1PersistentVolumeList, "V1PersistentVolumeSpec": V1PersistentVolumeSpec, "V1PersistentVolumeStatus": V1PersistentVolumeStatus, "V1PhotonPersistentDiskVolumeSource": V1PhotonPersistentDiskVolumeSource, "V1Pod": V1Pod, "V1PodAffinity": V1PodAffinity, "V1PodAffinityTerm": V1PodAffinityTerm, "V1PodAntiAffinity": V1PodAntiAffinity, "V1PodCondition": V1PodCondition, "V1PodDNSConfig": V1PodDNSConfig, "V1PodDNSConfigOption": V1PodDNSConfigOption, "V1PodList": V1PodList, "V1PodReadinessGate": V1PodReadinessGate, "V1PodSecurityContext": V1PodSecurityContext, "V1PodSpec": V1PodSpec, "V1PodStatus": V1PodStatus, "V1PodTemplate": V1PodTemplate, "V1PodTemplateList": V1PodTemplateList, "V1PodTemplateSpec": V1PodTemplateSpec, "V1PolicyRule": V1PolicyRule, "V1PortworxVolumeSource": V1PortworxVolumeSource, "V1Preconditions": V1Preconditions, "V1PreferredSchedulingTerm": V1PreferredSchedulingTerm, "V1Probe": V1Probe, "V1ProjectedVolumeSource": V1ProjectedVolumeSource, "V1QuobyteVolumeSource": V1QuobyteVolumeSource, "V1RBDPersistentVolumeSource": V1RBDPersistentVolumeSource, "V1RBDVolumeSource": V1RBDVolumeSource, "V1ReplicaSet": V1ReplicaSet, "V1ReplicaSetCondition": V1ReplicaSetCondition, "V1ReplicaSetList": V1ReplicaSetList, "V1ReplicaSetSpec": V1ReplicaSetSpec, "V1ReplicaSetStatus": V1ReplicaSetStatus, "V1ReplicationController": V1ReplicationController, "V1ReplicationControllerCondition": V1ReplicationControllerCondition, "V1ReplicationControllerList": V1ReplicationControllerList, "V1ReplicationControllerSpec": V1ReplicationControllerSpec, "V1ReplicationControllerStatus": V1ReplicationControllerStatus, "V1ResourceAttributes": V1ResourceAttributes, "V1ResourceFieldSelector": V1ResourceFieldSelector, "V1ResourceQuota": V1ResourceQuota, "V1ResourceQuotaList": V1ResourceQuotaList, "V1ResourceQuotaSpec": V1ResourceQuotaSpec, "V1ResourceQuotaStatus": V1ResourceQuotaStatus, "V1ResourceRequirements": V1ResourceRequirements, "V1ResourceRule": V1ResourceRule, "V1Role": V1Role, "V1RoleBinding": V1RoleBinding, "V1RoleBindingList": V1RoleBindingList, "V1RoleList": V1RoleList, "V1RoleRef": V1RoleRef, "V1RollingUpdateDaemonSet": V1RollingUpdateDaemonSet, "V1RollingUpdateDeployment": V1RollingUpdateDeployment, "V1RollingUpdateStatefulSetStrategy": V1RollingUpdateStatefulSetStrategy, "V1SELinuxOptions": V1SELinuxOptions, "V1Scale": V1Scale, "V1ScaleIOPersistentVolumeSource": V1ScaleIOPersistentVolumeSource, "V1ScaleIOVolumeSource": V1ScaleIOVolumeSource, "V1ScaleSpec": V1ScaleSpec, "V1ScaleStatus": V1ScaleStatus, "V1ScopeSelector": V1ScopeSelector, "V1ScopedResourceSelectorRequirement": V1ScopedResourceSelectorRequirement, "V1Secret": V1Secret, "V1SecretEnvSource": V1SecretEnvSource, "V1SecretKeySelector": V1SecretKeySelector, "V1SecretList": V1SecretList, "V1SecretProjection": V1SecretProjection, "V1SecretReference": V1SecretReference, "V1SecretVolumeSource": V1SecretVolumeSource, "V1SecurityContext": V1SecurityContext, "V1SelfSubjectAccessReview": V1SelfSubjectAccessReview, "V1SelfSubjectAccessReviewSpec": V1SelfSubjectAccessReviewSpec, "V1SelfSubjectRulesReview": V1SelfSubjectRulesReview, "V1SelfSubjectRulesReviewSpec": V1SelfSubjectRulesReviewSpec, "V1ServerAddressByClientCIDR": V1ServerAddressByClientCIDR, "V1Service": V1Service, "V1ServiceAccount": V1ServiceAccount, "V1ServiceAccountList": V1ServiceAccountList, "V1ServiceAccountTokenProjection": V1ServiceAccountTokenProjection, "V1ServiceList": V1ServiceList, "V1ServicePort": V1ServicePort, "V1ServiceReference": V1ServiceReference, "V1ServiceSpec": V1ServiceSpec, "V1ServiceStatus": V1ServiceStatus, "V1SessionAffinityConfig": V1SessionAffinityConfig, "V1StatefulSet": V1StatefulSet, "V1StatefulSetCondition": V1StatefulSetCondition, "V1StatefulSetList": V1StatefulSetList, "V1StatefulSetSpec": V1StatefulSetSpec, "V1StatefulSetStatus": V1StatefulSetStatus, "V1StatefulSetUpdateStrategy": V1StatefulSetUpdateStrategy, "V1Status": V1Status, "V1StatusCause": V1StatusCause, "V1StatusDetails": V1StatusDetails, "V1StorageClass": V1StorageClass, "V1StorageClassList": V1StorageClassList, "V1StorageOSPersistentVolumeSource": V1StorageOSPersistentVolumeSource, "V1StorageOSVolumeSource": V1StorageOSVolumeSource, "V1Subject": V1Subject, "V1SubjectAccessReview": V1SubjectAccessReview, "V1SubjectAccessReviewSpec": V1SubjectAccessReviewSpec, "V1SubjectAccessReviewStatus": V1SubjectAccessReviewStatus, "V1SubjectRulesReviewStatus": V1SubjectRulesReviewStatus, "V1Sysctl": V1Sysctl, "V1TCPSocketAction": V1TCPSocketAction, "V1Taint": V1Taint, "V1TokenReview": V1TokenReview, "V1TokenReviewSpec": V1TokenReviewSpec, "V1TokenReviewStatus": V1TokenReviewStatus, "V1Toleration": V1Toleration, "V1TopologySelectorLabelRequirement": V1TopologySelectorLabelRequirement, "V1TopologySelectorTerm": V1TopologySelectorTerm, "V1TypedLocalObjectReference": V1TypedLocalObjectReference, "V1UserInfo": V1UserInfo, "V1Volume": V1Volume, "V1VolumeAttachment": V1VolumeAttachment, "V1VolumeAttachmentList": V1VolumeAttachmentList, "V1VolumeAttachmentSource": V1VolumeAttachmentSource, "V1VolumeAttachmentSpec": V1VolumeAttachmentSpec, "V1VolumeAttachmentStatus": V1VolumeAttachmentStatus, "V1VolumeDevice": V1VolumeDevice, "V1VolumeError": V1VolumeError, "V1VolumeMount": V1VolumeMount, "V1VolumeNodeAffinity": V1VolumeNodeAffinity, "V1VolumeProjection": V1VolumeProjection, "V1VsphereVirtualDiskVolumeSource": V1VsphereVirtualDiskVolumeSource, "V1WatchEvent": V1WatchEvent, "V1WeightedPodAffinityTerm": V1WeightedPodAffinityTerm, "V1alpha1AggregationRule": V1alpha1AggregationRule, "V1alpha1AuditSink": V1alpha1AuditSink, "V1alpha1AuditSinkList": V1alpha1AuditSinkList, "V1alpha1AuditSinkSpec": V1alpha1AuditSinkSpec, "V1alpha1ClusterRole": V1alpha1ClusterRole, "V1alpha1ClusterRoleBinding": V1alpha1ClusterRoleBinding, "V1alpha1ClusterRoleBindingList": V1alpha1ClusterRoleBindingList, "V1alpha1ClusterRoleList": V1alpha1ClusterRoleList, "V1alpha1Initializer": V1alpha1Initializer, "V1alpha1InitializerConfiguration": V1alpha1InitializerConfiguration, "V1alpha1InitializerConfigurationList": V1alpha1InitializerConfigurationList, "V1alpha1PodPreset": V1alpha1PodPreset, "V1alpha1PodPresetList": V1alpha1PodPresetList, "V1alpha1PodPresetSpec": V1alpha1PodPresetSpec, "V1alpha1Policy": V1alpha1Policy, "V1alpha1PolicyRule": V1alpha1PolicyRule, "V1alpha1PriorityClass": V1alpha1PriorityClass, "V1alpha1PriorityClassList": V1alpha1PriorityClassList, "V1alpha1Role": V1alpha1Role, "V1alpha1RoleBinding": V1alpha1RoleBinding, "V1alpha1RoleBindingList": V1alpha1RoleBindingList, "V1alpha1RoleList": V1alpha1RoleList, "V1alpha1RoleRef": V1alpha1RoleRef, "V1alpha1Rule": V1alpha1Rule, "V1alpha1ServiceReference": V1alpha1ServiceReference, "V1alpha1Subject": V1alpha1Subject, "V1alpha1VolumeAttachment": V1alpha1VolumeAttachment, "V1alpha1VolumeAttachmentList": V1alpha1VolumeAttachmentList, "V1alpha1VolumeAttachmentSource": V1alpha1VolumeAttachmentSource, "V1alpha1VolumeAttachmentSpec": V1alpha1VolumeAttachmentSpec, "V1alpha1VolumeAttachmentStatus": V1alpha1VolumeAttachmentStatus, "V1alpha1VolumeError": V1alpha1VolumeError, "V1alpha1Webhook": V1alpha1Webhook, "V1alpha1WebhookClientConfig": V1alpha1WebhookClientConfig, "V1alpha1WebhookThrottleConfig": V1alpha1WebhookThrottleConfig, "V1beta1APIService": V1beta1APIService, "V1beta1APIServiceCondition": V1beta1APIServiceCondition, "V1beta1APIServiceList": V1beta1APIServiceList, "V1beta1APIServiceSpec": V1beta1APIServiceSpec, "V1beta1APIServiceStatus": V1beta1APIServiceStatus, "V1beta1AggregationRule": V1beta1AggregationRule, "V1beta1CertificateSigningRequest": V1beta1CertificateSigningRequest, "V1beta1CertificateSigningRequestCondition": V1beta1CertificateSigningRequestCondition, "V1beta1CertificateSigningRequestList": V1beta1CertificateSigningRequestList, "V1beta1CertificateSigningRequestSpec": V1beta1CertificateSigningRequestSpec, "V1beta1CertificateSigningRequestStatus": V1beta1CertificateSigningRequestStatus, "V1beta1ClusterRole": V1beta1ClusterRole, "V1beta1ClusterRoleBinding": V1beta1ClusterRoleBinding, "V1beta1ClusterRoleBindingList": V1beta1ClusterRoleBindingList, "V1beta1ClusterRoleList": V1beta1ClusterRoleList, "V1beta1ControllerRevision": V1beta1ControllerRevision, "V1beta1ControllerRevisionList": V1beta1ControllerRevisionList, "V1beta1CronJob": V1beta1CronJob, "V1beta1CronJobList": V1beta1CronJobList, "V1beta1CronJobSpec": V1beta1CronJobSpec, "V1beta1CronJobStatus": V1beta1CronJobStatus, "V1beta1CustomResourceColumnDefinition": V1beta1CustomResourceColumnDefinition, "V1beta1CustomResourceConversion": V1beta1CustomResourceConversion, "V1beta1CustomResourceDefinition": V1beta1CustomResourceDefinition, "V1beta1CustomResourceDefinitionCondition": V1beta1CustomResourceDefinitionCondition, "V1beta1CustomResourceDefinitionList": V1beta1CustomResourceDefinitionList, "V1beta1CustomResourceDefinitionNames": V1beta1CustomResourceDefinitionNames, "V1beta1CustomResourceDefinitionSpec": V1beta1CustomResourceDefinitionSpec, "V1beta1CustomResourceDefinitionStatus": V1beta1CustomResourceDefinitionStatus, "V1beta1CustomResourceDefinitionVersion": V1beta1CustomResourceDefinitionVersion, "V1beta1CustomResourceSubresourceScale": V1beta1CustomResourceSubresourceScale, "V1beta1CustomResourceSubresources": V1beta1CustomResourceSubresources, "V1beta1CustomResourceValidation": V1beta1CustomResourceValidation, "V1beta1DaemonSet": V1beta1DaemonSet, "V1beta1DaemonSetCondition": V1beta1DaemonSetCondition, "V1beta1DaemonSetList": V1beta1DaemonSetList, "V1beta1DaemonSetSpec": V1beta1DaemonSetSpec, "V1beta1DaemonSetStatus": V1beta1DaemonSetStatus, "V1beta1DaemonSetUpdateStrategy": V1beta1DaemonSetUpdateStrategy, "V1beta1Event": V1beta1Event, "V1beta1EventList": V1beta1EventList, "V1beta1EventSeries": V1beta1EventSeries, "V1beta1Eviction": V1beta1Eviction, "V1beta1ExternalDocumentation": V1beta1ExternalDocumentation, "V1beta1HTTPIngressPath": V1beta1HTTPIngressPath, "V1beta1HTTPIngressRuleValue": V1beta1HTTPIngressRuleValue, "V1beta1IPBlock": V1beta1IPBlock, "V1beta1Ingress": V1beta1Ingress, "V1beta1IngressBackend": V1beta1IngressBackend, "V1beta1IngressList": V1beta1IngressList, "V1beta1IngressRule": V1beta1IngressRule, "V1beta1IngressSpec": V1beta1IngressSpec, "V1beta1IngressStatus": V1beta1IngressStatus, "V1beta1IngressTLS": V1beta1IngressTLS, "V1beta1JSONSchemaProps": V1beta1JSONSchemaProps, "V1beta1JobTemplateSpec": V1beta1JobTemplateSpec, "V1beta1Lease": V1beta1Lease, "V1beta1LeaseList": V1beta1LeaseList, "V1beta1LeaseSpec": V1beta1LeaseSpec, "V1beta1LocalSubjectAccessReview": V1beta1LocalSubjectAccessReview, "V1beta1MutatingWebhookConfiguration": V1beta1MutatingWebhookConfiguration, "V1beta1MutatingWebhookConfigurationList": V1beta1MutatingWebhookConfigurationList, "V1beta1NetworkPolicy": V1beta1NetworkPolicy, "V1beta1NetworkPolicyEgressRule": V1beta1NetworkPolicyEgressRule, "V1beta1NetworkPolicyIngressRule": V1beta1NetworkPolicyIngressRule, "V1beta1NetworkPolicyList": V1beta1NetworkPolicyList, "V1beta1NetworkPolicyPeer": V1beta1NetworkPolicyPeer, "V1beta1NetworkPolicyPort": V1beta1NetworkPolicyPort, "V1beta1NetworkPolicySpec": V1beta1NetworkPolicySpec, "V1beta1NonResourceAttributes": V1beta1NonResourceAttributes, "V1beta1NonResourceRule": V1beta1NonResourceRule, "V1beta1PodDisruptionBudget": V1beta1PodDisruptionBudget, "V1beta1PodDisruptionBudgetList": V1beta1PodDisruptionBudgetList, "V1beta1PodDisruptionBudgetSpec": V1beta1PodDisruptionBudgetSpec, "V1beta1PodDisruptionBudgetStatus": V1beta1PodDisruptionBudgetStatus, "V1beta1PolicyRule": V1beta1PolicyRule, "V1beta1PriorityClass": V1beta1PriorityClass, "V1beta1PriorityClassList": V1beta1PriorityClassList, "V1beta1ReplicaSet": V1beta1ReplicaSet, "V1beta1ReplicaSetCondition": V1beta1ReplicaSetCondition, "V1beta1ReplicaSetList": V1beta1ReplicaSetList, "V1beta1ReplicaSetSpec": V1beta1ReplicaSetSpec, "V1beta1ReplicaSetStatus": V1beta1ReplicaSetStatus, "V1beta1ResourceAttributes": V1beta1ResourceAttributes, "V1beta1ResourceRule": V1beta1ResourceRule, "V1beta1Role": V1beta1Role, "V1beta1RoleBinding": V1beta1RoleBinding, "V1beta1RoleBindingList": V1beta1RoleBindingList, "V1beta1RoleList": V1beta1RoleList, "V1beta1RoleRef": V1beta1RoleRef, "V1beta1RollingUpdateDaemonSet": V1beta1RollingUpdateDaemonSet, "V1beta1RollingUpdateStatefulSetStrategy": V1beta1RollingUpdateStatefulSetStrategy, "V1beta1RuleWithOperations": V1beta1RuleWithOperations, "V1beta1SelfSubjectAccessReview": V1beta1SelfSubjectAccessReview, "V1beta1SelfSubjectAccessReviewSpec": V1beta1SelfSubjectAccessReviewSpec, "V1beta1SelfSubjectRulesReview": V1beta1SelfSubjectRulesReview, "V1beta1SelfSubjectRulesReviewSpec": V1beta1SelfSubjectRulesReviewSpec, "V1beta1StatefulSet": V1beta1StatefulSet, "V1beta1StatefulSetCondition": V1beta1StatefulSetCondition, "V1beta1StatefulSetList": V1beta1StatefulSetList, "V1beta1StatefulSetSpec": V1beta1StatefulSetSpec, "V1beta1StatefulSetStatus": V1beta1StatefulSetStatus, "V1beta1StatefulSetUpdateStrategy": V1beta1StatefulSetUpdateStrategy, "V1beta1StorageClass": V1beta1StorageClass, "V1beta1StorageClassList": V1beta1StorageClassList, "V1beta1Subject": V1beta1Subject, "V1beta1SubjectAccessReview": V1beta1SubjectAccessReview, "V1beta1SubjectAccessReviewSpec": V1beta1SubjectAccessReviewSpec, "V1beta1SubjectAccessReviewStatus": V1beta1SubjectAccessReviewStatus, "V1beta1SubjectRulesReviewStatus": V1beta1SubjectRulesReviewStatus, "V1beta1TokenReview": V1beta1TokenReview, "V1beta1TokenReviewSpec": V1beta1TokenReviewSpec, "V1beta1TokenReviewStatus": V1beta1TokenReviewStatus, "V1beta1UserInfo": V1beta1UserInfo, "V1beta1ValidatingWebhookConfiguration": V1beta1ValidatingWebhookConfiguration, "V1beta1ValidatingWebhookConfigurationList": V1beta1ValidatingWebhookConfigurationList, "V1beta1VolumeAttachment": V1beta1VolumeAttachment, "V1beta1VolumeAttachmentList": V1beta1VolumeAttachmentList, "V1beta1VolumeAttachmentSource": V1beta1VolumeAttachmentSource, "V1beta1VolumeAttachmentSpec": V1beta1VolumeAttachmentSpec, "V1beta1VolumeAttachmentStatus": V1beta1VolumeAttachmentStatus, "V1beta1VolumeError": V1beta1VolumeError, "V1beta1Webhook": V1beta1Webhook, "V1beta2ControllerRevision": V1beta2ControllerRevision, "V1beta2ControllerRevisionList": V1beta2ControllerRevisionList, "V1beta2DaemonSet": V1beta2DaemonSet, "V1beta2DaemonSetCondition": V1beta2DaemonSetCondition, "V1beta2DaemonSetList": V1beta2DaemonSetList, "V1beta2DaemonSetSpec": V1beta2DaemonSetSpec, "V1beta2DaemonSetStatus": V1beta2DaemonSetStatus, "V1beta2DaemonSetUpdateStrategy": V1beta2DaemonSetUpdateStrategy, "V1beta2Deployment": V1beta2Deployment, "V1beta2DeploymentCondition": V1beta2DeploymentCondition, "V1beta2DeploymentList": V1beta2DeploymentList, "V1beta2DeploymentSpec": V1beta2DeploymentSpec, "V1beta2DeploymentStatus": V1beta2DeploymentStatus, "V1beta2DeploymentStrategy": V1beta2DeploymentStrategy, "V1beta2ReplicaSet": V1beta2ReplicaSet, "V1beta2ReplicaSetCondition": V1beta2ReplicaSetCondition, "V1beta2ReplicaSetList": V1beta2ReplicaSetList, "V1beta2ReplicaSetSpec": V1beta2ReplicaSetSpec, "V1beta2ReplicaSetStatus": V1beta2ReplicaSetStatus, "V1beta2RollingUpdateDaemonSet": V1beta2RollingUpdateDaemonSet, "V1beta2RollingUpdateDeployment": V1beta2RollingUpdateDeployment, "V1beta2RollingUpdateStatefulSetStrategy": V1beta2RollingUpdateStatefulSetStrategy, "V1beta2Scale": V1beta2Scale, "V1beta2ScaleSpec": V1beta2ScaleSpec, "V1beta2ScaleStatus": V1beta2ScaleStatus, "V1beta2StatefulSet": V1beta2StatefulSet, "V1beta2StatefulSetCondition": V1beta2StatefulSetCondition, "V1beta2StatefulSetList": V1beta2StatefulSetList, "V1beta2StatefulSetSpec": V1beta2StatefulSetSpec, "V1beta2StatefulSetStatus": V1beta2StatefulSetStatus, "V1beta2StatefulSetUpdateStrategy": V1beta2StatefulSetUpdateStrategy, "V2alpha1CronJob": V2alpha1CronJob, "V2alpha1CronJobList": V2alpha1CronJobList, "V2alpha1CronJobSpec": V2alpha1CronJobSpec, "V2alpha1CronJobStatus": V2alpha1CronJobStatus, "V2alpha1JobTemplateSpec": V2alpha1JobTemplateSpec, "V2beta1CrossVersionObjectReference": V2beta1CrossVersionObjectReference, "V2beta1ExternalMetricSource": V2beta1ExternalMetricSource, "V2beta1ExternalMetricStatus": V2beta1ExternalMetricStatus, "V2beta1HorizontalPodAutoscaler": V2beta1HorizontalPodAutoscaler, "V2beta1HorizontalPodAutoscalerCondition": V2beta1HorizontalPodAutoscalerCondition, "V2beta1HorizontalPodAutoscalerList": V2beta1HorizontalPodAutoscalerList, "V2beta1HorizontalPodAutoscalerSpec": V2beta1HorizontalPodAutoscalerSpec, "V2beta1HorizontalPodAutoscalerStatus": V2beta1HorizontalPodAutoscalerStatus, "V2beta1MetricSpec": V2beta1MetricSpec, "V2beta1MetricStatus": V2beta1MetricStatus, "V2beta1ObjectMetricSource": V2beta1ObjectMetricSource, "V2beta1ObjectMetricStatus": V2beta1ObjectMetricStatus, "V2beta1PodsMetricSource": V2beta1PodsMetricSource, "V2beta1PodsMetricStatus": V2beta1PodsMetricStatus, "V2beta1ResourceMetricSource": V2beta1ResourceMetricSource, "V2beta1ResourceMetricStatus": V2beta1ResourceMetricStatus, "V2beta2CrossVersionObjectReference": V2beta2CrossVersionObjectReference, "V2beta2ExternalMetricSource": V2beta2ExternalMetricSource, "V2beta2ExternalMetricStatus": V2beta2ExternalMetricStatus, "V2beta2HorizontalPodAutoscaler": V2beta2HorizontalPodAutoscaler, "V2beta2HorizontalPodAutoscalerCondition": V2beta2HorizontalPodAutoscalerCondition, "V2beta2HorizontalPodAutoscalerList": V2beta2HorizontalPodAutoscalerList, "V2beta2HorizontalPodAutoscalerSpec": V2beta2HorizontalPodAutoscalerSpec, "V2beta2HorizontalPodAutoscalerStatus": V2beta2HorizontalPodAutoscalerStatus, "V2beta2MetricIdentifier": V2beta2MetricIdentifier, "V2beta2MetricSpec": V2beta2MetricSpec, "V2beta2MetricStatus": V2beta2MetricStatus, "V2beta2MetricTarget": V2beta2MetricTarget, "V2beta2MetricValueStatus": V2beta2MetricValueStatus, "V2beta2ObjectMetricSource": V2beta2ObjectMetricSource, "V2beta2ObjectMetricStatus": V2beta2ObjectMetricStatus, "V2beta2PodsMetricSource": V2beta2PodsMetricSource, "V2beta2PodsMetricStatus": V2beta2PodsMetricStatus, "V2beta2ResourceMetricSource": V2beta2ResourceMetricSource, "V2beta2ResourceMetricStatus": V2beta2ResourceMetricStatus, "VersionInfo": VersionInfo, }; class HttpBasicAuth { constructor() { this.username = ''; this.password = ''; } applyToRequest(requestOptions) { requestOptions.auth = { username: this.username, password: this.password }; } } exports.HttpBasicAuth = HttpBasicAuth; 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; } } } 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; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AdmissionregistrationApi = AdmissionregistrationApi; var AdmissionregistrationV1alpha1ApiApiKeys; (function (AdmissionregistrationV1alpha1ApiApiKeys) { AdmissionregistrationV1alpha1ApiApiKeys[AdmissionregistrationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(AdmissionregistrationV1alpha1ApiApiKeys = exports.AdmissionregistrationV1alpha1ApiApiKeys || (exports.AdmissionregistrationV1alpha1ApiApiKeys = {})); class AdmissionregistrationV1alpha1Api { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AdmissionregistrationV1alpha1ApiApiKeys[key]].apiKey = value; } /** * create an InitializerConfiguration * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createInitializerConfiguration(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 createInitializerConfiguration.'); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1InitializerConfiguration") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1InitializerConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of InitializerConfiguration * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionInitializerConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete an InitializerConfiguration * @param name name of the InitializerConfiguration * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteInitializerConfiguration(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling deleteInitializerConfiguration.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind InitializerConfiguration * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listInitializerConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1InitializerConfigurationList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * partially update the specified InitializerConfiguration * @param name name of the InitializerConfiguration * @param body * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ patchInitializerConfiguration(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling patchInitializerConfiguration.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling patchInitializerConfiguration.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1InitializerConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified InitializerConfiguration * @param name name of the InitializerConfiguration * @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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readInitializerConfiguration(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling readInitializerConfiguration.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1InitializerConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * replace the specified InitializerConfiguration * @param name name of the InitializerConfiguration * @param body * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ replaceInitializerConfiguration(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling replaceInitializerConfiguration.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling replaceInitializerConfiguration.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1InitializerConfiguration") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1InitializerConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AdmissionregistrationV1alpha1Api = AdmissionregistrationV1alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AdmissionregistrationV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a MutatingWebhookConfiguration * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createMutatingWebhookConfiguration(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1MutatingWebhookConfiguration") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ValidatingWebhookConfiguration * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createValidatingWebhookConfiguration(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1ValidatingWebhookConfiguration") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of MutatingWebhookConfiguration * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionMutatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ValidatingWebhookConfiguration * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionValidatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a MutatingWebhookConfiguration * @param name name of the MutatingWebhookConfiguration * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteMutatingWebhookConfiguration(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ValidatingWebhookConfiguration * @param name name of the ValidatingWebhookConfiguration * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteValidatingWebhookConfiguration(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind MutatingWebhookConfiguration * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listMutatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfigurationList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ValidatingWebhookConfiguration * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listValidatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfigurationList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchMutatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchValidatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readMutatingWebhookConfiguration(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readValidatingWebhookConfiguration(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1MutatingWebhookConfiguration") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1MutatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1ValidatingWebhookConfiguration") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ValidatingWebhookConfiguration"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AdmissionregistrationV1beta1Api = AdmissionregistrationV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ApiextensionsApi = ApiextensionsApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ApiextensionsV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a CustomResourceDefinition * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createCustomResourceDefinition(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1CustomResourceDefinition") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of CustomResourceDefinition * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionCustomResourceDefinition(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a CustomResourceDefinition * @param name name of the CustomResourceDefinition * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteCustomResourceDefinition(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind CustomResourceDefinition * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listCustomResourceDefinition(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinitionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchCustomResourceDefinition(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readCustomResourceDefinition(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readCustomResourceDefinitionStatus(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceCustomResourceDefinition(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1CustomResourceDefinition") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1CustomResourceDefinition") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CustomResourceDefinition"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ApiextensionsV1beta1Api = ApiextensionsV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ApiregistrationApi = ApiregistrationApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value; } /** * create an APIService * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createAPIService(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1APIService") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete an APIService * @param name name of the APIService * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteAPIService(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of APIService * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind APIService * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIServiceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchAPIService(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchAPIServiceStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readAPIService(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified APIService * @param name name of the APIService * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readAPIServiceStatus(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceAPIService(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1APIService") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceAPIServiceStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1APIService") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ApiregistrationV1Api = ApiregistrationV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ApiregistrationV1beta1ApiApiKeys[key]].apiKey = value; } /** * create an APIService * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createAPIService(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1APIService") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete an APIService * @param name name of the APIService * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteAPIService(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of APIService * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind APIService * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIServiceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchAPIService(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchAPIServiceStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readAPIService(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified APIService * @param name name of the APIService * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readAPIServiceStatus(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceAPIService(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1APIService") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceAPIServiceStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1APIService") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1APIService"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ApiregistrationV1beta1Api = ApiregistrationV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ApisApiApiKeys[key]].apiKey = value; } /** * get available API versions * @param {*} [options] Override http request options. */ getAPIVersions(options = {}) { const localVarPath = this.basePath + '/apis/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroupList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ApisApi = ApisApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AppsApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/apps/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AppsApi = AppsApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AppsV1ApiApiKeys[key]].apiKey = value; } /** * create a ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedControllerRevision(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ControllerRevision") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDaemonSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Deployment * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedReplicaSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedStatefulSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedControllerRevision(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDaemonSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedReplicaSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedStatefulSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ControllerRevision * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listControllerRevisionForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ControllerRevisionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind DaemonSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDaemonSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/daemonsets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/deployments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ControllerRevisionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicaSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listReplicaSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/replicasets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StatefulSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listStatefulSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1/statefulsets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDaemonSetStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentScale(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicaSetScale(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicaSetStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedStatefulSetScale(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedStatefulSetStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ControllerRevision") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AppsV1Api = AppsV1Api; var AppsV1beta1ApiApiKeys; (function (AppsV1beta1ApiApiKeys) { AppsV1beta1ApiApiKeys[AppsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(AppsV1beta1ApiApiKeys = exports.AppsV1beta1ApiApiKeys || (exports.AppsV1beta1ApiApiKeys = {})); class AppsV1beta1Api { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AppsV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedControllerRevision(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1ControllerRevision") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Deployment * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "AppsV1beta1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create rollback of a Deployment * @param name name of the DeploymentRollback * @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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedDeploymentRollback(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/rollback' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling createNamespacedDeploymentRollback.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeploymentRollback.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createNamespacedDeploymentRollback.'); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "AppsV1beta1DeploymentRollback") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedStatefulSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedControllerRevision(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedStatefulSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ControllerRevision * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listControllerRevisionForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/controllerrevisions'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ControllerRevisionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/deployments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ControllerRevisionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StatefulSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listStatefulSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/statefulsets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedStatefulSetScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedStatefulSetStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1ControllerRevision") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "AppsV1beta1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "AppsV1beta1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "AppsV1beta1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "AppsV1beta1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "AppsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AppsV1beta1Api = AppsV1beta1Api; var AppsV1beta2ApiApiKeys; (function (AppsV1beta2ApiApiKeys) { AppsV1beta2ApiApiKeys[AppsV1beta2ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(AppsV1beta2ApiApiKeys = exports.AppsV1beta2ApiApiKeys || (exports.AppsV1beta2ApiApiKeys = {})); class AppsV1beta2Api { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AppsV1beta2ApiApiKeys[key]].apiKey = value; } /** * create a ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedControllerRevision(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta2ControllerRevision") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDaemonSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta2DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Deployment * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta2Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedReplicaSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta2ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedStatefulSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta2StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedControllerRevision(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDaemonSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedReplicaSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedStatefulSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ControllerRevision * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listControllerRevisionForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/controllerrevisions'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ControllerRevisionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind DaemonSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDaemonSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/daemonsets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/deployments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ControllerRevision * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ControllerRevisionList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StatefulSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicaSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listReplicaSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/replicasets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StatefulSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listStatefulSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/statefulsets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDaemonSetStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicaSetScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicaSetStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedStatefulSetScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedStatefulSetStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2ControllerRevision") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ControllerRevision"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta2StatefulSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta2StatefulSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AppsV1beta2Api = AppsV1beta2Api; var AuditregistrationApiApiKeys; (function (AuditregistrationApiApiKeys) { AuditregistrationApiApiKeys[AuditregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(AuditregistrationApiApiKeys = exports.AuditregistrationApiApiKeys || (exports.AuditregistrationApiApiKeys = {})); class AuditregistrationApi { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuditregistrationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuditregistrationApi = AuditregistrationApi; var AuditregistrationV1alpha1ApiApiKeys; (function (AuditregistrationV1alpha1ApiApiKeys) { AuditregistrationV1alpha1ApiApiKeys[AuditregistrationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(AuditregistrationV1alpha1ApiApiKeys = exports.AuditregistrationV1alpha1ApiApiKeys || (exports.AuditregistrationV1alpha1ApiApiKeys = {})); class AuditregistrationV1alpha1Api { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuditregistrationV1alpha1ApiApiKeys[key]].apiKey = value; } /** * create an AuditSink * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createAuditSink(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 createAuditSink.'); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1AuditSink") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1AuditSink"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete an AuditSink * @param name name of the AuditSink * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteAuditSink(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling deleteAuditSink.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of AuditSink * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionAuditSink(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind AuditSink * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listAuditSink(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1AuditSinkList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * partially update the specified AuditSink * @param name name of the AuditSink * @param body * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ patchAuditSink(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling patchAuditSink.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling patchAuditSink.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1AuditSink"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified AuditSink * @param name name of the AuditSink * @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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readAuditSink(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling readAuditSink.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1AuditSink"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * replace the specified AuditSink * @param name name of the AuditSink * @param body * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ replaceAuditSink(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling replaceAuditSink.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling replaceAuditSink.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1AuditSink") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1AuditSink"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuditregistrationV1alpha1Api = AuditregistrationV1alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuthenticationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/authentication.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuthenticationApi = AuthenticationApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value; } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createTokenReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1TokenReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1TokenReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuthenticationV1Api = AuthenticationV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuthenticationV1beta1ApiApiKeys[key]].apiKey = value; } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createTokenReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/tokenreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1TokenReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1TokenReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuthenticationV1beta1Api = AuthenticationV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuthorizationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuthorizationApi = AuthorizationApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value; } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty, options = {}) { 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); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1LocalSubjectAccessReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LocalSubjectAccessReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createSelfSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1SelfSubjectAccessReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1SelfSubjectAccessReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createSelfSubjectRulesReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1SelfSubjectRulesReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1SelfSubjectRulesReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1SubjectAccessReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1SubjectAccessReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuthorizationV1Api = AuthorizationV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AuthorizationV1beta1ApiApiKeys[key]].apiKey = value; } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty, options = {}) { 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); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1LocalSubjectAccessReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1LocalSubjectAccessReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createSelfSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1SelfSubjectAccessReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1SelfSubjectAccessReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createSelfSubjectRulesReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1SelfSubjectRulesReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1SelfSubjectRulesReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/subjectaccessreviews'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1SubjectAccessReview") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1SubjectAccessReview"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AuthorizationV1beta1Api = AuthorizationV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AutoscalingApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AutoscalingApi = AutoscalingApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value; } /** * create a HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedHorizontalPodAutoscaler(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind HorizontalPodAutoscaler * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listHorizontalPodAutoscalerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AutoscalingV1Api = AutoscalingV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value; } /** * create a HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedHorizontalPodAutoscaler(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind HorizontalPodAutoscaler * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listHorizontalPodAutoscalerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AutoscalingV2beta1Api = AutoscalingV2beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value; } /** * create a HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedHorizontalPodAutoscaler(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind HorizontalPodAutoscaler * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listHorizontalPodAutoscalerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.AutoscalingV2beta2Api = AutoscalingV2beta2Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[BatchApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/batch/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.BatchApi = BatchApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[BatchV1ApiApiKeys[key]].apiKey = value; } /** * create a Job * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedJob(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Job") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Job * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedJob(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/batch/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Job * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listJobForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1/jobs'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1JobList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Job * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1JobList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedJob(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedJob(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedJobStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedJob(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Job") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Job") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Job"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.BatchV1Api = BatchV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a CronJob * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedCronJob(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1CronJob") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of CronJob * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedCronJob(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/batch/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind CronJob * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listCronJobForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJobList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind CronJob * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJobList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedCronJob(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedCronJobStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1CronJob") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1CronJob") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.BatchV1beta1Api = BatchV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[BatchV2alpha1ApiApiKeys[key]].apiKey = value; } /** * create a CronJob * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedCronJob(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V2alpha1CronJob") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of CronJob * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedCronJob(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/batch/v2alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind CronJob * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listCronJobForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v2alpha1/cronjobs'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJobList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind CronJob * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJobList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedCronJob(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedCronJobStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V2alpha1CronJob") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V2alpha1CronJob") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V2alpha1CronJob"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.BatchV2alpha1Api = BatchV2alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CertificatesApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CertificatesApi = CertificatesApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CertificatesV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a CertificateSigningRequest * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createCertificateSigningRequest(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a CertificateSigningRequest * @param name name of the CertificateSigningRequest * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteCertificateSigningRequest(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of CertificateSigningRequest * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionCertificateSigningRequest(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind CertificateSigningRequest * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listCertificateSigningRequest(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequestList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchCertificateSigningRequest(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchCertificateSigningRequestStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readCertificateSigningRequest(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readCertificateSigningRequestStatus(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceCertificateSigningRequest(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * replace approval of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest * @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 pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ replaceCertificateSigningRequestApproval(name, body, dryRun, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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 (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1CertificateSigningRequest") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1CertificateSigningRequest"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CertificatesV1beta1Api = CertificatesV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CoordinationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/coordination.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CoordinationApi = CoordinationApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CoordinationV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a Lease * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedLease(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1Lease") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Lease"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Lease * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedLease(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedLease(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Lease * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listLeaseForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/leases'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1LeaseList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Lease * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedLease(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1LeaseList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedLease(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Lease"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedLease(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Lease"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedLease(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1Lease") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Lease"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CoordinationV1beta1Api = CoordinationV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CoreApiApiKeys[key]].apiKey = value; } /** * get available API versions * @param {*} [options] Override http request options. */ getAPIVersions(options = {}) { const localVarPath = this.basePath + '/api/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIVersions"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CoreApi = CoreApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CoreV1ApiApiKeys[key]].apiKey = value; } /** * 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. * @param {*} [options] Override http request options. */ connectDeleteNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectDeleteNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectDeleteNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectDeleteNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(container, "string"); } if (stderr !== undefined) { localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, "boolean"); } if (stdin !== undefined) { localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, "boolean"); } if (stdout !== undefined) { localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, "boolean"); } if (tty !== undefined) { localVarQueryParameters['tty'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(command, "string"); } if (container !== undefined) { localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); } if (stderr !== undefined) { localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, "boolean"); } if (stdin !== undefined) { localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, "boolean"); } if (stdout !== undefined) { localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, "boolean"); } if (tty !== undefined) { localVarQueryParameters['tty'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ connectGetNamespacedPodPortforward(name, namespace, ports, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectGetNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectHeadNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectHeadNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectHeadNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectHeadNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectOptionsNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectOptionsNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectOptionsNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectOptionsNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPatchNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPatchNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPatchNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPatchNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(container, "string"); } if (stderr !== undefined) { localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, "boolean"); } if (stdin !== undefined) { localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, "boolean"); } if (stdout !== undefined) { localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, "boolean"); } if (tty !== undefined) { localVarQueryParameters['tty'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(command, "string"); } if (container !== undefined) { localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); } if (stderr !== undefined) { localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, "boolean"); } if (stdin !== undefined) { localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, "boolean"); } if (stdout !== undefined) { localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, "boolean"); } if (tty !== undefined) { localVarQueryParameters['tty'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ connectPostNamespacedPodPortforward(name, namespace, ports, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPostNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPutNamespacedPodProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPutNamespacedServiceProxy(name, namespace, path, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPutNodeProxy(name, path, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ connectPutNodeProxyWithPath(name, path, path2, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Namespace * @param body * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespace(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Namespace") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedBinding(namespace, body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1Binding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Binding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ConfigMap * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedConfigMap(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ConfigMap") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ConfigMap"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create Endpoints * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedEndpoints(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Endpoints") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Endpoints"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create an Event * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedEvent(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Event") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a LimitRange * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedLimitRange(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1LimitRange") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LimitRange"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a PersistentVolumeClaim * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedPersistentVolumeClaim(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Pod * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedPod(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Pod") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedPodBinding(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1Binding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Binding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedPodEviction(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1beta1Eviction") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Eviction"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a PodTemplate * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedPodTemplate(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1PodTemplate") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodTemplate"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ReplicationController * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedReplicationController(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ReplicationController") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ResourceQuota * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedResourceQuota(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ResourceQuota") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Secret * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedSecret(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Secret") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Secret"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Service * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedService(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Service") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ServiceAccount * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedServiceAccount(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ServiceAccount") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceAccount"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Node * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNode(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Node") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a PersistentVolume * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createPersistentVolume(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1PersistentVolume") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ConfigMap * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedConfigMap(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Endpoints * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedEndpoints(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Event * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of LimitRange * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedLimitRange(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PersistentVolumeClaim * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedPersistentVolumeClaim(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Pod * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedPod(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PodTemplate * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedPodTemplate(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ReplicationController * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedReplicationController(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ResourceQuota * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedResourceQuota(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Secret * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedSecret(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ServiceAccount * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedServiceAccount(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Node * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNode(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PersistentVolume * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionPersistentVolume(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a Namespace * @param name name of the Namespace * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespace(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedConfigMap(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedEndpoints(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedEvent(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedLimitRange(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedPod(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedPodTemplate(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedReplicationController(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedResourceQuota(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedSecret(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedService(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedServiceAccount(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a Node * @param name name of the Node * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNode(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a PersistentVolume * @param name name of the PersistentVolume * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deletePersistentVolume(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/api/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list objects of kind ComponentStatus * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listComponentStatus(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/componentstatuses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ComponentStatusList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ConfigMap * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listConfigMapForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/configmaps'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ConfigMapList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Endpoints * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listEndpointsForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/endpoints'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1EndpointsList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Event * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listEventForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/events'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1EventList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind LimitRange * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listLimitRangeForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/limitranges'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LimitRangeList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Namespace * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespace(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NamespaceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ConfigMap * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedConfigMap(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ConfigMapList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Endpoints * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedEndpoints(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1EndpointsList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Event * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1EventList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind LimitRange * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedLimitRange(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LimitRangeList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PersistentVolumeClaim * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedPersistentVolumeClaim(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Pod * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedPod(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodTemplate * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedPodTemplate(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodTemplateList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicationController * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedReplicationController(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationControllerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ResourceQuota * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedResourceQuota(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuotaList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Secret * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedSecret(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1SecretList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Service * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedService(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ServiceAccount * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedServiceAccount(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceAccountList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Node * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNode(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NodeList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PersistentVolume * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPersistentVolume(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PersistentVolumeClaim * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPersistentVolumeClaimForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Pod * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPodForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/pods'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodTemplate * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPodTemplateForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/podtemplates'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodTemplateList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicationController * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listReplicationControllerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/replicationcontrollers'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationControllerList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ResourceQuota * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listResourceQuotaForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/resourcequotas'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuotaList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Secret * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listSecretForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/secrets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1SecretList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ServiceAccount * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listServiceAccountForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/serviceaccounts'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceAccountList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Service * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listServiceForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/api/v1/services'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespace(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespaceStatus(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ConfigMap"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Endpoints"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LimitRange"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPod(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodTemplate"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedSecret(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Secret"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedService(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceAccount"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNode(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNodeStatus(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchPersistentVolume(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchPersistentVolumeStatus(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ComponentStatus * @param name name of the ComponentStatus * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readComponentStatus(name, pretty, options = {}) { const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ComponentStatus"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespace(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified Namespace * @param name name of the Namespace * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readNamespaceStatus(name, pretty, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedConfigMap(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ConfigMap"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedEndpoints(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Endpoints"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedEvent(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedLimitRange(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LimitRange"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedPersistentVolumeClaim(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedPod(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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. * @param {*} [options] Override http request options. */ readNamespacedPodLog(name, namespace, container, follow, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(container, "string"); } if (follow !== undefined) { localVarQueryParameters['follow'] = ObjectSerializer.serialize(follow, "boolean"); } if (limitBytes !== undefined) { localVarQueryParameters['limitBytes'] = ObjectSerializer.serialize(limitBytes, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (previous !== undefined) { localVarQueryParameters['previous'] = ObjectSerializer.serialize(previous, "boolean"); } if (sinceSeconds !== undefined) { localVarQueryParameters['sinceSeconds'] = ObjectSerializer.serialize(sinceSeconds, "number"); } if (tailLines !== undefined) { localVarQueryParameters['tailLines'] = ObjectSerializer.serialize(tailLines, "number"); } if (timestamps !== undefined) { localVarQueryParameters['timestamps'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedPodStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedPodTemplate(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodTemplate"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedReplicationController(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicationControllerScale(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicationControllerStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedResourceQuota(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedResourceQuotaStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedSecret(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Secret"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedService(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedServiceAccount(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceAccount"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedServiceStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNode(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified Node * @param name name of the Node * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readNodeStatus(name, pretty, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readPersistentVolume(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified PersistentVolume * @param name name of the PersistentVolume * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readPersistentVolumeStatus(name, pretty, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespace(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Namespace") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ replaceNamespaceFinalize(name, body, dryRun, pretty, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(dryRun, "string"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "V1Namespace") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespaceStatus(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Namespace") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Namespace"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ConfigMap") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ConfigMap"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Endpoints") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Endpoints"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Event") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1LimitRange") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1LimitRange"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPod(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Pod") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Pod") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Pod"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1PodTemplate") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PodTemplate"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ReplicationController") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ReplicationController") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ReplicationController"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ResourceQuota") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ResourceQuota") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ResourceQuota"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedSecret(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Secret") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Secret"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedService(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Service") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ServiceAccount") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ServiceAccount"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Service") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Service"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNode(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Node") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNodeStatus(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Node") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Node"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replacePersistentVolume(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1PersistentVolume") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replacePersistentVolumeStatus(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1PersistentVolume") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1PersistentVolume"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CoreV1Api = CoreV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value; } /** * 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 {*} [options] Override http request options. */ createClusterCustomObject(group, version, plural, body, pretty, options = {}) { 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); 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'] = 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: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ createNamespacedCustomObject(group, version, namespace, plural, body, pretty, options = {}) { 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); 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'] = 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: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 body * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterCustomObject(group, version, plural, name, body, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); 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.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling deleteClusterCustomObject.'); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 body * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedCustomObject(group, version, namespace, plural, name, body, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); 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.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling deleteNamespacedCustomObject.'); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ getClusterCustomObject(group, version, plural, name, options = {}) { 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); 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ getClusterCustomObjectScale(group, version, plural, name, options = {}) { 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); 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ getClusterCustomObjectStatus(group, version, plural, name, options = {}) { 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); 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ getNamespacedCustomObject(group, version, namespace, plural, name, options = {}) { 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); 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = {}) { 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); 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 * @param {*} [options] Override http request options. */ getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = {}) { 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); 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 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. * @param {*} [options] Override http request options. */ listClusterCustomObject(group, version, plural, pretty, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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'] = ObjectSerializer.serialize(pretty, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 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. * @param {*} [options] Override http request options. */ listNamespacedCustomObject(group, version, namespace, plural, pretty, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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'] = ObjectSerializer.serialize(pretty, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterCustomObject(group, version, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterCustomObjectScale(group, version, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterCustomObjectStatus(group, version, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCustomObject(group, version, namespace, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterCustomObject(group, version, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterCustomObjectScale(group, version, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterCustomObjectStatus(group, version, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCustomObject(group, version, namespace, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, options = {}) { 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); 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.'); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "any"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.CustomObjectsApi = CustomObjectsApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[EventsApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/events.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.EventsApi = EventsApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value; } /** * create an Event * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedEvent(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1Event") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Event * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedEvent(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Event * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listEventForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1EventList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Event * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1EventList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedEvent(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1Event") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Event"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.EventsV1beta1Api = EventsV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ExtensionsApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/extensions/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ExtensionsApi = ExtensionsApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[ExtensionsV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDaemonSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Deployment * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "ExtensionsV1beta1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create rollback of a Deployment * @param name name of the DeploymentRollback * @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 includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization. * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ createNamespacedDeploymentRollback(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/rollback' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling createNamespacedDeploymentRollback.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeploymentRollback.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createNamespacedDeploymentRollback.'); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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: ObjectSerializer.serialize(body, "ExtensionsV1beta1DeploymentRollback") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create an Ingress * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedIngress(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1Ingress") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedNetworkPolicy(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1NetworkPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedReplicaSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a PodSecurityPolicy * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createPodSecurityPolicy(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "ExtensionsV1beta1PodSecurityPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Ingress * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedIngress(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PodSecurityPolicy * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDaemonSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedIngress(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedNetworkPolicy(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedReplicaSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a PodSecurityPolicy * @param name name of the PodSecurityPolicy * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deletePodSecurityPolicy(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind DaemonSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDaemonSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/daemonsets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/deployments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Ingress * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listIngressForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/ingresses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1IngressList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind DaemonSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Deployment * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1DeploymentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Ingress * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedIngress(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1IngressList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1NetworkPolicyList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicaSet * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind NetworkPolicy * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNetworkPolicyForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/networkpolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1NetworkPolicyList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodSecurityPolicy * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1PodSecurityPolicyList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ReplicaSet * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listReplicaSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/replicasets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedIngress(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * partially update scale of the specified ReplicationControllerDummy * @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 {*} [options] Override http request options. */ patchNamespacedReplicationControllerDummyScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerDummyScale.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerDummyScale.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerDummyScale.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchPodSecurityPolicy(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDaemonSetStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedIngress(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedIngressStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedNetworkPolicy(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicaSetScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedReplicaSetStatus(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read scale of the specified ReplicationControllerDummy * @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. * @param {*} [options] Override http request options. */ readNamespacedReplicationControllerDummyScale(name, namespace, pretty, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerDummyScale.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerDummyScale.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readPodSecurityPolicy(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1DaemonSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1DaemonSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "ExtensionsV1beta1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "ExtensionsV1beta1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "ExtensionsV1beta1Deployment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Deployment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedIngress(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1Ingress") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1Ingress") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Ingress"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1NetworkPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "ExtensionsV1beta1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1ReplicaSet") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ReplicaSet"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * replace scale of the specified ReplicationControllerDummy * @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 {*} [options] Override http request options. */ replaceNamespacedReplicationControllerDummyScale(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerDummyScale.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerDummyScale.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerDummyScale.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "ExtensionsV1beta1Scale") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1Scale"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replacePodSecurityPolicy(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "ExtensionsV1beta1PodSecurityPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "ExtensionsV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.ExtensionsV1beta1Api = ExtensionsV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[LogsApiApiKeys[key]].apiKey = value; } /** * * @param logpath path to the log * @param {*} [options] Override http request options. */ logFileHandler(logpath, options = {}) { 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { 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({ response: response, body: body }); } } }); }); } /** * * @param {*} [options] Override http request options. */ logFileListHandler(options = {}) { 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { 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({ response: response, body: body }); } } }); }); } } exports.LogsApi = LogsApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[NetworkingApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/networking.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.NetworkingApi = NetworkingApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value; } /** * create a NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedNetworkPolicy(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1NetworkPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedNetworkPolicy(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NetworkPolicyList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind NetworkPolicy * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNetworkPolicyForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NetworkPolicyList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedNetworkPolicy(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1NetworkPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1NetworkPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.NetworkingV1Api = NetworkingV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[PolicyApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/policy/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.PolicyApi = PolicyApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a PodDisruptionBudget * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedPodDisruptionBudget(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a PodSecurityPolicy * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createPodSecurityPolicy(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "PolicyV1beta1PodSecurityPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "PolicyV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PodDisruptionBudget * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedPodDisruptionBudget(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PodSecurityPolicy * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedPodDisruptionBudget(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a PodSecurityPolicy * @param name name of the PodSecurityPolicy * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deletePodSecurityPolicy(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodDisruptionBudget * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedPodDisruptionBudget(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodDisruptionBudget * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPodDisruptionBudgetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodSecurityPolicy * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "PolicyV1beta1PodSecurityPolicyList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchPodSecurityPolicy(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "PolicyV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedPodDisruptionBudget(name, namespace, pretty, exact, _export, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readPodSecurityPolicy(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "PolicyV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replacePodSecurityPolicy(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "PolicyV1beta1PodSecurityPolicy") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "PolicyV1beta1PodSecurityPolicy"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.PolicyV1beta1Api = PolicyV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.RbacAuthorizationApi = RbacAuthorizationApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value; } /** * create a ClusterRole * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createClusterRole(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ClusterRole") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ClusterRoleBinding * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createClusterRoleBinding(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1ClusterRoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Role * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedRole(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1Role") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedRoleBinding(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1RoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ClusterRole * @param name name of the ClusterRole * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterRole(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ClusterRoleBinding * @param name name of the ClusterRoleBinding * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterRoleBinding(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ClusterRole * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ClusterRoleBinding * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Role * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedRole(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedRoleBinding(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ClusterRole * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ClusterRoleBinding * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Role * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind RoleBinding * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listRoleBindingForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Role * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listRoleForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterRole(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterRoleBinding(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ClusterRole * @param name name of the ClusterRole * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readClusterRole(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ClusterRoleBinding * @param name name of the ClusterRoleBinding * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readClusterRoleBinding(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedRole(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedRoleBinding(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterRole(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ClusterRole") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterRoleBinding(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1ClusterRoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1Role") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1RoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.RbacAuthorizationV1Api = RbacAuthorizationV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value; } /** * create a ClusterRole * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createClusterRole(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1ClusterRole") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ClusterRoleBinding * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createClusterRoleBinding(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Role * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedRole(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1Role") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedRoleBinding(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1RoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ClusterRole * @param name name of the ClusterRole * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterRole(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ClusterRoleBinding * @param name name of the ClusterRoleBinding * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterRoleBinding(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ClusterRole * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ClusterRoleBinding * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Role * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedRole(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedRoleBinding(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ClusterRole * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ClusterRoleBinding * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Role * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind RoleBinding * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listRoleBindingForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Role * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listRoleForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterRole(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterRoleBinding(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ClusterRole * @param name name of the ClusterRole * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readClusterRole(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ClusterRoleBinding * @param name name of the ClusterRoleBinding * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readClusterRoleBinding(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedRole(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedRoleBinding(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterRole(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1ClusterRole") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterRoleBinding(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1Role") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1RoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[RbacAuthorizationV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a ClusterRole * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createClusterRole(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1ClusterRole") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a ClusterRoleBinding * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createClusterRoleBinding(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1ClusterRoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a Role * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedRole(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1Role") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedRoleBinding(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1RoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ClusterRole * @param name name of the ClusterRole * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterRole(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a ClusterRoleBinding * @param name name of the ClusterRoleBinding * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteClusterRoleBinding(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ClusterRole * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of ClusterRoleBinding * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of Role * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedRole(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedRoleBinding(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ClusterRole * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind ClusterRoleBinding * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Role * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind RoleBinding * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { 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); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind RoleBinding * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listRoleBindingForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/rolebindings'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleBindingList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind Role * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listRoleForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/roles'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterRole(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchClusterRoleBinding(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ClusterRole * @param name name of the ClusterRole * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readClusterRole(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified ClusterRoleBinding * @param name name of the ClusterRoleBinding * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readClusterRoleBinding(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedRole(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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. * @param {*} [options] Override http request options. */ readNamespacedRoleBinding(name, namespace, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterRole(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1ClusterRole") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRole"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceClusterRoleBinding(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1ClusterRoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1ClusterRoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1Role") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1Role"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1RoleBinding") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1RoleBinding"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.RbacAuthorizationV1beta1Api = RbacAuthorizationV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[SchedulingApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.SchedulingApi = SchedulingApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value; } /** * create a PriorityClass * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createPriorityClass(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1PriorityClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PriorityClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a PriorityClass * @param name name of the PriorityClass * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deletePriorityClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PriorityClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PriorityClassList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchPriorityClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readPriorityClass(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replacePriorityClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1PriorityClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.SchedulingV1alpha1Api = SchedulingV1alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[SchedulingV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a PriorityClass * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createPriorityClass(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1PriorityClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PriorityClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a PriorityClass * @param name name of the PriorityClass * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deletePriorityClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PriorityClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PriorityClassList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchPriorityClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readPriorityClass(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replacePriorityClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1PriorityClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1PriorityClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.SchedulingV1beta1Api = SchedulingV1beta1Api; var SettingsApiApiKeys; (function (SettingsApiApiKeys) { SettingsApiApiKeys[SettingsApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(SettingsApiApiKeys = exports.SettingsApiApiKeys || (exports.SettingsApiApiKeys = {})); class SettingsApi { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[SettingsApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.SettingsApi = SettingsApi; var SettingsV1alpha1ApiApiKeys; (function (SettingsV1alpha1ApiApiKeys) { SettingsV1alpha1ApiApiKeys[SettingsV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; })(SettingsV1alpha1ApiApiKeys = exports.SettingsV1alpha1ApiApiKeys || (exports.SettingsV1alpha1ApiApiKeys = {})); class SettingsV1alpha1Api { constructor(basePathOrUsername, password, basePath) { this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { 'default': new VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[SettingsV1alpha1ApiApiKeys[key]].apiKey = value; } /** * create a PodPreset * @param namespace object name and auth scope, such as for teams and projects * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createNamespacedPodPreset(namespace, body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 createNamespacedPodPreset.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createNamespacedPodPreset.'); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1PodPreset") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PodPreset"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of PodPreset * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionNamespacedPodPreset(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 deleteCollectionNamespacedPodPreset.'); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a PodPreset * @param name name of the PodPreset * @param namespace object name and auth scope, such as for teams and projects * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteNamespacedPodPreset(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodPreset.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodPreset.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodPreset * @param namespace object name and auth scope, such as for teams and projects * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listNamespacedPodPreset(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets' .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 listNamespacedPodPreset.'); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PodPresetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind PodPreset * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 includeUninitialized If true, partially initialized resources are included in the response. * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listPodPresetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/podpresets'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PodPresetList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * partially update the specified PodPreset * @param name name of the PodPreset * @param namespace object name and auth scope, such as for teams and projects * @param body * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ patchNamespacedPodPreset(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodPreset.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodPreset.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodPreset.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PodPreset"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read the specified PodPreset * @param name name of the PodPreset * @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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readNamespacedPodPreset(name, namespace, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling readNamespacedPodPreset.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodPreset.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PodPreset"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * replace the specified PodPreset * @param name name of the PodPreset * @param namespace object name and auth scope, such as for teams and projects * @param body * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ replaceNamespacedPodPreset(name, namespace, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodPreset.'); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodPreset.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodPreset.'); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1PodPreset") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1PodPreset"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.SettingsV1alpha1Api = SettingsV1alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[StorageApiApiKeys[key]].apiKey = value; } /** * get information of a group * @param {*} [options] Override http request options. */ getAPIGroup(options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIGroup"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.StorageApi = StorageApi; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[StorageV1ApiApiKeys[key]].apiKey = value; } /** * create a StorageClass * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createStorageClass(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1StorageClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a VolumeAttachment * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createVolumeAttachment(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of StorageClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of VolumeAttachment * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a StorageClass * @param name name of the StorageClass * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteStorageClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a VolumeAttachment * @param name name of the VolumeAttachment * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteVolumeAttachment(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StorageClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StorageClassList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind VolumeAttachment * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachmentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchStorageClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchVolumeAttachment(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchVolumeAttachmentStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readStorageClass(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readVolumeAttachment(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * read status of the specified VolumeAttachment * @param name name of the VolumeAttachment * @param pretty If 'true', then the output is pretty printed. * @param {*} [options] Override http request options. */ readVolumeAttachmentStatus(name, pretty, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceStorageClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1StorageClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceVolumeAttachment(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceVolumeAttachmentStatus(name, body, pretty, dryRun, options = {}) { 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); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.StorageV1Api = StorageV1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value; } /** * create a VolumeAttachment * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createVolumeAttachment(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of VolumeAttachment * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a VolumeAttachment * @param name name of the VolumeAttachment * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteVolumeAttachment(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind VolumeAttachment * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachmentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchVolumeAttachment(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readVolumeAttachment(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceVolumeAttachment(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.StorageV1alpha1Api = StorageV1alpha1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value; } /** * create a StorageClass * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createStorageClass(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1StorageClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * create a VolumeAttachment * @param body * @param includeUninitialized If true, partially initialized resources are included in the response. * @param pretty If 'true', then the output is pretty printed. * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed * @param {*} [options] Override http request options. */ createVolumeAttachment(body, includeUninitialized, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); 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 (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "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: ObjectSerializer.serialize(body, "V1beta1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of StorageClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete collection of VolumeAttachment * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ deleteCollectionVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, "boolean"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a StorageClass * @param name name of the StorageClass * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteStorageClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * delete a VolumeAttachment * @param name name of the VolumeAttachment * @param pretty If 'true', then the output is pretty printed. * @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 gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the 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 {*} [options] Override http request options. */ deleteVolumeAttachment(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } if (gracePeriodSeconds !== undefined) { localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, "number"); } if (orphanDependents !== undefined) { localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, "boolean"); } if (propagationPolicy !== undefined) { localVarQueryParameters['propagationPolicy'] = 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: ObjectSerializer.serialize(body, "V1DeleteOptions") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1Status"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * get available resources * @param {*} [options] Override http request options. */ getAPIResources(options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1APIResourceList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind StorageClass * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StorageClassList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * list or watch objects of kind VolumeAttachment * @param includeUninitialized If true, partially initialized resources are included in the response. * @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. Specify resourceVersion. * @param {*} [options] Override http request options. */ listVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments'; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; if (includeUninitialized !== undefined) { localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, "boolean"); } if (pretty !== undefined) { localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, "string"); } if (_continue !== undefined) { localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, "string"); } if (fieldSelector !== undefined) { localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, "string"); } if (labelSelector !== undefined) { localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (resourceVersion !== undefined) { localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, "string"); } if (timeoutSeconds !== undefined) { localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, "number"); } if (watch !== undefined) { localVarQueryParameters['watch'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1VolumeAttachmentList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchStorageClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ patchVolumeAttachment(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PATCH', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "any") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readStorageClass(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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'. * @param _export Should this value be exported. Export strips fields that a user can not specify. * @param {*} [options] Override http request options. */ readVolumeAttachment(name, pretty, exact, _export, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (exact !== undefined) { localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, "boolean"); } if (_export !== undefined) { localVarQueryParameters['export'] = 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceStorageClass(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1StorageClass") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1StorageClass"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } /** * 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 {*} [options] Override http request options. */ replaceVolumeAttachment(name, body, pretty, dryRun, options = {}) { const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign({}, this.defaultHeaders); let localVarFormParams = {}; // verify required 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'] = ObjectSerializer.serialize(pretty, "string"); } if (dryRun !== undefined) { localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, "string"); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "V1beta1VolumeAttachment") }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "V1beta1VolumeAttachment"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.StorageV1beta1Api = StorageV1beta1Api; 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 VoidAuth(), 'BearerToken': new ApiKeyAuth('header', 'authorization'), }; 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; } get basePath() { return this._basePath; } setDefaultAuthentication(auth) { this.authentications.default = auth; } setApiKey(key, value) { this.authentications[VersionApiApiKeys[key]].apiKey = value; } /** * get the code version * @param {*} [options] Override http request options. */ getCode(options = {}) { const localVarPath = this.basePath + '/version/'; 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, }; this.authentications.BearerToken.applyToRequest(localVarRequestOptions); this.authentications.default.applyToRequest(localVarRequestOptions); if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { localVarRequestOptions.formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "VersionInfo"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); } } }); }); } } exports.VersionApi = VersionApi; //# sourceMappingURL=api.js.map /***/ }), /***/ 48698: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(4351); 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) { if (websocketInterface) { this.handler = websocketInterface; } else { this.handler = 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 })); const tslib_1 = __webpack_require__(4351); 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.watch = watch; this.listFn = listFn; if (autoStart) { this.doneHandler(null); } } start() { this.doneHandler(null); } on(verb, cb) { if (verb !== informer_1.ADD && verb !== informer_1.UPDATE && verb !== informer_1.DELETE) { throw new Error(`Unknown verb: ${verb}`); } if (!this.callbackCache[verb]) { this.callbackCache[verb] = []; } this.callbackCache[verb].push(cb); } 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]; } doneHandler(err) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const promise = this.listFn(); const result = yield promise; const list = result.body; deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE]); this.addOrUpdateItems(list.items); 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], this.callbackCache[informer_1.UPDATE]); 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) { switch (phase) { case 'ADDED': case 'MODIFIED': addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD], this.callbackCache[informer_1.UPDATE]); if (obj.metadata.namespace) { this.indexObj(obj); } break; case 'DELETED': deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE]); if (obj.metadata.namespace) { const namespaceList = this.indexCache[obj.metadata.namespace]; if (namespaceList) { deleteObject(namespaceList, obj); } } break; } } } 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 { 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 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 })); const jsonpath = __webpack_require__(63269); const shelljs = __webpack_require__(33516); class CloudAuth { isAuthProvider(user) { if (!user || !user.authProvider) { return false; } return user.authProvider.name === 'azure' || user.authProvider.name === 'gcp'; } getToken(user) { const config = user.authProvider.config; if (this.isExpired(config)) { this.updateAccessToken(config); } return 'Bearer ' + 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) { if (!config['cmd-path']) { throw new Error('Token is expired!'); } const args = config['cmd-args']; // TODO: Cache to file? // TODO: do this asynchronously let result; try { let cmd = config['cmd-path']; if (args) { cmd = `"${cmd}" ${args}`; } result = shelljs.exec(cmd, { silent: true }); if (result.code !== 0) { throw new Error(result.stderr); } } catch (err) { throw new Error('Failed to refresh token: ' + err.message); } const output = result.stdout.toString(); 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 })); const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const yaml = __webpack_require__(11640); 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); // fs.existsSync was removed in node 10 function fileExists(filepath) { try { fs.accessSync(filepath); return true; // tslint:disable-next-line:no-empty } catch (ignore) { } return false; } class KubeConfig { 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) { const rootDirectory = path.dirname(file); this.loadFromString(fs.readFileSync(file, 'utf8')); this.makePathsAbsolute(rootDirectory); } applytoHTTPSOptions(opts) { const user = this.getCurrentUser(); this.applyOptions(opts); if (user && user.username) { opts.auth = `${user.username}:${user.password}`; } } applyToRequest(opts) { const cluster = this.getCurrentCluster(); const user = this.getCurrentUser(); this.applyOptions(opts); if (cluster && cluster.skipTLSVerify) { opts.strictSSL = false; } if (user && user.username) { opts.auth = { password: user.password, username: user.username, }; } } loadFromString(config) { const obj = yaml.safeLoad(config); if (obj.apiVersion !== 'v1') { throw new TypeError('unknown version: ' + obj.apiVersion); } this.clusters = config_types_1.newClusters(obj.clusters); this.contexts = config_types_1.newContexts(obj.contexts); this.users = config_types_1.newUsers(obj.users); 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'; } this.clusters = [ { name: clusterName, caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`, server: `${scheme}://${host}:${port}`, skipTLSVerify: false, }, ]; this.users = [ { name: userName, token: fs.readFileSync(`${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`).toString(), }, ]; this.contexts = [ { cluster: clusterName, name: contextName, user: userName, }, ]; this.currentContext = contextName; } mergeConfig(config) { 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) { this.clusters.forEach((c, ix) => { if (c.name === cluster.name) { throw new Error(`Duplicate cluster: ${c.name}`); } }); this.clusters.push(cluster); } addUser(user) { this.users.forEach((c, ix) => { if (c.name === user.name) { throw new Error(`Duplicate user: ${c.name}`); } }); this.users.push(user); } addContext(ctx) { this.contexts.forEach((c, ix) => { if (c.name === ctx.name) { throw new Error(`Duplicate context: ${c.name}`); } }); this.contexts.push(ctx); } loadFromDefault() { if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) { const files = process.env.KUBECONFIG.split(path.delimiter); this.loadFromFile(files[0]); for (let i = 1; i < files.length; i++) { const kc = new KubeConfig(); kc.loadFromFile(files[i]); this.mergeConfig(kc); } return; } const home = findHomeDir(); if (home) { const config = path.join(home, '.kube', 'config'); if (fileExists(config)) { this.loadFromFile(config); return; } } if (process.platform === 'win32' && shelljs.which('wsl.exe')) { // TODO: Handle if someome set $KUBECONFIG in wsl here... const result = shelljs.exec('wsl.exe cat $HOME/.kube/config', { silent: true, }); if (result.code === 0) { this.loadFromString(result.stdout); return; } } 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); } }); } 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) { const user = this.getCurrentUser(); if (!user) { return; } let token = null; KubeConfig.authenticators.forEach((authenticator) => { if (authenticator.isAuthProvider(user)) { token = authenticator.getToken(user); } }); if (user.token) { token = 'Bearer ' + user.token; } if (token) { if (!opts.headers) { opts.headers = []; } opts.headers.Authorization = token; } } applyOptions(opts) { this.applyHTTPSOptions(opts); this.applyAuthorizationHeader(opts); } } KubeConfig.authenticators = [new cloud_auth_1.CloudAuth(), new exec_auth_1.ExecAuth()]; exports.KubeConfig = KubeConfig; // 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); } } 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'; exports.Config = Config; 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) { for (const obj of list) { if (obj.name === name) { if (obj[key]) { 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 })); const fs = __webpack_require__(35747); const u = __webpack_require__(4987); function newClusters(a) { return u.map(a, clusterIterator()); } exports.newClusters = newClusters; function clusterIterator() { return (elt, i, list) => { 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, }; }; } function newUsers(a) { return u.map(a, userIterator()); } exports.newUsers = newUsers; function userIterator() { return (elt, i, list) => { 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, }; }; } 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) { return u.map(a, contextIterator()); } exports.newContexts = newContexts; function contextIterator() { return (elt, i, list) => { 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, }; }; } //# sourceMappingURL=config_types.js.map /***/ }), /***/ 62864: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(4351); 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) { if (wsInterface) { this.handler = wsInterface; } else { this.handler = 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 })); const shell = __webpack_require__(33516); class ExecAuth { constructor() { this.tokenCache = {}; this.execFn = shell.exec; } 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)); } getToken(user) { // TODO: Handle client cert auth here, requires auth refactor. // See https://kubernetes.io/docs/reference/access-authn-authz/authentication/#input-and-output-formats // for details on this protocol. // 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 `Bearer ${cachedToken.status.token}`; } 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 cmd = exec.command; if (exec.args) { cmd = `${cmd} ${exec.args.join(' ')}`; } let opts = { silent: true }; if (exec.env) { const env = process.env; exec.env.forEach((elt) => (env[elt.name] = elt.value)); opts = Object.assign({}, opts, { env }); } const result = this.execFn(cmd, opts); if (result.code === 0) { const obj = JSON.parse(result.stdout); this.tokenCache[user.name] = obj; return `Bearer ${obj.status.token}`; } throw new Error(result.stderr); } } exports.ExecAuth = ExecAuth; //# sourceMappingURL=exec_auth.js.map /***/ }), /***/ 89679: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(4351); 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__(48698), 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__(18122), exports); tslib_1.__exportStar(__webpack_require__(44756), exports); tslib_1.__exportStar(__webpack_require__(88029), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 88029: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const cache_1 = __webpack_require__(5434); const watch_1 = __webpack_require__(7633); exports.ADD = 'add'; exports.UPDATE = 'update'; exports.DELETE = 'delete'; 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 })); const request = __webpack_require__(48699); class Log { constructor(config) { this.config = config; } log(namespace, podName, containerName, stream, done, options = {}) { 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({}, options, { container: containerName }), uri: url, }; 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 /***/ }), /***/ 32390: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(4351); 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) { if (!handler) { this.handler = new web_socket_handler_1.WebSocketHandler(config); } else { this.handler = handler; } 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 })); const stream_1 = __webpack_require__(92413); class TerminalSizeQueue extends stream_1.Readable { constructor(opts = {}) { super(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 /***/ }), /***/ 7633: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const JSONStream = __webpack_require__(81676); const request = __webpack_require__(48699); class DefaultRequest { webRequest(opts, callback) { return request(opts, callback); } } exports.DefaultRequest = DefaultRequest; class Watch { constructor(config, requestImpl) { this.config = config; if (requestImpl) { this.requestImpl = requestImpl; } else { this.requestImpl = new DefaultRequest(); } } watch(path, queryParams, callback, done) { const cluster = this.config.getCurrentCluster(); if (!cluster) { throw new Error('No currently active cluster'); } const url = cluster.server + path; queryParams.watch = true; const headerParams = {}; const requestOptions = { method: 'GET', qs: queryParams, headers: headerParams, uri: url, useQuerystring: true, json: true, }; this.config.applyToRequest(requestOptions); const stream = new JSONStream(); stream.on('data', (data) => callback(data.type, data.object)); const req = this.requestImpl.webRequest(requestOptions, (error, response, body) => { if (error) { done(error); } else { done(null); } }); req.pipe(stream); return req; } } exports.Watch = Watch; //# sourceMappingURL=watch.js.map /***/ }), /***/ 47581: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __webpack_require__(4351); 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 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; function processData(data) { 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(); } } if (i >= retryCount) { throw new Error("can't send data to ws"); } }); } stdin.on('data', (data) => { queue = queue.then(() => processData(data)); }); 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) { 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 = {}; this.config.applytoHTTPSOptions(opts); return 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(); } } }; }); } } WebSocketHandler.StdinStream = 0; WebSocketHandler.StdoutStream = 1; WebSocketHandler.StderrStream = 2; WebSocketHandler.StatusStream = 3; WebSocketHandler.ResizeStream = 4; exports.WebSocketHandler = WebSocketHandler; //# sourceMappingURL=web-socket-handler.js.map /***/ }), /***/ 18122: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const yaml = __webpack_require__(11640); 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 /***/ }), /***/ 11640: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var yaml = __webpack_require__(33729); module.exports = yaml; /***/ }), /***/ 33729: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var loader = __webpack_require__(6429); var dumper = __webpack_require__(43177); function deprecated(name) { return function () { throw new Error('Function ' + name + ' is deprecated and cannot be used.'); }; } module.exports.Type = __webpack_require__(49620); module.exports.Schema = __webpack_require__(46874); module.exports.FAILSAFE_SCHEMA = __webpack_require__(59958); module.exports.JSON_SCHEMA = __webpack_require__(99204); module.exports.CORE_SCHEMA = __webpack_require__(30772); module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(86787); module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(35016); 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__(82516); // Deprecated schema names from JS-YAML 2.0.x module.exports.MINIMAL_SCHEMA = __webpack_require__(59958); module.exports.SAFE_SCHEMA = __webpack_require__(86787); module.exports.DEFAULT_SCHEMA = __webpack_require__(35016); // 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'); /***/ }), /***/ 99691: /***/ ((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; /***/ }), /***/ 43177: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable no-use-before-define*/ var common = __webpack_require__(99691); var YAMLException = __webpack_require__(82516); var DEFAULT_FULL_SCHEMA = __webpack_require__(35016); var DEFAULT_SAFE_SCHEMA = __webpack_require__(86787); 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; /***/ }), /***/ 82516: /***/ ((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; /***/ }), /***/ 6429: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable max-len,no-use-before-define*/ var common = __webpack_require__(99691); var YAMLException = __webpack_require__(82516); var Mark = __webpack_require__(76443); var DEFAULT_SAFE_SCHEMA = __webpack_require__(86787); var DEFAULT_FULL_SCHEMA = __webpack_require__(35016); 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 (!state.anchorMap.hasOwnProperty(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; /***/ }), /***/ 76443: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(99691); 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; /***/ }), /***/ 46874: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable max-len*/ var common = __webpack_require__(99691); var YAMLException = __webpack_require__(82516); var Type = __webpack_require__(49620); 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; /***/ }), /***/ 30772: /***/ ((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__(46874); module.exports = new Schema({ include: [ __webpack_require__(99204) ] }); /***/ }), /***/ 35016: /***/ ((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__(46874); module.exports = Schema.DEFAULT = new Schema({ include: [ __webpack_require__(86787) ], explicit: [ __webpack_require__(73207), __webpack_require__(75582), __webpack_require__(45509) ] }); /***/ }), /***/ 86787: /***/ ((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__(46874); module.exports = new Schema({ include: [ __webpack_require__(30772) ], implicit: [ __webpack_require__(74752), __webpack_require__(86291) ], explicit: [ __webpack_require__(9821), __webpack_require__(38646), __webpack_require__(27706), __webpack_require__(44314) ] }); /***/ }), /***/ 59958: /***/ ((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__(46874); module.exports = new Schema({ explicit: [ __webpack_require__(6914), __webpack_require__(70538), __webpack_require__(44740) ] }); /***/ }), /***/ 99204: /***/ ((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__(46874); module.exports = new Schema({ include: [ __webpack_require__(59958) ], implicit: [ __webpack_require__(79128), __webpack_require__(15668), __webpack_require__(69706), __webpack_require__(84102) ] }); /***/ }), /***/ 49620: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var YAMLException = __webpack_require__(82516); 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; /***/ }), /***/ 9821: /***/ ((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__(49620); // [ 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 }); /***/ }), /***/ 15668: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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' }); /***/ }), /***/ 84102: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(99691); var Type = __webpack_require__(49620); 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' }); /***/ }), /***/ 69706: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(99691); var Type = __webpack_require__(49620); 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' ] } }); /***/ }), /***/ 45509: /***/ ((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__(49620); 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 }); /***/ }), /***/ 75582: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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 }); /***/ }), /***/ 73207: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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 }); /***/ }), /***/ 44740: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); module.exports = new Type('tag:yaml.org,2002:map', { kind: 'mapping', construct: function (data) { return data !== null ? data : {}; } }); /***/ }), /***/ 86291: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); function resolveYamlMerge(data) { return data === '<<' || data === null; } module.exports = new Type('tag:yaml.org,2002:merge', { kind: 'scalar', resolve: resolveYamlMerge }); /***/ }), /***/ 79128: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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' }); /***/ }), /***/ 38646: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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 }); /***/ }), /***/ 27706: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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 }); /***/ }), /***/ 70538: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); module.exports = new Type('tag:yaml.org,2002:seq', { kind: 'sequence', construct: function (data) { return data !== null ? data : []; } }); /***/ }), /***/ 44314: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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 }); /***/ }), /***/ 6914: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); module.exports = new Type('tag:yaml.org,2002:str', { kind: 'scalar', construct: function (data) { return data !== null ? data : ''; } }); /***/ }), /***/ 74752: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(49620); 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 }); /***/ }), /***/ 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__(82975) 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__(82975) 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 /***/ }), /***/ 82975: /***/ ((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 /***/ }), /***/ 7678: /***/ ((module, exports, __webpack_require__) => { "use strict"; /// /// /// /// Object.defineProperty(exports, "__esModule", ({ value: true })); // TODO: Use the `URL` global when targeting Node.js 10 // tslint:disable-next-line const URLGlobal = typeof URL === 'undefined' ? __webpack_require__(78835).URL : URL; const toString = Object.prototype.toString; const isOfType = (type) => (value) => typeof value === type; const isBuffer = (input) => !is.nullOrUndefined(input) && !is.nullOrUndefined(input.constructor) && is.function_(input.constructor.isBuffer) && input.constructor.isBuffer(input); const getObjectType = (value) => { const objectName = toString.call(value).slice(8, -1); if (objectName) { return objectName; } return null; }; const isObjectOfType = (type) => (value) => getObjectType(value) === type; function is(value) { switch (value) { case null: return "null" /* null */; case true: case false: return "boolean" /* boolean */; default: } switch (typeof value) { case 'undefined': return "undefined" /* undefined */; case 'string': return "string" /* string */; case 'number': return "number" /* number */; case 'symbol': return "symbol" /* symbol */; default: } if (is.function_(value)) { return "Function" /* Function */; } if (is.observable(value)) { return "Observable" /* Observable */; } if (Array.isArray(value)) { return "Array" /* Array */; } if (isBuffer(value)) { return "Buffer" /* 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" /* Object */; } (function (is) { // tslint:disable-next-line:strict-type-predicates const isObject = (value) => typeof value === 'object'; // tslint:disable:variable-name is.undefined = isOfType('undefined'); is.string = isOfType('string'); is.number = isOfType('number'); is.function_ = isOfType('function'); // tslint:disable-next-line:strict-type-predicates 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'); // tslint:enable:variable-name is.numericString = (value) => is.string(value) && value.length > 0 && !Number.isNaN(Number(value)); is.array = Array.isArray; is.buffer = isBuffer; is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); is.asyncIterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.asyncIterator]); is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); is.nativePromise = (value) => isObjectOfType("Promise" /* Promise */)(value); const hasPromiseAPI = (value) => !is.null_(value) && isObject(value) && is.function_(value.then) && is.function_(value.catch); is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); is.generatorFunction = isObjectOfType("GeneratorFunction" /* GeneratorFunction */); is.asyncFunction = isObjectOfType("AsyncFunction" /* AsyncFunction */); is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); is.regExp = isObjectOfType("RegExp" /* RegExp */); is.date = isObjectOfType("Date" /* Date */); is.error = isObjectOfType("Error" /* Error */); is.map = (value) => isObjectOfType("Map" /* Map */)(value); is.set = (value) => isObjectOfType("Set" /* Set */)(value); is.weakMap = (value) => isObjectOfType("WeakMap" /* WeakMap */)(value); is.weakSet = (value) => isObjectOfType("WeakSet" /* WeakSet */)(value); is.int8Array = isObjectOfType("Int8Array" /* Int8Array */); is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */); is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */); is.int16Array = isObjectOfType("Int16Array" /* Int16Array */); is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */); is.int32Array = isObjectOfType("Int32Array" /* Int32Array */); is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */); is.float32Array = isObjectOfType("Float32Array" /* Float32Array */); is.float64Array = isObjectOfType("Float64Array" /* Float64Array */); is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */); is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */); is.dataView = isObjectOfType("DataView" /* DataView */); is.directInstanceOf = (instance, klass) => Object.getPrototypeOf(instance) === klass.prototype; is.urlInstance = (value) => isObjectOfType("URL" /* URL */)(value); is.urlString = (value) => { if (!is.string(value)) { return false; } try { new URLGlobal(value); // tslint:disable-line no-unused-expression return true; } catch (_a) { return false; } }; is.truthy = (value) => Boolean(value); is.falsy = (value) => !value; is.nan = (value) => Number.isNaN(value); const primitiveTypes = new Set([ 'undefined', 'string', 'number', 'boolean', 'symbol' ]); is.primitive = (value) => is.null_(value) || primitiveTypes.has(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/master/index.js let prototype; return getObjectType(value) === "Object" /* Object */ && (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator prototype === Object.getPrototypeOf({})); }; const typedArrayTypes = new Set([ "Int8Array" /* Int8Array */, "Uint8Array" /* Uint8Array */, "Uint8ClampedArray" /* Uint8ClampedArray */, "Int16Array" /* Int16Array */, "Uint16Array" /* Uint16Array */, "Int32Array" /* Int32Array */, "Uint32Array" /* Uint32Array */, "Float32Array" /* Float32Array */, "Float64Array" /* Float64Array */ ]); is.typedArray = (value) => { const objectType = getObjectType(value); if (objectType === null) { return false; } return typedArrayTypes.has(objectType); }; const isValidLength = (value) => is.safeInteger(value) && value > -1; 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) => 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) => { if (!value) { return false; } if (value[Symbol.observable] && value === value[Symbol.observable]()) { return true; } if (value['@@observable'] && value === value['@@observable']()) { return true; } return false; }; is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe) && !is.observable(value); is.infinite = (value) => value === Infinity || value === -Infinity; const isAbsoluteMod2 = (rem) => (value) => is.integer(value) && Math.abs(value % 2) === rem; is.even = isAbsoluteMod2(0); is.odd = isAbsoluteMod2(1); const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; 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; is.nonEmptyString = (value) => is.string(value) && value.length > 0; 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; 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) === false) { throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); } if (values.length === 0) { throw new TypeError('Invalid number of values'); } return method.call(values, predicate); }; // tslint:disable variable-name is.any = (predicate, ...values) => predicateOnArray(Array.prototype.some, predicate, values); is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); // tslint:enable variable-name })(is || (is = {})); // 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_ } }); exports.default = is; // For CommonJS default export support module.exports = is; module.exports.default = is; //# sourceMappingURL=index.js.map /***/ }), /***/ 19308: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const deferToConnect = __webpack_require__(17611); module.exports = request => { const timings = { start: Date.now(), socket: null, lookup: null, connect: null, upload: null, response: null, end: null, error: null, phases: { wait: null, dns: null, tcp: null, request: null, firstByte: null, download: null, total: null } }; 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); }; }; let uploadFinished = false; const onUpload = () => { timings.upload = Date.now(); timings.phases.request = timings.upload - timings.connect; }; handleError(request); request.once('socket', 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.once('lookup', lookupListener); deferToConnect(socket, () => { timings.connect = Date.now(); if (timings.lookup === null) { socket.removeListener('lookup', lookupListener); timings.lookup = timings.connect; timings.phases.dns = timings.lookup - timings.socket; } timings.phases.tcp = timings.connect - timings.lookup; if (uploadFinished && !timings.upload) { onUpload(); } }); }); request.once('finish', () => { uploadFinished = true; if (timings.connect) { onUpload(); } }); request.once('response', response => { timings.response = Date.now(); timings.phases.firstByte = timings.response - timings.upload; handleError(response); response.once('end', () => { timings.end = Date.now(); timings.phases.download = timings.end - timings.response; timings.phases.total = timings.end - timings.start; }); }); return timings; }; /***/ }), /***/ 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-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; module.exports = formats; function formats(mode) { mode = mode == 'full' ? 'full' : 'fast'; return util.copy(formats[mode]); } formats.fast = { // date: http://tools.ietf.org/html/rfc3339#section-5.6 date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, 'uri-template': URITEMPLATE, url: URL, // email (sources from jsen validator): // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, hostname: HOSTNAME, // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, regex: regex, // uuid: http://tools.ietf.org/html/rfc4122 uuid: UUID, // JSON-pointer: https://tools.ietf.org/html/rfc6901 // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A 'json-pointer': JSON_POINTER, 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 'relative-json-pointer': RELATIVE_JSON_POINTER }; formats.full = { date: date, time: time, 'date-time': date_time, uri: uri, 'uri-reference': URIREF, 'uri-template': URITEMPLATE, url: URL, email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, hostname: HOSTNAME, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, regex: regex, uuid: UUID, 'json-pointer': JSON_POINTER, 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, 'relative-json-pointer': RELATIVE_JSON_POINTER }; function isLeapYear(year) { // https://tools.ietf.org/html/rfc3339#appendix-C return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } function date(str) { // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; var month = +matches[2]; var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } function time(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; var minute = matches[2]; var second = matches[3]; var timeZone = matches[5]; return ((hour <= 23 && minute <= 59 && second <= 59) || (hour == 23 && minute == 59 && second == 60)) && (!full || timeZone); } var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { // http://tools.ietf.org/html/rfc3339#section-5.6 var dateTime = str.split(DATE_TIME_SEPARATOR); return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." return NOT_URI_FRAGMENT.test(str) && URI.test(str); } var Z_ANCHOR = /[^\\]\\Z/; function regex(str) { if (Z_ANCHOR.test(str)) return false; try { new RegExp(str); return true; } catch(e) { return false; } } /***/ }), /***/ 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 : 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 : 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 : 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 : 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 : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : 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 : 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 : 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 : 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 : 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 : 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 : 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 : 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 : 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 : 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 = [undefined]; 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); /***/ }), /***/ 56964: /***/ ((module) => { "use strict"; function Queue(options) { if (!(this instanceof Queue)) { return new Queue(options); } options = options || {}; this.concurrency = options.concurrency || Infinity; this.pending = 0; this.jobs = []; this.cbs = []; this._done = done.bind(this); } var arrayAddMethods = [ 'push', 'unshift', 'splice' ]; arrayAddMethods.forEach(function(method) { Queue.prototype[method] = function() { var methodResult = Array.prototype[method].apply(this.jobs, arguments); this._run(); return methodResult; }; }); Object.defineProperty(Queue.prototype, 'length', { get: function() { return this.pending + this.jobs.length; } }); Queue.prototype._run = function() { if (this.pending === this.concurrency) { return; } if (this.jobs.length) { var job = this.jobs.shift(); this.pending++; job(this._done); this._run(); } if (this.pending === 0) { while (this.cbs.length !== 0) { var cb = this.cbs.pop(); process.nextTick(cb); } } }; Queue.prototype.onDone = function(cb) { if (typeof cb === 'function') { this.cbs.push(cb); this._run(); } }; function done() { this.pending--; this._run(); } module.exports = Queue; /***/ }), /***/ 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); } /***/ }), /***/ 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__(33373) , 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__(33373), 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)) } // request: { path | body, [host], [method], [headers], [service], [region] } // credentials: { accessKeyId, secretAccessKey, [sessionToken] } function RequestSigner(request, credentials) { if (typeof request === 'string') request = url.parse(request) var headers = request.headers = (request.headers || {}), hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host) this.request = request this.credentials = credentials || this.defaultCredentials() this.service = request.service || hostParts[0] || '' this.region = request.region || hostParts[1] || 'us-east-1' // SES uses a different domain from the service name if (this.service === 'email') this.service = 'ses' if (!request.method && request.body) request.method = 'POST' if (!headers.Host && !headers.host) { headers.Host = request.hostname || request.host || this.createHost() // If a port is specified explicitly, use it as is if (request.port) headers.Host += ':' + request.port } if (!request.hostname && !request.host) request.hostname = headers.Host || headers.host this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' } RequestSigner.prototype.matchHost = function(host) { var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) var hostParts = (match || []).slice(1, 3) // ES's hostParts are sometimes the other way round, if the value that is expected // to be region equals ‘es’ switch them back // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com if (hostParts[1] === 'es') hostParts = hostParts.reverse() if (hostParts[1] == 's3') { hostParts[0] = 's3' hostParts[1] = 'us-east-1' } else { for (var i = 0; i < 2; i++) { if (/^s3-/.test(hostParts[i])) { hostParts[1] = hostParts[i].slice(3) hostParts[0] = 's3' break } } } return hostParts } // http://docs.aws.amazon.com/general/latest/gr/rande.html RequestSigner.prototype.isSingleRegion = function() { // Special case for S3 and SimpleDB in us-east-1 if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] .indexOf(this.service) >= 0 } RequestSigner.prototype.createHost = function() { var region = this.isSingleRegion() ? '' : '.' + this.region, subdomain = this.service === 'ses' ? 'email' : this.service return subdomain + region + '.amazonaws.com' } RequestSigner.prototype.prepareRequest = function() { this.parsePath() var request = this.request, headers = request.headers, query if (request.signQuery) { this.parsedPath.query = query = this.parsedPath.query || {} if (this.credentials.sessionToken) query['X-Amz-Security-Token'] = this.credentials.sessionToken if (this.service === 's3' && !query['X-Amz-Expires']) query['X-Amz-Expires'] = 86400 if (query['X-Amz-Date']) this.datetime = query['X-Amz-Date'] else query['X-Amz-Date'] = this.getDateTime() query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() query['X-Amz-SignedHeaders'] = this.signedHeaders() } else { if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { if (request.body && !headers['Content-Type'] && !headers['content-type']) headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' if (request.body && !headers['Content-Length'] && !headers['content-length']) headers['Content-Length'] = Buffer.byteLength(request.body) if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) headers['X-Amz-Security-Token'] = this.credentials.sessionToken if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') if (headers['X-Amz-Date'] || headers['x-amz-date']) this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] else headers['X-Amz-Date'] = this.getDateTime() } delete headers.Authorization delete headers.authorization } } RequestSigner.prototype.sign = function() { if (!this.parsedPath) this.prepareRequest() if (this.request.signQuery) { this.parsedPath.query['X-Amz-Signature'] = this.signature() } else { this.request.headers.Authorization = this.authHeader() } this.request.path = this.formatPath() return this.request } RequestSigner.prototype.getDateTime = function() { if (!this.datetime) { var headers = this.request.headers, date = new Date(headers.Date || headers.date || new Date) this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') // Remove the trailing 'Z' on the timestamp string for CodeCommit git access if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) } return this.datetime } RequestSigner.prototype.getDate = function() { return this.getDateTime().substr(0, 8) } RequestSigner.prototype.authHeader = function() { return [ 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), 'SignedHeaders=' + this.signedHeaders(), 'Signature=' + this.signature(), ].join(', ') } RequestSigner.prototype.signature = function() { var date = this.getDate(), cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) if (!kCredentials) { kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) kRegion = hmac(kDate, this.region) kService = hmac(kRegion, this.service) kCredentials = hmac(kService, 'aws4_request') credentialsCache.set(cacheKey, kCredentials) } return hmac(kCredentials, this.stringToSign(), 'hex') } RequestSigner.prototype.stringToSign = function() { return [ 'AWS4-HMAC-SHA256', this.getDateTime(), this.credentialString(), hash(this.canonicalString(), 'hex'), ].join('\n') } RequestSigner.prototype.canonicalString = function() { if (!this.parsedPath) this.prepareRequest() var pathStr = this.parsedPath.path, query = this.parsedPath.query, headers = this.request.headers, queryStr = '', normalizePath = this.service !== 's3', decodePath = this.service === 's3' || this.request.doNotEncodePath, decodeSlashesInPath = this.service === 's3', firstValOnly = this.service === 's3', bodyHash if (this.service === 's3' && this.request.signQuery) { bodyHash = 'UNSIGNED-PAYLOAD' } else if (this.isCodeCommitGit) { bodyHash = '' } else { bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || hash(this.request.body || '', 'hex') } if (query) { var reducedQuery = Object.keys(query).reduce(function(obj, key) { if (!key) return obj obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : (firstValOnly ? query[key][0] : query[key]) return obj }, {}) var encodedQueryPieces = [] Object.keys(reducedQuery).sort().forEach(function(key) { if (!Array.isArray(reducedQuery[key])) { encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) } else { reducedQuery[key].map(encodeRfc3986Full).sort() .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) } }) queryStr = encodedQueryPieces.join('&') } if (pathStr !== '/') { if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') pathStr = pathStr.split('/').reduce(function(path, piece) { if (normalizePath && piece === '..') { path.pop() } else if (!normalizePath || piece !== '.') { if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) path.push(encodeRfc3986Full(piece)) } return path }, []).join('/') if (pathStr[0] !== '/') pathStr = '/' + pathStr if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') } return [ this.request.method || 'GET', pathStr, queryStr, this.canonicalHeaders() + '\n', this.signedHeaders(), bodyHash, ].join('\n') } RequestSigner.prototype.canonicalHeaders = function() { var headers = this.request.headers function trimAll(header) { return header.toString().trim().replace(/\s+/g, ' ') } return Object.keys(headers) .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) .join('\n') } RequestSigner.prototype.signedHeaders = function() { return Object.keys(this.request.headers) .map(function(key) { return key.toLowerCase() }) .sort() .join(';') } RequestSigner.prototype.credentialString = function() { return [ this.getDate(), this.region, this.service, 'aws4_request', ].join('/') } RequestSigner.prototype.defaultCredentials = function() { var env = process.env return { accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, sessionToken: env.AWS_SESSION_TOKEN, } } RequestSigner.prototype.parsePath = function() { var path = this.request.path || '/' // S3 doesn't always encode characters > 127 correctly and // all services don't encode characters > 255 correctly // So if there are non-reserved chars (and it's not already all % encoded), just encode them all if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { path = encodeURI(decodeURI(path)) } var queryIx = path.indexOf('?'), query = null if (queryIx >= 0) { query = querystring.parse(path.slice(queryIx + 1)) path = path.slice(0, queryIx) } this.parsedPath = { path: path, query: query, } } RequestSigner.prototype.formatPath = function() { var path = this.parsedPath.path, query = this.parsedPath.query if (!query) return path // Services don't support empty query string keys if (query[''] != null) delete query[''] return path + '?' + encodeRfc3986(querystring.stringify(query)) } aws4.RequestSigner = RequestSigner aws4.sign = function(request, credentials) { return new RequestSigner(request, credentials).sign() } /***/ }), /***/ 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) { 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)); /***/ }), /***/ 18348: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); var pad_string_1 = __webpack_require__(14155); function encode(input, encoding) { if (encoding === void 0) { encoding = "utf8"; } if (Buffer.isBuffer(input)) { return fromBase64(input.toString("base64")); } return fromBase64(Buffer.from(input, encoding).toString("base64")); } ; function decode(base64url, encoding) { if (encoding === void 0) { encoding = "utf8"; } return Buffer.from(toBase64(base64url), "base64").toString(encoding); } function toBase64(base64url) { base64url = base64url.toString(); return pad_string_1.default(base64url) .replace(/\-/g, "+") .replace(/_/g, "/"); } function fromBase64(base64) { return base64 .replace(/=/g, "") .replace(/\+/g, "-") .replace(/\//g, "_"); } function toBuffer(base64url) { return Buffer.from(toBase64(base64url), "base64"); } var base64url = encode; base64url.encode = encode; base64url.decode = decode; base64url.toBase64 = toBase64; base64url.fromBase64 = fromBase64; base64url.toBuffer = toBuffer; exports.default = base64url; /***/ }), /***/ 14155: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); function padString(input) { var segmentLength = 4; var stringLength = input.length; var diff = stringLength % segmentLength; if (!diff) { return input; } var position = stringLength; var padLength = segmentLength - diff; var paddedStringLength = stringLength + padLength; var buffer = Buffer.alloc(paddedStringLength); buffer.write(input); while (padLength--) { buffer.write("=", position++); } return buffer.toString(); } exports.default = padString; /***/ }), /***/ 27291: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(18348).default; module.exports.default = module.exports; /***/ }), /***/ 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; } /***/ }), /***/ 24340: /***/ ((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; }; /***/ }), /***/ 97040: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {constants: BufferConstants} = __webpack_require__(64293); const pump = __webpack_require__(18341); const bufferStream = __webpack_require__(24340); 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; /***/ }), /***/ 15993: /***/ ((module) => { "use strict"; module.exports = object => { const result = {}; for (const [key, value] of Object.entries(object)) { result[key.toLowerCase()] = value; } return result; }; /***/ }), /***/ 78116: /***/ ((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__(97040); const CachePolicy = __webpack_require__(61002); const Response = __webpack_require__(9004); const lowercaseKeys = __webpack_require__(15993); const cloneResponse = __webpack_require__(81312); const Keyv = __webpack_require__(51531); 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; /***/ }), /***/ 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 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); }; /***/ }), /***/ 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); } /***/ }), /***/ 82391: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const PassThrough = __webpack_require__(92413).PassThrough; const zlib = __webpack_require__(78761); const mimicResponse = __webpack_require__(42610); module.exports = response => { // TODO: Use Array#includes when targeting Node.js 6 if (['gzip', 'deflate'].indexOf(response.headers['content-encoding']) === -1) { return response; } const unzip = zlib.createUnzip(); const stream = new PassThrough(); mimicResponse(response, stream); unzip.on('error', err => { if (err.code === 'Z_BUF_ERROR') { stream.end(); return; } stream.emit('error', err); }); response.pipe(unzip).pipe(stream); return stream; }; /***/ }), /***/ 56323: /***/ ((module) => { "use strict"; var isMergeableObject = function isMergeableObject(value) { return isNonNullObject(value) && !isSpecial(value) }; function isNonNullObject(value) { return !!value && typeof value === 'object' } function isSpecial(value) { var stringValue = Object.prototype.toString.call(value); return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value) } // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 var canUseSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; function isReactElement(value) { return value.$$typeof === REACT_ELEMENT_TYPE } function emptyTarget(val) { return Array.isArray(val) ? [] : {} } function cloneUnlessOtherwiseSpecified(value, options) { return (options.clone !== false && options.isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, options) : value } function defaultArrayMerge(target, source, options) { return target.concat(source).map(function(element) { return cloneUnlessOtherwiseSpecified(element, options) }) } function getMergeFunction(key, options) { if (!options.customMerge) { return deepmerge } var customMerge = options.customMerge(key); return typeof customMerge === 'function' ? customMerge : deepmerge } function getEnumerableOwnPropertySymbols(target) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { return target.propertyIsEnumerable(symbol) }) : [] } function getKeys(target) { return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) } function propertyIsOnObject(object, property) { try { return property in object } catch(_) { return false } } // Protects from prototype poisoning and unexpected merging up the prototype chain. function propertyIsUnsafe(target, key) { return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet, && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain, && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable. } function mergeObject(target, source, options) { var destination = {}; if (options.isMergeableObject(target)) { getKeys(target).forEach(function(key) { destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); }); } getKeys(source).forEach(function(key) { if (propertyIsUnsafe(target, key)) { return } if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { destination[key] = getMergeFunction(key, options)(target[key], source[key], options); } else { destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); } }); return destination } function deepmerge(target, source, options) { options = options || {}; options.arrayMerge = options.arrayMerge || defaultArrayMerge; options.isMergeableObject = options.isMergeableObject || isMergeableObject; // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() // implementations can use it. The caller may not replace it. options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; var sourceIsArray = Array.isArray(source); var targetIsArray = Array.isArray(target); var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; if (!sourceAndTargetTypesMatch) { return cloneUnlessOtherwiseSpecified(source, options) } else if (sourceIsArray) { return options.arrayMerge(target, source, options) } else { return mergeObject(target, source, options) } } deepmerge.all = function deepmergeAll(array, options) { if (!Array.isArray(array)) { throw new Error('first argument should be an array') } return array.reduce(function(prev, next) { return deepmerge(prev, next, options) }, {}) }; var deepmerge_1 = deepmerge; module.exports = deepmerge_1; /***/ }), /***/ 17611: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const tls_1 = __webpack_require__(4016); 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 (socket instanceof tls_1.TLSSocket && 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; /***/ }), /***/ 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)); }; /***/ }), /***/ 18883: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /*! * depd * Copyright(c) 2014-2018 Douglas Christopher Wilson * MIT Licensed */ /** * Module dependencies. */ var relative = __webpack_require__(85622).relative /** * Module exports. */ module.exports = depd /** * Get the path to base files on. */ var basePath = process.cwd() /** * Determine if namespace is contained in the string. */ function containsNamespace (str, namespace) { var vals = str.split(/[ ,]+/) var ns = String(namespace).toLowerCase() for (var i = 0; i < vals.length; i++) { var val = vals[i] // namespace contained if (val && (val === '*' || val.toLowerCase() === ns)) { return true } } return false } /** * Convert a data descriptor to accessor descriptor. */ function convertDataDescriptorToAccessor (obj, prop, message) { var descriptor = Object.getOwnPropertyDescriptor(obj, prop) var value = descriptor.value descriptor.get = function getter () { return value } if (descriptor.writable) { descriptor.set = function setter (val) { return (value = val) } } delete descriptor.value delete descriptor.writable Object.defineProperty(obj, prop, descriptor) return descriptor } /** * Create arguments string to keep arity. */ function createArgumentsString (arity) { var str = '' for (var i = 0; i < arity; i++) { str += ', arg' + i } return str.substr(2) } /** * Create stack string from stack. */ function createStackString (stack) { var str = this.name + ': ' + this.namespace if (this.message) { str += ' deprecated ' + this.message } for (var i = 0; i < stack.length; i++) { str += '\n at ' + stack[i].toString() } return str } /** * Create deprecate for namespace in caller. */ function depd (namespace) { if (!namespace) { throw new TypeError('argument namespace is required') } var stack = getStack() var site = callSiteLocation(stack[1]) var file = site[0] function deprecate (message) { // call to self as log log.call(deprecate, message) } deprecate._file = file deprecate._ignored = isignored(namespace) deprecate._namespace = namespace deprecate._traced = istraced(namespace) deprecate._warned = Object.create(null) deprecate.function = wrapfunction deprecate.property = wrapproperty return deprecate } /** * Determine if event emitter has listeners of a given type. * * The way to do this check is done three different ways in Node.js >= 0.8 * so this consolidates them into a minimal set using instance methods. * * @param {EventEmitter} emitter * @param {string} type * @returns {boolean} * @private */ function eehaslisteners (emitter, type) { var count = typeof emitter.listenerCount !== 'function' ? emitter.listeners(type).length : emitter.listenerCount(type) return count > 0 } /** * Determine if namespace is ignored. */ function isignored (namespace) { if (process.noDeprecation) { // --no-deprecation support return true } var str = process.env.NO_DEPRECATION || '' // namespace ignored return containsNamespace(str, namespace) } /** * Determine if namespace is traced. */ function istraced (namespace) { if (process.traceDeprecation) { // --trace-deprecation support return true } var str = process.env.TRACE_DEPRECATION || '' // namespace traced return containsNamespace(str, namespace) } /** * Display deprecation message. */ function log (message, site) { var haslisteners = eehaslisteners(process, 'deprecation') // abort early if no destination if (!haslisteners && this._ignored) { return } var caller var callFile var callSite var depSite var i = 0 var seen = false var stack = getStack() var file = this._file if (site) { // provided site depSite = site callSite = callSiteLocation(stack[1]) callSite.name = depSite.name file = callSite[0] } else { // get call site i = 2 depSite = callSiteLocation(stack[i]) callSite = depSite } // get caller of deprecated thing in relation to file for (; i < stack.length; i++) { caller = callSiteLocation(stack[i]) callFile = caller[0] if (callFile === file) { seen = true } else if (callFile === this._file) { file = this._file } else if (seen) { break } } var key = caller ? depSite.join(':') + '__' + caller.join(':') : undefined if (key !== undefined && key in this._warned) { // already warned return } this._warned[key] = true // generate automatic message from call site var msg = message if (!msg) { msg = callSite === depSite || !callSite.name ? defaultMessage(depSite) : defaultMessage(callSite) } // emit deprecation if listeners exist if (haslisteners) { var err = DeprecationError(this._namespace, msg, stack.slice(i)) process.emit('deprecation', err) return } // format and write message var format = process.stderr.isTTY ? formatColor : formatPlain var output = format.call(this, msg, caller, stack.slice(i)) process.stderr.write(output + '\n', 'utf8') } /** * Get call site location as array. */ function callSiteLocation (callSite) { var file = callSite.getFileName() || '' var line = callSite.getLineNumber() var colm = callSite.getColumnNumber() if (callSite.isEval()) { file = callSite.getEvalOrigin() + ', ' + file } var site = [file, line, colm] site.callSite = callSite site.name = callSite.getFunctionName() return site } /** * Generate a default message from the site. */ function defaultMessage (site) { var callSite = site.callSite var funcName = site.name // make useful anonymous name if (!funcName) { funcName = '' } var context = callSite.getThis() var typeName = context && callSite.getTypeName() // ignore useless type name if (typeName === 'Object') { typeName = undefined } // make useful type name if (typeName === 'Function') { typeName = context.name || typeName } return typeName && callSite.getMethodName() ? typeName + '.' + funcName : funcName } /** * Format deprecation message without color. */ function formatPlain (msg, caller, stack) { var timestamp = new Date().toUTCString() var formatted = timestamp + ' ' + this._namespace + ' deprecated ' + msg // add stack trace if (this._traced) { for (var i = 0; i < stack.length; i++) { formatted += '\n at ' + stack[i].toString() } return formatted } if (caller) { formatted += ' at ' + formatLocation(caller) } return formatted } /** * Format deprecation message with color. */ function formatColor (msg, caller, stack) { var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow ' \x1b[0m' + msg + '\x1b[39m' // reset // add stack trace if (this._traced) { for (var i = 0; i < stack.length; i++) { formatted += '\n \x1b[36mat ' + stack[i].toString() + '\x1b[39m' // cyan } return formatted } if (caller) { formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan } return formatted } /** * Format call site location. */ function formatLocation (callSite) { return relative(basePath, callSite[0]) + ':' + callSite[1] + ':' + callSite[2] } /** * Get the stack as array of call sites. */ function getStack () { var limit = Error.stackTraceLimit var obj = {} var prep = Error.prepareStackTrace Error.prepareStackTrace = prepareObjectStackTrace Error.stackTraceLimit = Math.max(10, limit) // capture the stack Error.captureStackTrace(obj) // slice this function off the top var stack = obj.stack.slice(1) Error.prepareStackTrace = prep Error.stackTraceLimit = limit return stack } /** * Capture call site stack from v8. */ function prepareObjectStackTrace (obj, stack) { return stack } /** * Return a wrapped function in a deprecation message. */ function wrapfunction (fn, message) { if (typeof fn !== 'function') { throw new TypeError('argument fn must be a function') } var args = createArgumentsString(fn.length) var stack = getStack() var site = callSiteLocation(stack[1]) site.name = fn.name // eslint-disable-next-line no-new-func var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site', '"use strict"\n' + 'return function (' + args + ') {' + 'log.call(deprecate, message, site)\n' + 'return fn.apply(this, arguments)\n' + '}')(fn, log, this, message, site) return deprecatedfn } /** * Wrap property in a deprecation message. */ function wrapproperty (obj, prop, message) { if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { throw new TypeError('argument obj must be object') } var descriptor = Object.getOwnPropertyDescriptor(obj, prop) if (!descriptor) { throw new TypeError('must call property on owner object') } if (!descriptor.configurable) { throw new TypeError('property must be configurable') } var deprecate = this var stack = getStack() var site = callSiteLocation(stack[1]) // set site name site.name = prop // convert data descriptor if ('value' in descriptor) { descriptor = convertDataDescriptorToAccessor(obj, prop, message) } var get = descriptor.get var set = descriptor.set // wrap getter if (typeof get === 'function') { descriptor.get = function getter () { log.call(deprecate, message, site) return get.apply(this, arguments) } } // wrap setter if (typeof set === 'function') { descriptor.set = function setter () { log.call(deprecate, message, site) return set.apply(this, arguments) } } Object.defineProperty(obj, prop, descriptor) } /** * Create DeprecationError for deprecation */ function DeprecationError (namespace, message, stack) { var error = new Error() var stackString Object.defineProperty(error, 'constructor', { value: DeprecationError }) Object.defineProperty(error, 'message', { configurable: true, enumerable: false, value: message, writable: true }) Object.defineProperty(error, 'name', { enumerable: false, configurable: true, value: 'DeprecationError', writable: true }) Object.defineProperty(error, 'namespace', { configurable: true, enumerable: false, value: namespace, writable: true }) Object.defineProperty(error, 'stack', { configurable: true, enumerable: false, get: function () { if (stackString !== undefined) { return stackString } // prepare stack trace return (stackString = createStackString.call(this, stack)) }, set: function setter (val) { stackString = val } }) return error } /***/ }), /***/ 7994: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var stream = __webpack_require__(92413); function DuplexWrapper(options, writable, readable) { if (typeof readable === "undefined") { readable = writable; writable = options; options = null; } stream.Duplex.call(this, options); if (typeof readable.read !== "function") { readable = (new stream.Readable(options)).wrap(readable); } this._writable = writable; this._readable = readable; this._waiting = false; var self = this; writable.once("finish", function() { self.end(); }); this.once("finish", function() { writable.end(); }); readable.on("readable", function() { if (self._waiting) { self._waiting = false; self._read(); } }); readable.once("end", function() { self.push(null); }); if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) { writable.on("error", function(err) { self.emit("error", err); }); readable.on("error", function(err) { self.emit("error", err); }); } } DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); DuplexWrapper.prototype._write = function _write(input, encoding, done) { this._writable.write(input, encoding, done); }; DuplexWrapper.prototype._read = function _read() { var buf; var reads = 0; while ((buf = this._readable.read()) !== null) { this.push(buf); reads++; } if (reads === 0) { this._waiting = true; } }; module.exports = function duplex2(options, writable, readable) { return new DuplexWrapper(options, writable, readable); }; module.exports.DuplexWrapper = DuplexWrapper; /***/ }), /***/ 49865: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var crypto = __webpack_require__(33373); 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; /***/ }), /***/ 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); } /***/ }), /***/ 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} = __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; }; /***/ }), /***/ 21766: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const pump = __webpack_require__(18341); const bufferStream = __webpack_require__(91585); 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; /***/ }), /***/ 47625: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { exports.alphasort = alphasort exports.alphasorti = alphasorti exports.setopts = setopts exports.ownProp = ownProp exports.makeAbs = makeAbs exports.finish = finish exports.mark = mark exports.isIgnored = isIgnored exports.childrenIgnored = childrenIgnored function ownProp (obj, field) { return Object.prototype.hasOwnProperty.call(obj, field) } var path = __webpack_require__(85622) var minimatch = __webpack_require__(83973) var isAbsolute = __webpack_require__(38714) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()) } function alphasort (a, b) { return a.localeCompare(b) } function setupIgnores (self, options) { self.ignore = options.ignore || [] if (!Array.isArray(self.ignore)) self.ignore = [self.ignore] if (self.ignore.length) { self.ignore = self.ignore.map(ignoreMap) } } // ignore patterns are always in dot:true mode. function ignoreMap (pattern) { var gmatcher = null if (pattern.slice(-3) === '/**') { var gpattern = pattern.replace(/(\/\*\*)+$/, '') gmatcher = new Minimatch(gpattern, { dot: true }) } return { matcher: new Minimatch(pattern, { dot: true }), gmatcher: gmatcher } } function setopts (self, pattern, options) { if (!options) options = {} // base-matching: just use globstar for that. if (options.matchBase && -1 === pattern.indexOf("/")) { if (options.noglobstar) { throw new Error("base matching requires globstar") } pattern = "**/" + pattern } self.silent = !!options.silent self.pattern = pattern self.strict = options.strict !== false self.realpath = !!options.realpath self.realpathCache = options.realpathCache || Object.create(null) self.follow = !!options.follow self.dot = !!options.dot self.mark = !!options.mark self.nodir = !!options.nodir if (self.nodir) self.mark = true self.sync = !!options.sync self.nounique = !!options.nounique self.nonull = !!options.nonull self.nosort = !!options.nosort self.nocase = !!options.nocase self.stat = !!options.stat self.noprocess = !!options.noprocess self.absolute = !!options.absolute self.maxLength = options.maxLength || Infinity self.cache = options.cache || Object.create(null) self.statCache = options.statCache || Object.create(null) self.symlinks = options.symlinks || Object.create(null) setupIgnores(self, options) self.changedCwd = false var cwd = process.cwd() if (!ownProp(options, "cwd")) self.cwd = cwd else { self.cwd = path.resolve(options.cwd) self.changedCwd = self.cwd !== cwd } self.root = options.root || path.resolve(self.cwd, "/") self.root = path.resolve(self.root) if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/") // TODO: is an absolute `cwd` supposed to be resolved against `root`? // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) if (process.platform === "win32") self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") self.nomount = !!options.nomount // disable comments and negation in Minimatch. // Note that they are not supported in Glob itself anyway. options.nonegate = true options.nocomment = true self.minimatch = new Minimatch(pattern, options) self.options = self.minimatch.options } function finish (self) { var nou = self.nounique var all = nou ? [] : Object.create(null) for (var i = 0, l = self.matches.length; i < l; i ++) { var matches = self.matches[i] if (!matches || Object.keys(matches).length === 0) { if (self.nonull) { // do like the shell, and spit out the literal glob var literal = self.minimatch.globSet[i] if (nou) all.push(literal) else all[literal] = true } } else { // had matches var m = Object.keys(matches) if (nou) all.push.apply(all, m) else m.forEach(function (m) { all[m] = true }) } } if (!nou) all = Object.keys(all) if (!self.nosort) all = all.sort(self.nocase ? alphasorti : alphasort) // at *some* point we statted all of these if (self.mark) { for (var i = 0; i < all.length; i++) { all[i] = self._mark(all[i]) } if (self.nodir) { all = all.filter(function (e) { var notDir = !(/\/$/.test(e)) var c = self.cache[e] || self.cache[makeAbs(self, e)] if (notDir && c) notDir = c !== 'DIR' && !Array.isArray(c) return notDir }) } } if (self.ignore.length) all = all.filter(function(m) { return !isIgnored(self, m) }) self.found = all } function mark (self, p) { var abs = makeAbs(self, p) var c = self.cache[abs] var m = p if (c) { var isDir = c === 'DIR' || Array.isArray(c) var slash = p.slice(-1) === '/' if (isDir && !slash) m += '/' else if (!isDir && slash) m = m.slice(0, -1) if (m !== p) { var mabs = makeAbs(self, m) self.statCache[mabs] = self.statCache[abs] self.cache[mabs] = self.cache[abs] } } return m } // lotta situps... function makeAbs (self, f) { var abs = f if (f.charAt(0) === '/') { abs = path.join(self.root, f) } else if (isAbsolute(f) || f === '') { abs = f } else if (self.changedCwd) { abs = path.resolve(self.cwd, f) } else { abs = path.resolve(f) } if (process.platform === 'win32') abs = abs.replace(/\\/g, '/') return abs } // Return true, if pattern ends with globstar '**', for the accompanying parent directory. // Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents function isIgnored (self, path) { if (!self.ignore.length) return false return self.ignore.some(function(item) { return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) }) } function childrenIgnored (self, path) { if (!self.ignore.length) return false return self.ignore.some(function(item) { return !!(item.gmatcher && item.gmatcher.match(path)) }) } /***/ }), /***/ 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 fs = __webpack_require__(35747) 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 alphasort = common.alphasort var alphasorti = common.alphasorti 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) fs.lstat(abs, lstatcb) function lstatcb_ (er, lstat) { if (er && er.code === 'ENOENT') return cb() var isSym = lstat && lstat.isSymbolicLink() self.symlinks[abs] = isSym // If it's not a symlink or a dir, then it's definitely a regular file. // don't bother doing a readdir in that case. if (!isSym && lstat && !lstat.isDirectory()) { self.cache[abs] = 'FILE' cb() } else self._readdir(abs, false, cb) } } Glob.prototype._readdir = function (abs, inGlobStar, cb) { if (this.aborted) return cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) if (!cb) return //console.error('RD %j %j', +inGlobStar, abs) if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb) if (ownProp(this.cache, abs)) { var c = this.cache[abs] if (!c || c === 'FILE') return cb() if (Array.isArray(c)) return cb(null, c) } var self = this fs.readdir(abs, readdirCb(this, abs, cb)) } function readdirCb (self, abs, cb) { return function (er, entries) { if (er) self._readdirError(abs, er, cb) else self._readdirEntries(abs, entries, cb) } } Glob.prototype._readdirEntries = function (abs, entries, cb) { if (this.aborted) return // if we haven't asked to stat everything, then just // assume that everything in there exists, so we can avoid // having to stat it a second time. if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i ++) { var e = entries[i] if (abs === '/') e = abs + e else e = abs + '/' + e this.cache[e] = true } } this.cache[abs] = entries return cb(null, entries) } Glob.prototype._readdirError = function (f, er, cb) { if (this.aborted) return // handle errors, and cache the information switch (er.code) { case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 case 'ENOTDIR': // totally normal. means it *does* exist. var abs = this._makeAbs(f) this.cache[abs] = 'FILE' if (abs === this.cwdAbs) { var error = new Error(er.code + ' invalid cwd ' + this.cwd) error.path = this.cwd error.code = er.code this.emit('error', error) this.abort() } break case 'ENOENT': // not terribly unusual case 'ELOOP': case 'ENAMETOOLONG': case 'UNKNOWN': this.cache[this._makeAbs(f)] = false break default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false if (this.strict) { this.emit('error', er) // If the error is handled, then we abort // if not, we threw out of here this.abort() } if (!this.silent) console.error('glob error', er) break } return cb() } Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { var self = this this._readdir(abs, inGlobStar, function (er, entries) { self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) }) } Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { //console.error('pgs2', prefix, remain[0], entries) // no entries means not a dir, so it can never have matches // foo.txt/** doesn't match foo.txt if (!entries) return cb() // test without the globstar, and with every child both below // and replacing the globstar. var remainWithoutGlobStar = remain.slice(1) var gspref = prefix ? [ prefix ] : [] var noGlobStar = gspref.concat(remainWithoutGlobStar) // the noGlobStar pattern exits the inGlobStar state this._process(noGlobStar, index, false, cb) var isSym = this.symlinks[abs] var len = entries.length // If it's a symlink, and we're in a globstar, then stop if (isSym && inGlobStar) return cb() for (var i = 0; i < len; i++) { var e = entries[i] if (e.charAt(0) === '.' && !this.dot) continue // these two cases enter the inGlobStar state var instead = gspref.concat(entries[i], remainWithoutGlobStar) this._process(instead, index, true, cb) var below = gspref.concat(entries[i], remain) this._process(below, index, true, cb) } cb() } Glob.prototype._processSimple = function (prefix, index, cb) { // XXX review this. Shouldn't it be doing the mounting etc // before doing stat? kinda weird? var self = this this._stat(prefix, function (er, exists) { self._processSimple2(prefix, index, er, exists, cb) }) } Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { //console.error('ps2', prefix, exists) if (!this.matches[index]) this.matches[index] = Object.create(null) // If it doesn't exist, then just mark the lack of results if (!exists) return cb() if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix) if (prefix.charAt(0) === '/') { prefix = path.join(this.root, prefix) } else { prefix = path.resolve(this.root, prefix) if (trail) prefix += '/' } } if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/') // Mark this as a match this._emitMatch(index, prefix) cb() } // Returns either 'DIR', 'FILE', or false Glob.prototype._stat = function (f, cb) { var abs = this._makeAbs(f) var needDir = f.slice(-1) === '/' if (f.length > this.maxLength) return cb() if (!this.stat && ownProp(this.cache, abs)) { var c = this.cache[abs] if (Array.isArray(c)) c = 'DIR' // It exists, but maybe not how we need it if (!needDir || c === 'DIR') return cb(null, c) if (needDir && c === 'FILE') return cb() // otherwise we have to stat, because maybe c=true // if we know it exists, but not what it is. } var exists var stat = this.statCache[abs] if (stat !== undefined) { if (stat === false) return cb(null, stat) else { var type = stat.isDirectory() ? 'DIR' : 'FILE' if (needDir && type === 'FILE') return cb() else return cb(null, type, stat) } } var self = this var statcb = inflight('stat\0' + abs, lstatcb_) if (statcb) fs.lstat(abs, statcb) function lstatcb_ (er, lstat) { if (lstat && lstat.isSymbolicLink()) { // If it's a symlink, then treat it as the target, unless // the target does not exist, then treat it as a file. return fs.stat(abs, function (er, stat) { if (er) self._stat2(f, abs, null, lstat, cb) else self._stat2(f, abs, er, stat, cb) }) } else { self._stat2(f, abs, er, lstat, cb) } } } Glob.prototype._stat2 = function (f, abs, er, stat, cb) { if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false return cb() } var needDir = f.slice(-1) === '/' this.statCache[abs] = stat if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) return cb(null, false, stat) var c = true if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE' this.cache[abs] = this.cache[abs] || c if (needDir && c === 'FILE') return cb() return cb(null, c, stat) } /***/ }), /***/ 29010: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(35747) 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 alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored function globSync (pattern, options) { if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n'+ 'See: https://github.com/isaacs/node-glob/issues/167') return new GlobSync(pattern, options).found } function GlobSync (pattern, options) { if (!pattern) throw new Error('must provide pattern') if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n'+ 'See: https://github.com/isaacs/node-glob/issues/167') if (!(this instanceof GlobSync)) return new GlobSync(pattern, options) setopts(this, pattern, options) if (this.noprocess) return this var n = this.minimatch.set.length this.matches = new Array(n) for (var i = 0; i < n; i ++) { this._process(this.minimatch.set[i], i, false) } this._finish() } GlobSync.prototype._finish = function () { assert(this instanceof GlobSync) if (this.realpath) { var self = this this.matches.forEach(function (matchset, index) { var set = self.matches[index] = Object.create(null) for (var p in matchset) { try { p = self._makeAbs(p) var real = rp.realpathSync(p, self.realpathCache) set[real] = true } catch (er) { if (er.syscall === 'stat') set[self._makeAbs(p)] = true else throw er } } }) } common.finish(this) } GlobSync.prototype._process = function (pattern, index, inGlobStar) { assert(this instanceof GlobSync) // Get the first [n] parts of pattern that are all strings. var n = 0 while (typeof pattern[n] === 'string') { n ++ } // now n is the index of the first one that is *not* a string. // See if there's anything else var prefix switch (n) { // if not, then this is rather simple case pattern.length: this._processSimple(pattern.join('/'), index) return case 0: // pattern *starts* with some non-trivial item. // going to readdir(cwd), but not include the prefix in matches. prefix = null break default: // pattern has some string bits in the front. // whatever it starts with, whether that's 'absolute' like /foo/bar, // or 'relative' like '../baz' prefix = pattern.slice(0, n).join('/') break } var remain = pattern.slice(n) // get the list of entries. var read if (prefix === null) read = '.' else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { if (!prefix || !isAbsolute(prefix)) prefix = '/' + prefix read = prefix } else read = prefix var abs = this._makeAbs(read) //if ignored, skip processing if (childrenIgnored(this, read)) return var isGlobStar = remain[0] === minimatch.GLOBSTAR if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) else this._processReaddir(prefix, read, abs, remain, index, inGlobStar) } GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar) // if the abs isn't a dir, then nothing can match! if (!entries) return // It will only match dot entries if it starts with a dot, or if // dot is set. Stuff like @(.foo|.bar) isn't allowed. var pn = remain[0] var negate = !!this.minimatch.negate var rawGlob = pn._glob var dotOk = this.dot || rawGlob.charAt(0) === '.' var matchedEntries = [] for (var i = 0; i < entries.length; i++) { var e = entries[i] if (e.charAt(0) !== '.' || dotOk) { var m if (negate && !prefix) { m = !e.match(pn) } else { m = e.match(pn) } if (m) matchedEntries.push(e) } } var len = matchedEntries.length // If there are no matched entries, then nothing matches. if (len === 0) return // if this is the last remaining pattern bit, then no need for // an additional stat *unless* the user has specified mark or // stat explicitly. We know they exist, since readdir returned // them. if (remain.length === 1 && !this.mark && !this.stat) { if (!this.matches[index]) this.matches[index] = Object.create(null) for (var i = 0; i < len; i ++) { var e = matchedEntries[i] if (prefix) { if (prefix.slice(-1) !== '/') e = prefix + '/' + e else e = prefix + e } if (e.charAt(0) === '/' && !this.nomount) { e = path.join(this.root, e) } this._emitMatch(index, e) } // This was the last one, and no stats were needed return } // now test all matched entries as stand-ins for that part // of the pattern. remain.shift() for (var i = 0; i < len; i ++) { var e = matchedEntries[i] var newPattern if (prefix) newPattern = [prefix, e] else newPattern = [e] this._process(newPattern.concat(remain), index, inGlobStar) } } GlobSync.prototype._emitMatch = function (index, e) { if (isIgnored(this, e)) return var abs = this._makeAbs(e) if (this.mark) e = this._mark(e) if (this.absolute) { e = abs } if (this.matches[index][e]) return if (this.nodir) { var c = this.cache[abs] if (c === 'DIR' || Array.isArray(c)) return } this.matches[index][e] = true if (this.stat) this._stat(e) } GlobSync.prototype._readdirInGlobStar = function (abs) { // follow all symlinked directories forever // just proceed as if this is a non-globstar situation if (this.follow) return this._readdir(abs, false) var entries var lstat var stat try { lstat = fs.lstatSync(abs) } catch (er) { if (er.code === 'ENOENT') { // lstat failed, doesn't exist return null } } var isSym = lstat && lstat.isSymbolicLink() this.symlinks[abs] = isSym // If it's not a symlink or a dir, then it's definitely a regular file. // don't bother doing a readdir in that case. if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = 'FILE' else entries = this._readdir(abs, false) return entries } GlobSync.prototype._readdir = function (abs, inGlobStar) { var entries if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs) if (ownProp(this.cache, abs)) { var c = this.cache[abs] if (!c || c === 'FILE') return null if (Array.isArray(c)) return c } try { return this._readdirEntries(abs, fs.readdirSync(abs)) } catch (er) { this._readdirError(abs, er) return null } } GlobSync.prototype._readdirEntries = function (abs, entries) { // if we haven't asked to stat everything, then just // assume that everything in there exists, so we can avoid // having to stat it a second time. if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i ++) { var e = entries[i] if (abs === '/') e = abs + e else e = abs + '/' + e this.cache[e] = true } } this.cache[abs] = entries // mark and cache dir-ness return entries } GlobSync.prototype._readdirError = function (f, er) { // handle errors, and cache the information switch (er.code) { case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 case 'ENOTDIR': // totally normal. means it *does* exist. var abs = this._makeAbs(f) this.cache[abs] = 'FILE' if (abs === this.cwdAbs) { var error = new Error(er.code + ' invalid cwd ' + this.cwd) error.path = this.cwd error.code = er.code throw error } break case 'ENOENT': // not terribly unusual case 'ELOOP': case 'ENAMETOOLONG': case 'UNKNOWN': this.cache[this._makeAbs(f)] = false break default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false if (this.strict) throw er if (!this.silent) console.error('glob error', er) break } } GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar) // no entries means not a dir, so it can never have matches // foo.txt/** doesn't match foo.txt if (!entries) return // test without the globstar, and with every child both below // and replacing the globstar. var remainWithoutGlobStar = remain.slice(1) var gspref = prefix ? [ prefix ] : [] var noGlobStar = gspref.concat(remainWithoutGlobStar) // the noGlobStar pattern exits the inGlobStar state this._process(noGlobStar, index, false) var len = entries.length var isSym = this.symlinks[abs] // If it's a symlink, and we're in a globstar, then stop if (isSym && inGlobStar) return for (var i = 0; i < len; i++) { var e = entries[i] if (e.charAt(0) === '.' && !this.dot) continue // these two cases enter the inGlobStar state var instead = gspref.concat(entries[i], remainWithoutGlobStar) this._process(instead, index, true) var below = gspref.concat(entries[i], remain) this._process(below, index, true) } } GlobSync.prototype._processSimple = function (prefix, index) { // XXX review this. Shouldn't it be doing the mounting etc // before doing stat? kinda weird? var exists = this._stat(prefix) if (!this.matches[index]) this.matches[index] = Object.create(null) // If it doesn't exist, then just mark the lack of results if (!exists) return if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix) if (prefix.charAt(0) === '/') { prefix = path.join(this.root, prefix) } else { prefix = path.resolve(this.root, prefix) if (trail) prefix += '/' } } if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/') // Mark this as a match this._emitMatch(index, prefix) } // Returns either 'DIR', 'FILE', or false GlobSync.prototype._stat = function (f) { var abs = this._makeAbs(f) var needDir = f.slice(-1) === '/' if (f.length > this.maxLength) return false if (!this.stat && ownProp(this.cache, abs)) { var c = this.cache[abs] if (Array.isArray(c)) c = 'DIR' // It exists, but maybe not how we need it if (!needDir || c === 'DIR') return c if (needDir && c === 'FILE') return false // otherwise we have to stat, because maybe c=true // if we know it exists, but not what it is. } var exists var stat = this.statCache[abs] if (!stat) { var lstat try { lstat = fs.lstatSync(abs) } catch (er) { if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false return false } } if (lstat && lstat.isSymbolicLink()) { try { stat = fs.statSync(abs) } catch (er) { stat = lstat } } else { stat = lstat } } this.statCache[abs] = stat var c = true if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE' this.cache[abs] = this.cache[abs] || c if (needDir && c === 'FILE') return false return c } GlobSync.prototype._mark = function (p) { return common.mark(this, p) } GlobSync.prototype._makeAbs = function (f) { return common.makeAbs(this, f) } /***/ }), /***/ 97152: /***/ ((module) => { "use strict"; class CancelError extends Error { constructor(reason) { super(reason || 'Promise was canceled'); this.name = 'CancelError'; } get isCanceled() { return true; } } class PCancelable { static fn(userFn) { return (...args) => { return new PCancelable((resolve, reject, onCancel) => { args.push(onCancel); userFn(...args).then(resolve, reject); }); }; } constructor(executor) { this._cancelHandlers = []; this._isPending = true; this._isCanceled = false; this._rejectOnCancel = true; this._promise = new Promise((resolve, reject) => { this._reject = reject; const onResolve = value => { this._isPending = false; resolve(value); }; const onReject = error => { this._isPending = false; reject(error); }; const onCancel = handler => { this._cancelHandlers.push(handler); }; Object.defineProperties(onCancel, { shouldReject: { get: () => this._rejectOnCancel, set: bool => { this._rejectOnCancel = bool; } } }); return executor(onResolve, onReject, onCancel); }); } then(onFulfilled, onRejected) { return this._promise.then(onFulfilled, onRejected); } catch(onRejected) { return this._promise.catch(onRejected); } finally(onFinally) { return this._promise.finally(onFinally); } cancel(reason) { if (!this._isPending || this._isCanceled) { return; } if (this._cancelHandlers.length > 0) { try { for (const handler of this._cancelHandlers) { handler(); } } catch (error) { this._reject(error); } } this._isCanceled = true; if (this._rejectOnCancel) { this._reject(new CancelError(reason)); } } get isCanceled() { return this._isCanceled; } } Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); module.exports = PCancelable; module.exports.default = PCancelable; module.exports.CancelError = CancelError; /***/ }), /***/ 32013: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const getStream = __webpack_require__(21766); const is = __webpack_require__(7678); const PCancelable = __webpack_require__(97152); const requestAsEventEmitter = __webpack_require__(45296); const {HTTPError, ParseError, ReadError} = __webpack_require__(57083); const {options: mergeOptions} = __webpack_require__(47339); const {reNormalize} = __webpack_require__(76034); const asPromise = options => { const proxy = new EventEmitter(); const promise = new PCancelable((resolve, reject, onCancel) => { const emitter = requestAsEventEmitter(options); onCancel(emitter.abort); emitter.on('response', async response => { proxy.emit('response', response); const stream = is.null(options.encoding) ? getStream.buffer(response) : getStream(response, options); let data; try { data = await stream; } catch (error) { reject(new ReadError(error, options)); return; } const limitStatusCode = options.followRedirect ? 299 : 399; response.body = data; try { for (const [index, hook] of Object.entries(options.hooks.afterResponse)) { // eslint-disable-next-line no-await-in-loop response = await hook(response, updatedOptions => { updatedOptions = reNormalize(mergeOptions(options, { ...updatedOptions, retry: 0, throwHttpErrors: false })); // Remove any further hooks for that request, because we we'll call them anyway. // The loop continues. We don't want duplicates (asPromise recursion). updatedOptions.hooks.afterResponse = options.hooks.afterResponse.slice(0, index); return asPromise(updatedOptions); }); } } catch (error) { reject(error); return; } const {statusCode} = response; if (options.json && response.body) { try { response.body = JSON.parse(response.body); } catch (error) { if (statusCode >= 200 && statusCode < 300) { const parseError = new ParseError(error, statusCode, options, data); Object.defineProperty(parseError, 'response', {value: response}); reject(parseError); return; } } } if (statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) { const error = new HTTPError(response, options); Object.defineProperty(error, 'response', {value: response}); if (emitter.retry(error) === false) { if (options.throwHttpErrors) { reject(error); return; } resolve(response); } return; } resolve(response); }); emitter.once('error', reject); [ 'request', 'redirect', 'uploadProgress', 'downloadProgress' ].forEach(event => emitter.on(event, (...args) => proxy.emit(event, ...args))); }); promise.on = (name, fn) => { proxy.on(name, fn); return promise; }; return promise; }; module.exports = asPromise; /***/ }), /***/ 93900: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {PassThrough} = __webpack_require__(92413); const duplexer3 = __webpack_require__(7994); const requestAsEventEmitter = __webpack_require__(45296); const {HTTPError, ReadError} = __webpack_require__(57083); module.exports = options => { const input = new PassThrough(); const output = new PassThrough(); const proxy = duplexer3(input, output); const piped = new Set(); let isFinished = false; options.retry.retries = () => 0; if (options.body) { proxy.write = () => { throw new Error('Got\'s stream is not writable when the `body` option is used'); }; } const emitter = requestAsEventEmitter(options, input); // Cancels the request proxy._destroy = emitter.abort; emitter.on('response', response => { const {statusCode} = response; response.on('error', error => { proxy.emit('error', new ReadError(error, options)); }); if (options.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > 299)) { proxy.emit('error', new HTTPError(response, options), null, response); return; } isFinished = true; response.pipe(output); for (const destination of piped) { if (destination.headersSent) { continue; } for (const [key, value] of Object.entries(response.headers)) { // Got gives *decompressed* data. Overriding `content-encoding` header would result in an error. // It's not possible to decompress already decompressed data, is it? const allowed = options.decompress ? key !== 'content-encoding' : true; if (allowed) { destination.setHeader(key, value); } } destination.statusCode = response.statusCode; } proxy.emit('response', response); }); [ 'error', 'request', 'redirect', 'uploadProgress', 'downloadProgress' ].forEach(event => emitter.on(event, (...args) => proxy.emit(event, ...args))); const pipe = proxy.pipe.bind(proxy); const unpipe = proxy.unpipe.bind(proxy); proxy.pipe = (destination, options) => { if (isFinished) { throw new Error('Failed to pipe. The response has been emitted already.'); } const result = pipe(destination, options); if (Reflect.has(destination, 'setHeader')) { piped.add(destination); } return result; }; proxy.unpipe = stream => { piped.delete(stream); return unpipe(stream); }; return proxy; }; /***/ }), /***/ 36030: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const errors = __webpack_require__(57083); const asStream = __webpack_require__(93900); const asPromise = __webpack_require__(32013); const normalizeArguments = __webpack_require__(76034); const merge = __webpack_require__(47339); const deepFreeze = __webpack_require__(53970); const getPromiseOrStream = options => options.stream ? asStream(options) : asPromise(options); const aliases = [ 'get', 'post', 'put', 'patch', 'head', 'delete' ]; const create = defaults => { defaults = merge({}, defaults); normalizeArguments.preNormalize(defaults.options); if (!defaults.handler) { // This can't be getPromiseOrStream, because when merging // the chain would stop at this point and no further handlers would be called. defaults.handler = (options, next) => next(options); } function got(url, options) { try { return defaults.handler(normalizeArguments(url, options, defaults), getPromiseOrStream); } catch (error) { if (options && options.stream) { throw error; } else { return Promise.reject(error); } } } got.create = create; got.extend = options => { let mutableDefaults; if (options && Reflect.has(options, 'mutableDefaults')) { mutableDefaults = options.mutableDefaults; delete options.mutableDefaults; } else { mutableDefaults = defaults.mutableDefaults; } return create({ options: merge.options(defaults.options, options), handler: defaults.handler, mutableDefaults }); }; got.mergeInstances = (...args) => create(merge.instances(args)); got.stream = (url, options) => got(url, {...options, stream: true}); for (const method of aliases) { got[method] = (url, options) => got(url, {...options, method}); got.stream[method] = (url, options) => got.stream(url, {...options, method}); } Object.assign(got, {...errors, mergeOptions: merge.options}); Object.defineProperty(got, 'defaults', { value: defaults.mutableDefaults ? defaults : deepFreeze(defaults), writable: defaults.mutableDefaults, configurable: defaults.mutableDefaults, enumerable: true }); return got; }; module.exports = create; /***/ }), /***/ 57083: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const urlLib = __webpack_require__(78835); const http = __webpack_require__(98605); const PCancelable = __webpack_require__(97152); const is = __webpack_require__(7678); class GotError extends Error { constructor(message, error, options) { super(message); Error.captureStackTrace(this, this.constructor); this.name = 'GotError'; if (!is.undefined(error.code)) { this.code = error.code; } Object.assign(this, { host: options.host, hostname: options.hostname, method: options.method, path: options.path, socketPath: options.socketPath, protocol: options.protocol, url: options.href, gotOptions: options }); } } module.exports.GotError = GotError; module.exports.CacheError = class extends GotError { constructor(error, options) { super(error.message, error, options); this.name = 'CacheError'; } }; module.exports.RequestError = class extends GotError { constructor(error, options) { super(error.message, error, options); this.name = 'RequestError'; } }; module.exports.ReadError = class extends GotError { constructor(error, options) { super(error.message, error, options); this.name = 'ReadError'; } }; module.exports.ParseError = class extends GotError { constructor(error, statusCode, options, data) { super(`${error.message} in "${urlLib.format(options)}": \n${data.slice(0, 77)}...`, error, options); this.name = 'ParseError'; this.statusCode = statusCode; this.statusMessage = http.STATUS_CODES[this.statusCode]; } }; module.exports.HTTPError = class extends GotError { constructor(response, options) { const {statusCode} = response; let {statusMessage} = response; if (statusMessage) { statusMessage = statusMessage.replace(/\r?\n/g, ' ').trim(); } else { statusMessage = http.STATUS_CODES[statusCode]; } super(`Response code ${statusCode} (${statusMessage})`, {}, options); this.name = 'HTTPError'; this.statusCode = statusCode; this.statusMessage = statusMessage; this.headers = response.headers; this.body = response.body; } }; module.exports.MaxRedirectsError = class extends GotError { constructor(statusCode, redirectUrls, options) { super('Redirected 10 times. Aborting.', {}, options); this.name = 'MaxRedirectsError'; this.statusCode = statusCode; this.statusMessage = http.STATUS_CODES[this.statusCode]; this.redirectUrls = redirectUrls; } }; module.exports.UnsupportedProtocolError = class extends GotError { constructor(options) { super(`Unsupported protocol "${options.protocol}"`, {}, options); this.name = 'UnsupportedProtocolError'; } }; module.exports.TimeoutError = class extends GotError { constructor(error, options) { super(error.message, {code: 'ETIMEDOUT'}, options); this.name = 'TimeoutError'; this.event = error.event; } }; module.exports.CancelError = PCancelable.CancelError; /***/ }), /***/ 46715: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const decompressResponse = __webpack_require__(82391); const is = __webpack_require__(7678); const mimicResponse = __webpack_require__(42610); const progress = __webpack_require__(12308); module.exports = (response, options, emitter) => { const downloadBodySize = Number(response.headers['content-length']) || null; const progressStream = progress.download(response, emitter, downloadBodySize); mimicResponse(response, progressStream); const newResponse = options.decompress === true && is.function(decompressResponse) && options.method !== 'HEAD' ? decompressResponse(progressStream) : progressStream; if (!options.decompress && ['gzip', 'deflate'].includes(response.headers['content-encoding'])) { options.encoding = null; } emitter.emit('response', newResponse); emitter.emit('downloadProgress', { percent: 0, transferred: 0, total: downloadBodySize }); response.pipe(progressStream); }; /***/ }), /***/ 44462: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const pkg = __webpack_require__(9248); const create = __webpack_require__(36030); const defaults = { options: { retry: { retries: 2, methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ], statusCodes: [ 408, 413, 429, 500, 502, 503, 504 ], errorCodes: [ 'ETIMEDOUT', 'ECONNRESET', 'EADDRINUSE', 'ECONNREFUSED', 'EPIPE', 'ENOTFOUND', 'ENETUNREACH', 'EAI_AGAIN' ] }, headers: { 'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)` }, hooks: { beforeRequest: [], beforeRedirect: [], beforeRetry: [], afterResponse: [] }, decompress: true, throwHttpErrors: true, followRedirect: true, stream: false, form: false, json: false, cache: false, useElectronNet: false }, mutableDefaults: false }; const got = create(defaults); module.exports = got; /***/ }), /***/ 21924: /***/ ((module) => { "use strict"; module.exports = [ 'beforeError', 'init', 'beforeRequest', 'beforeRedirect', 'beforeRetry', 'afterResponse' ]; /***/ }), /***/ 47339: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {URL} = __webpack_require__(78835); const is = __webpack_require__(7678); const knownHookEvents = __webpack_require__(21924); const merge = (target, ...sources) => { for (const source of sources) { for (const [key, sourceValue] of Object.entries(source)) { if (is.undefined(sourceValue)) { continue; } const targetValue = target[key]; if (is.urlInstance(targetValue) && (is.urlInstance(sourceValue) || is.string(sourceValue))) { target[key] = new URL(sourceValue, targetValue); } else if (is.plainObject(sourceValue)) { if (is.plainObject(targetValue)) { target[key] = merge({}, targetValue, sourceValue); } else { target[key] = merge({}, sourceValue); } } else if (is.array(sourceValue)) { target[key] = merge([], sourceValue); } else { target[key] = sourceValue; } } } return target; }; const mergeOptions = (...sources) => { sources = sources.map(source => source || {}); const merged = merge({}, ...sources); const hooks = {}; for (const hook of knownHookEvents) { hooks[hook] = []; } for (const source of sources) { if (source.hooks) { for (const hook of knownHookEvents) { hooks[hook] = hooks[hook].concat(source.hooks[hook]); } } } merged.hooks = hooks; return merged; }; const mergeInstances = (instances, methods) => { const handlers = instances.map(instance => instance.defaults.handler); const size = instances.length - 1; return { methods, options: mergeOptions(...instances.map(instance => instance.defaults.options)), handler: (options, next) => { let iteration = -1; const iterate = options => handlers[++iteration](options, iteration === size ? next : iterate); return iterate(options); } }; }; module.exports = merge; module.exports.options = mergeOptions; module.exports.instances = mergeInstances; /***/ }), /***/ 76034: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {URL, URLSearchParams} = __webpack_require__(78835); // TODO: Use the `URL` global when targeting Node.js 10 const urlLib = __webpack_require__(78835); const is = __webpack_require__(7678); const urlParseLax = __webpack_require__(13194); const lowercaseKeys = __webpack_require__(9662); const urlToOptions = __webpack_require__(65491); const isFormData = __webpack_require__(18272); const merge = __webpack_require__(47339); const knownHookEvents = __webpack_require__(21924); const retryAfterStatusCodes = new Set([413, 429, 503]); // `preNormalize` handles static options (e.g. headers). // For example, when you create a custom instance and make a request // with no static changes, they won't be normalized again. // // `normalize` operates on dynamic options - they cannot be saved. // For example, `body` is everytime different per request. // When it's done normalizing the new options, it performs merge() // on the prenormalized options and the normalized ones. const preNormalize = (options, defaults) => { if (is.nullOrUndefined(options.headers)) { options.headers = {}; } else { options.headers = lowercaseKeys(options.headers); } if (options.baseUrl && !options.baseUrl.toString().endsWith('/')) { options.baseUrl += '/'; } if (options.stream) { options.json = false; } if (is.nullOrUndefined(options.hooks)) { options.hooks = {}; } else if (!is.object(options.hooks)) { throw new TypeError(`Parameter \`hooks\` must be an object, not ${is(options.hooks)}`); } for (const event of knownHookEvents) { if (is.nullOrUndefined(options.hooks[event])) { if (defaults) { options.hooks[event] = [...defaults.hooks[event]]; } else { options.hooks[event] = []; } } } if (is.number(options.timeout)) { options.gotTimeout = {request: options.timeout}; } else if (is.object(options.timeout)) { options.gotTimeout = options.timeout; } delete options.timeout; const {retry} = options; options.retry = { retries: 0, methods: [], statusCodes: [], errorCodes: [] }; if (is.nonEmptyObject(defaults) && retry !== false) { options.retry = {...defaults.retry}; } if (retry !== false) { if (is.number(retry)) { options.retry.retries = retry; } else { options.retry = {...options.retry, ...retry}; } } if (options.gotTimeout) { options.retry.maxRetryAfter = Math.min(...[options.gotTimeout.request, options.gotTimeout.connection].filter(n => !is.nullOrUndefined(n))); } if (is.array(options.retry.methods)) { options.retry.methods = new Set(options.retry.methods.map(method => method.toUpperCase())); } if (is.array(options.retry.statusCodes)) { options.retry.statusCodes = new Set(options.retry.statusCodes); } if (is.array(options.retry.errorCodes)) { options.retry.errorCodes = new Set(options.retry.errorCodes); } return options; }; const normalize = (url, options, defaults) => { if (is.plainObject(url)) { options = {...url, ...options}; url = options.url || {}; delete options.url; } if (defaults) { options = merge({}, defaults.options, options ? preNormalize(options, defaults.options) : {}); } else { options = merge({}, preNormalize(options)); } if (!is.string(url) && !is.object(url)) { throw new TypeError(`Parameter \`url\` must be a string or object, not ${is(url)}`); } if (is.string(url)) { if (options.baseUrl) { if (url.toString().startsWith('/')) { url = url.toString().slice(1); } url = urlToOptions(new URL(url, options.baseUrl)); } else { url = url.replace(/^unix:/, 'http://$&'); url = urlParseLax(url); } } else if (is(url) === 'URL') { url = urlToOptions(url); } // Override both null/undefined with default protocol options = merge({path: ''}, url, {protocol: url.protocol || 'https:'}, options); for (const hook of options.hooks.init) { const called = hook(options); if (is.promise(called)) { throw new TypeError('The `init` hook must be a synchronous function'); } } const {baseUrl} = options; Object.defineProperty(options, 'baseUrl', { set: () => { throw new Error('Failed to set baseUrl. Options are normalized already.'); }, get: () => baseUrl }); const {query} = options; if (is.nonEmptyString(query) || is.nonEmptyObject(query) || query instanceof URLSearchParams) { if (!is.string(query)) { options.query = (new URLSearchParams(query)).toString(); } options.path = `${options.path.split('?')[0]}?${options.query}`; delete options.query; } if (options.hostname === 'unix') { const matches = /(.+?):(.+)/.exec(options.path); if (matches) { const [, socketPath, path] = matches; options = { ...options, socketPath, path, host: null }; } } const {headers} = options; for (const [key, value] of Object.entries(headers)) { if (is.nullOrUndefined(value)) { delete headers[key]; } } if (options.json && is.undefined(headers.accept)) { headers.accept = 'application/json'; } if (options.decompress && is.undefined(headers['accept-encoding'])) { headers['accept-encoding'] = 'gzip, deflate'; } const {body} = options; if (is.nullOrUndefined(body)) { options.method = options.method ? options.method.toUpperCase() : 'GET'; } else { const isObject = is.object(body) && !is.buffer(body) && !is.nodeStream(body); if (!is.nodeStream(body) && !is.string(body) && !is.buffer(body) && !(options.form || options.json)) { throw new TypeError('The `body` option must be a stream.Readable, string or Buffer'); } if (options.json && !(isObject || is.array(body))) { throw new TypeError('The `body` option must be an Object or Array when the `json` option is used'); } if (options.form && !isObject) { throw new TypeError('The `body` option must be an Object when the `form` option is used'); } if (isFormData(body)) { // Special case for https://github.com/form-data/form-data headers['content-type'] = headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`; } else if (options.form) { headers['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded'; options.body = (new URLSearchParams(body)).toString(); } else if (options.json) { headers['content-type'] = headers['content-type'] || 'application/json'; options.body = JSON.stringify(body); } options.method = options.method ? options.method.toUpperCase() : 'POST'; } if (!is.function(options.retry.retries)) { const {retries} = options.retry; options.retry.retries = (iteration, error) => { if (iteration > retries) { return 0; } if ((!error || !options.retry.errorCodes.has(error.code)) && (!options.retry.methods.has(error.method) || !options.retry.statusCodes.has(error.statusCode))) { return 0; } if (Reflect.has(error, 'headers') && Reflect.has(error.headers, 'retry-after') && retryAfterStatusCodes.has(error.statusCode)) { let after = Number(error.headers['retry-after']); if (is.nan(after)) { after = Date.parse(error.headers['retry-after']) - Date.now(); } else { after *= 1000; } if (after > options.retry.maxRetryAfter) { return 0; } return after; } if (error.statusCode === 413) { return 0; } const noise = Math.random() * 100; return ((2 ** (iteration - 1)) * 1000) + noise; }; } return options; }; const reNormalize = options => normalize(urlLib.format(options), options); module.exports = normalize; module.exports.preNormalize = preNormalize; module.exports.reNormalize = reNormalize; /***/ }), /***/ 12308: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Transform} = __webpack_require__(92413); module.exports = { download(response, emitter, downloadBodySize) { let downloaded = 0; return new Transform({ transform(chunk, encoding, callback) { downloaded += chunk.length; const percent = downloadBodySize ? downloaded / downloadBodySize : 0; // Let `flush()` be responsible for emitting the last event if (percent < 1) { emitter.emit('downloadProgress', { percent, transferred: downloaded, total: downloadBodySize }); } callback(null, chunk); }, flush(callback) { emitter.emit('downloadProgress', { percent: 1, transferred: downloaded, total: downloadBodySize }); callback(); } }); }, upload(request, emitter, uploadBodySize) { const uploadEventFrequency = 150; let uploaded = 0; let progressInterval; emitter.emit('uploadProgress', { percent: 0, transferred: 0, total: uploadBodySize }); request.once('error', () => { clearInterval(progressInterval); }); request.once('response', () => { clearInterval(progressInterval); emitter.emit('uploadProgress', { percent: 1, transferred: uploaded, total: uploadBodySize }); }); request.once('socket', socket => { const onSocketConnect = () => { progressInterval = setInterval(() => { const lastUploaded = uploaded; /* istanbul ignore next: see #490 (occurs randomly!) */ const headersSize = request._header ? Buffer.byteLength(request._header) : 0; uploaded = socket.bytesWritten - headersSize; // Don't emit events with unchanged progress and // prevent last event from being emitted, because // it's emitted when `response` is emitted if (uploaded === lastUploaded || uploaded === uploadBodySize) { return; } emitter.emit('uploadProgress', { percent: uploadBodySize ? uploaded / uploadBodySize : 0, transferred: uploaded, total: uploadBodySize }); }, uploadEventFrequency); }; /* istanbul ignore next: hard to test */ if (socket.connecting) { socket.once('connect', onSocketConnect); } else if (socket.writable) { // The socket is being reused from pool, // so the connect event will not be emitted onSocketConnect(); } }); } }; /***/ }), /***/ 45296: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {URL} = __webpack_require__(78835); // TODO: Use the `URL` global when targeting Node.js 10 const util = __webpack_require__(31669); const EventEmitter = __webpack_require__(28614); const http = __webpack_require__(98605); const https = __webpack_require__(57211); const urlLib = __webpack_require__(78835); const CacheableRequest = __webpack_require__(78116); const toReadableStream = __webpack_require__(53158); const is = __webpack_require__(7678); const timer = __webpack_require__(19308); const timedOut = __webpack_require__(44477); const getBodySize = __webpack_require__(78891); const getResponse = __webpack_require__(46715); const progress = __webpack_require__(12308); const {CacheError, UnsupportedProtocolError, MaxRedirectsError, RequestError, TimeoutError} = __webpack_require__(57083); const urlToOptions = __webpack_require__(65491); const getMethodRedirectCodes = new Set([300, 301, 302, 303, 304, 305, 307, 308]); const allMethodRedirectCodes = new Set([300, 303, 307, 308]); module.exports = (options, input) => { const emitter = new EventEmitter(); const redirects = []; let currentRequest; let requestUrl; let redirectString; let uploadBodySize; let retryCount = 0; let shouldAbort = false; const setCookie = options.cookieJar ? util.promisify(options.cookieJar.setCookie.bind(options.cookieJar)) : null; const getCookieString = options.cookieJar ? util.promisify(options.cookieJar.getCookieString.bind(options.cookieJar)) : null; const agents = is.object(options.agent) ? options.agent : null; const emitError = async error => { try { for (const hook of options.hooks.beforeError) { // eslint-disable-next-line no-await-in-loop error = await hook(error); } emitter.emit('error', error); } catch (error2) { emitter.emit('error', error2); } }; const get = async options => { const currentUrl = redirectString || requestUrl; if (options.protocol !== 'http:' && options.protocol !== 'https:') { throw new UnsupportedProtocolError(options); } decodeURI(currentUrl); let fn; if (is.function(options.request)) { fn = {request: options.request}; } else { fn = options.protocol === 'https:' ? https : http; } if (agents) { const protocolName = options.protocol === 'https:' ? 'https' : 'http'; options.agent = agents[protocolName] || options.agent; } /* istanbul ignore next: electron.net is broken */ if (options.useElectronNet && process.versions.electron) { const r = ({x: require})['yx'.slice(1)]; // Trick webpack const electron = r('electron'); fn = electron.net || electron.remote.net; } if (options.cookieJar) { const cookieString = await getCookieString(currentUrl, {}); if (is.nonEmptyString(cookieString)) { options.headers.cookie = cookieString; } } let timings; const handleResponse = async response => { try { /* istanbul ignore next: fixes https://github.com/electron/electron/blob/cbb460d47628a7a146adf4419ed48550a98b2923/lib/browser/api/net.js#L59-L65 */ if (options.useElectronNet) { response = new Proxy(response, { get: (target, name) => { if (name === 'trailers' || name === 'rawTrailers') { return []; } const value = target[name]; return is.function(value) ? value.bind(target) : value; } }); } const {statusCode} = response; response.url = currentUrl; response.requestUrl = requestUrl; response.retryCount = retryCount; response.timings = timings; response.redirectUrls = redirects; response.request = { gotOptions: options }; const rawCookies = response.headers['set-cookie']; if (options.cookieJar && rawCookies) { await Promise.all(rawCookies.map(rawCookie => setCookie(rawCookie, response.url))); } if (options.followRedirect && 'location' in response.headers) { if (allMethodRedirectCodes.has(statusCode) || (getMethodRedirectCodes.has(statusCode) && (options.method === 'GET' || options.method === 'HEAD'))) { response.resume(); // We're being redirected, we don't care about the response. if (statusCode === 303) { // 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 (redirects.length >= 10) { throw new MaxRedirectsError(statusCode, redirects, options); } // Handles invalid URLs. See https://github.com/sindresorhus/got/issues/604 const redirectBuffer = Buffer.from(response.headers.location, 'binary').toString(); const redirectURL = new URL(redirectBuffer, currentUrl); redirectString = redirectURL.toString(); redirects.push(redirectString); const redirectOptions = { ...options, ...urlToOptions(redirectURL) }; for (const hook of options.hooks.beforeRedirect) { // eslint-disable-next-line no-await-in-loop await hook(redirectOptions); } emitter.emit('redirect', response, redirectOptions); await get(redirectOptions); return; } } getResponse(response, options, emitter); } catch (error) { emitError(error); } }; const handleRequest = request => { if (shouldAbort) { request.once('error', () => {}); request.abort(); return; } currentRequest = request; request.once('error', error => { if (request.aborted) { return; } if (error instanceof timedOut.TimeoutError) { error = new TimeoutError(error, options); } else { error = new RequestError(error, options); } if (emitter.retry(error) === false) { emitError(error); } }); timings = timer(request); progress.upload(request, emitter, uploadBodySize); if (options.gotTimeout) { timedOut(request, options.gotTimeout, options); } emitter.emit('request', request); const uploadComplete = () => { request.emit('upload-complete'); }; try { if (is.nodeStream(options.body)) { options.body.once('end', uploadComplete); options.body.pipe(request); options.body = undefined; } else if (options.body) { request.end(options.body, uploadComplete); } else if (input && (options.method === 'POST' || options.method === 'PUT' || options.method === 'PATCH')) { input.once('end', uploadComplete); input.pipe(request); } else { request.end(uploadComplete); } } catch (error) { emitError(new RequestError(error, options)); } }; if (options.cache) { const cacheableRequest = new CacheableRequest(fn.request, options.cache); const cacheRequest = cacheableRequest(options, handleResponse); cacheRequest.once('error', error => { if (error instanceof CacheableRequest.RequestError) { emitError(new RequestError(error, options)); } else { emitError(new CacheError(error, options)); } }); cacheRequest.once('request', handleRequest); } else { // Catches errors thrown by calling fn.request(...) try { handleRequest(fn.request(options, handleResponse)); } catch (error) { emitError(new RequestError(error, options)); } } }; emitter.retry = error => { let backoff; try { backoff = options.retry.retries(++retryCount, error); } catch (error2) { emitError(error2); return; } if (backoff) { const retry = async options => { try { for (const hook of options.hooks.beforeRetry) { // eslint-disable-next-line no-await-in-loop await hook(options, error, retryCount); } await get(options); } catch (error) { emitError(error); } }; setTimeout(retry, backoff, {...options, forceRefresh: true}); return true; } return false; }; emitter.abort = () => { if (currentRequest) { currentRequest.once('error', () => {}); currentRequest.abort(); } else { shouldAbort = true; } }; setImmediate(async () => { try { // Convert buffer to stream to receive upload progress events (#322) const {body} = options; if (is.buffer(body)) { options.body = toReadableStream(body); uploadBodySize = body.length; } else { uploadBodySize = await getBodySize(options); } if (is.undefined(options.headers['content-length']) && is.undefined(options.headers['transfer-encoding'])) { if ((uploadBodySize > 0 || options.method === 'PUT') && !is.null(uploadBodySize)) { options.headers['content-length'] = uploadBodySize; } } for (const hook of options.hooks.beforeRequest) { // eslint-disable-next-line no-await-in-loop await hook(options); } requestUrl = options.href || (new URL(options.path, urlLib.format(options))).toString(); await get(options); } catch (error) { emitError(error); } }); return emitter; }; /***/ }), /***/ 53970: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const is = __webpack_require__(7678); module.exports = function deepFreeze(object) { for (const [key, value] of Object.entries(object)) { if (is.plainObject(value) || is.array(value)) { deepFreeze(object[key]); } } return Object.freeze(object); }; /***/ }), /***/ 78891: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fs = __webpack_require__(35747); const util = __webpack_require__(31669); const is = __webpack_require__(7678); const isFormData = __webpack_require__(18272); module.exports = async options => { const {body} = options; if (options.headers['content-length']) { return Number(options.headers['content-length']); } if (!body && !options.stream) { return 0; } if (is.string(body)) { return Buffer.byteLength(body); } if (isFormData(body)) { return util.promisify(body.getLength.bind(body))(); } if (body instanceof fs.ReadStream) { const {size} = await util.promisify(fs.stat)(body.path); return size; } return null; }; /***/ }), /***/ 18272: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const is = __webpack_require__(7678); module.exports = body => is.nodeStream(body) && is.function(body.getBoundary); /***/ }), /***/ 44477: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const net = __webpack_require__(11631); class TimeoutError extends Error { constructor(threshold, event) { super(`Timeout awaiting '${event}' for ${threshold}ms`); this.name = 'TimeoutError'; this.code = 'ETIMEDOUT'; this.event = event; } } const reentry = Symbol('reentry'); const noop = () => {}; module.exports = (request, delays, options) => { /* istanbul ignore next: this makes sure timed-out isn't called twice */ if (request[reentry]) { return; } request[reentry] = true; let stopNewTimeouts = false; const addTimeout = (delay, callback, ...args) => { // An error had been thrown before. Going further would result in uncaught errors. // See https://github.com/sindresorhus/got/issues/631#issuecomment-435675051 if (stopNewTimeouts) { return noop; } // Event loop order is timers, poll, immediates. // The timed event may emit during the current tick poll phase, so // defer calling the handler until the poll phase completes. let immediate; const timeout = setTimeout(() => { immediate = setImmediate(callback, delay, ...args); /* istanbul ignore next: added in node v9.7.0 */ if (immediate.unref) { immediate.unref(); } }, delay); /* istanbul ignore next: in order to support electron renderer */ if (timeout.unref) { timeout.unref(); } const cancel = () => { clearTimeout(timeout); clearImmediate(immediate); }; cancelers.push(cancel); return cancel; }; const {host, hostname} = options; const timeoutHandler = (delay, event) => { request.emit('error', new TimeoutError(delay, event)); request.once('error', () => {}); // Ignore the `socket hung up` error made by request.abort() request.abort(); }; const cancelers = []; const cancelTimeouts = () => { stopNewTimeouts = true; cancelers.forEach(cancelTimeout => cancelTimeout()); }; request.once('error', cancelTimeouts); request.once('response', response => { response.once('end', cancelTimeouts); }); if (delays.request !== undefined) { addTimeout(delays.request, timeoutHandler, 'request'); } if (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)); } if (delays.lookup !== undefined && !request.socketPath && !net.isIP(hostname || host)) { request.once('socket', socket => { /* istanbul ignore next: hard to test */ if (socket.connecting) { const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup'); socket.once('lookup', cancelTimeout); } }); } if (delays.connect !== undefined) { request.once('socket', socket => { /* istanbul ignore next: hard to test */ if (socket.connecting) { const timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect'); if (request.socketPath || net.isIP(hostname || host)) { socket.once('connect', timeConnect()); } else { socket.once('lookup', error => { if (error === null) { socket.once('connect', timeConnect()); } }); } } }); } if (delays.secureConnect !== undefined && options.protocol === 'https:') { request.once('socket', socket => { /* istanbul ignore next: hard to test */ if (socket.connecting) { socket.once('connect', () => { const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect'); socket.once('secureConnect', cancelTimeout); }); } }); } if (delays.send !== undefined) { request.once('socket', socket => { const timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send'); /* istanbul ignore next: hard to test */ if (socket.connecting) { socket.once('connect', () => { request.once('upload-complete', timeRequest()); }); } else { request.once('upload-complete', timeRequest()); } }); } if (delays.response !== undefined) { request.once('upload-complete', () => { const cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response'); request.once('response', cancelTimeout); }); } }; module.exports.TimeoutError = TimeoutError; /***/ }), /***/ 65491: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const is = __webpack_require__(7678); module.exports = url => { const options = { protocol: url.protocol, hostname: url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, hash: url.hash, search: url.search, pathname: url.pathname, href: url.href }; if (is.string(url.port) && url.port.length > 0) { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${url.username}:${url.password}`; } options.path = is.null(url.search) ? url.pathname : `${url.pathname}${url.search}`; return options; }; /***/ }), /***/ 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) } /***/ }), /***/ 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__(33373); 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__(33373); 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)); } }; /***/ }), /***/ 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 } } } /***/ }), /***/ 48840: /***/ ((module) => { "use strict"; /*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function isObject(val) { return val != null && typeof val === 'object' && Array.isArray(val) === false; } /*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function isObjectObject(o) { return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]'; } function isPlainObject(o) { var ctor,prot; if (isObjectObject(o) === false) return false; // If has modified constructor ctor = o.constructor; if (typeof ctor !== 'function') return false; // If has modified prototype prot = ctor.prototype; if (isObjectObject(prot) === false) return false; // If constructor does not have an Object-specific method if (prot.hasOwnProperty('isPrototypeOf') === false) { return false; } // Most likely a plain Object return true; } module.exports = isPlainObject; /***/ }), /***/ 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)] } /***/ }), /***/ 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 /***/ }), /***/ 52973: /***/ ((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 {} /***/ }), /***/ 68207: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const oids = __webpack_require__(72967) module.exports = function () { this.seq().obj( this.key('algorithm').objid(oids), this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() }) ) } /***/ }), /***/ 37707: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const oids = __webpack_require__(72967) 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() ) } /***/ }), /***/ 16416: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const asn1 = __webpack_require__(39436) const types = new Map() const AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', __webpack_require__(68207)) types.set('AlgorithmIdentifier', AlgorithmIdentifier) const ECPrivateKey = asn1.define('ECPrivateKey', __webpack_require__(37707)) types.set('ECPrivateKey', ECPrivateKey) const PrivateKeyInfo = asn1.define('PrivateKeyInfo', __webpack_require__(58570)(AlgorithmIdentifier)) types.set('PrivateKeyInfo', PrivateKeyInfo) const PublicKeyInfo = asn1.define('PublicKeyInfo', __webpack_require__(5641)(AlgorithmIdentifier)) types.set('PublicKeyInfo', PublicKeyInfo) const PrivateKey = asn1.define('PrivateKey', __webpack_require__(62624)) types.set('PrivateKey', PrivateKey) const OneAsymmetricKey = asn1.define('OneAsymmetricKey', __webpack_require__(30424)(AlgorithmIdentifier, PrivateKey)) types.set('OneAsymmetricKey', OneAsymmetricKey) const RSAPrivateKey = asn1.define('RSAPrivateKey', __webpack_require__(29822)) types.set('RSAPrivateKey', RSAPrivateKey) const RSAPublicKey = asn1.define('RSAPublicKey', __webpack_require__(39542)) types.set('RSAPublicKey', RSAPublicKey) module.exports = types /***/ }), /***/ 72967: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { name: secp256k1 } = __webpack_require__(2044) 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 /***/ }), /***/ 30424: /***/ ((module) => { module.exports = (AlgorithmIdentifier, PrivateKey) => function () { this.seq().obj( this.key('version').int(), this.key('algorithm').use(AlgorithmIdentifier), this.key('privateKey').use(PrivateKey) ) } /***/ }), /***/ 62624: /***/ ((module) => { module.exports = function () { this.octstr().contains().obj( this.key('privateKey').octstr() ) } /***/ }), /***/ 58570: /***/ ((module) => { module.exports = (AlgorithmIdentifier) => function () { this.seq().obj( this.key('version').int(), this.key('algorithm').use(AlgorithmIdentifier), this.key('privateKey').octstr() ) } /***/ }), /***/ 5641: /***/ ((module) => { module.exports = AlgorithmIdentifier => function () { this.seq().obj( this.key('algorithm').use(AlgorithmIdentifier), this.key('publicKey').bitstr() ) } /***/ }), /***/ 29822: /***/ ((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() ) } /***/ }), /***/ 39542: /***/ ((module) => { module.exports = function () { this.seq().obj( this.key('n').int(), this.key('e').int() ) } /***/ }), /***/ 73385: /***/ ((module) => { /* global BigInt */ const fromBase64 = (base64) => { return base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') } const encode = (input, encoding = 'utf8') => { return fromBase64(Buffer.from(input, encoding).toString('base64')) } const encodeBuffer = (buf) => { return 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 /***/ }), /***/ 15010: /***/ ((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 /***/ }), /***/ 43653: /***/ ((module) => { module.exports = obj => JSON.parse(JSON.stringify(obj)) /***/ }), /***/ 14451: /***/ ((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 } /***/ }), /***/ 47396: /***/ ((module) => { module.exports = (date) => Math.floor(date.getTime() / 1000) /***/ }), /***/ 93137: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(33373) const { IVLENGTHS } = __webpack_require__(15501) module.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8) /***/ }), /***/ 31308: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const errors = __webpack_require__(52973) const Key = __webpack_require__(57841) const importKey = __webpack_require__(13468) const { KeyStore } = __webpack_require__(24998) 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) } } /***/ }), /***/ 56149: /***/ ((module) => { module.exports = (a = {}, b = {}) => { const keysA = Object.keys(a) const keysB = new Set(Object.keys(b)) return !keysA.some((ka) => keysB.has(ka)) } /***/ }), /***/ 41805: /***/ ((module) => { module.exports = a => !!a && a.constructor === Object /***/ }), /***/ 98921: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* global BigInt */ const { keyObjectSupported } = __webpack_require__(32457) let createPublicKey let createPrivateKey let createSecretKey let KeyObject let asInput if (keyObjectSupported) { ({ createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __webpack_require__(33373)) asInput = (input) => input } else { const { EOL } = __webpack_require__(12087) const errors = __webpack_require__(52973) const isObject = __webpack_require__(41805) const asn1 = __webpack_require__(16416) 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 } /***/ }), /***/ 69693: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* global BigInt */ const { EOL } = __webpack_require__(12087) const errors = __webpack_require__(52973) const { keyObjectSupported } = __webpack_require__(32457) const { createPublicKey } = __webpack_require__(98921) const base64url = __webpack_require__(73385) const asn1 = __webpack_require__(16416) const computePrimes = __webpack_require__(53141) const { OKP_CURVES, EC_CURVES } = __webpack_require__(15501) 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) } /***/ }), /***/ 20125: /***/ ((module) => { module.exports = alg => `sha${alg.substr(2, 3)}` /***/ }), /***/ 53141: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* global BigInt */ const { randomBytes } = __webpack_require__(33373) const base64url = __webpack_require__(73385) const errors = __webpack_require__(52973) 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) { var 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) } } /***/ }), /***/ 32457: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { diffieHellman, KeyObject, sign, verify } = __webpack_require__(33373) 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 } /***/ }), /***/ 97305: /***/ ((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) } } /***/ }), /***/ 80820: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { timingSafeEqual: TSE } = __webpack_require__(33373) 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 /***/ }), /***/ 4520: /***/ ((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 } /***/ }), /***/ 530: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { JOSECritNotUnderstood, JWSInvalid } = __webpack_require__(52973) 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') } } /***/ }), /***/ 16425: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { JWE: __webpack_require__(72851), JWK: __webpack_require__(67894), JWKS: __webpack_require__(42896), JWS: __webpack_require__(36518), JWT: __webpack_require__(18138), errors: __webpack_require__(52973) } /***/ }), /***/ 49651: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createCipheriv, createDecipheriv, getCiphers } = __webpack_require__(33373) const uint64be = __webpack_require__(4520) const timingSafeEqual = __webpack_require__(80820) const { KEYOBJECT } = __webpack_require__(15010) const { JWEInvalid, JWEDecryptionFailed } = __webpack_require__(52973) 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) let cleartext try { const cipher = createDecipheriv(`aes-${size}-cbc`, encKey, iv) cleartext = Buffer.concat([cipher.update(ciphertext), cipher.final()]) } catch (err) {} if (!cleartext || !macCheckPassed) { 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 } }) } /***/ }), /***/ 21239: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createCipheriv, createDecipheriv, getCiphers } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const { JWEInvalid, JWEDecryptionFailed } = __webpack_require__(52973) const { asInput } = __webpack_require__(98921) 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 } }) } /***/ }), /***/ 37813: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const generateIV = __webpack_require__(93137) const base64url = __webpack_require__(73385) 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 } }) } /***/ }), /***/ 80477: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createCipheriv, createDecipheriv, getCiphers } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const { asInput } = __webpack_require__(98921) 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 } }) } /***/ }), /***/ 94563: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { improvedDH } = __webpack_require__(32457) if (improvedDH) { const { diffieHellman } = __webpack_require__(33373) const { KeyObject } = __webpack_require__(98921) const importKey = __webpack_require__(13468) 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__(33373) const base64url = __webpack_require__(73385) 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)) } } /***/ }), /***/ 81417: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHash } = __webpack_require__(33373) const ecdhComputeSecret = __webpack_require__(94563) 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) } /***/ }), /***/ 52652: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { improvedDH } = __webpack_require__(32457) const { KEYLENGTHS } = __webpack_require__(15501) const { generateSync } = __webpack_require__(39377) const { name: secp256k1 } = __webpack_require__(2044) const derive = __webpack_require__(81417) 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') } } /***/ }), /***/ 7668: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { improvedDH } = __webpack_require__(32457) const { KEYOBJECT } = __webpack_require__(15010) const { generateSync } = __webpack_require__(39377) const { name: secp256k1 } = __webpack_require__(2044) const { ECDH_DERIVE_LENGTHS } = __webpack_require__(15501) const derive = __webpack_require__(81417) 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 /***/ }), /***/ 77634: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = __webpack_require__(33373) const { derToJose, joseToDer } = __webpack_require__(14451) const { KEYOBJECT } = __webpack_require__(15010) const resolveNodeAlg = __webpack_require__(20125) const { asInput } = __webpack_require__(98921) const { dsaEncodingSupported } = __webpack_require__(32457) const { name: secp256k1 } = __webpack_require__(2044) 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 }) } /***/ }), /***/ 18803: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { sign: signOneShot, verify: verifyOneShot } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const { edDSASupported } = __webpack_require__(32457) 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') } } /***/ }), /***/ 25866: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHmac } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const timingSafeEqual = __webpack_require__(80820) const resolveNodeAlg = __webpack_require__(20125) const { asInput } = __webpack_require__(98921) 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 }) } /***/ }), /***/ 50191: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { JWKKeySupport, JOSENotSupported } = __webpack_require__(52973) const { KEY_MANAGEMENT_ENCRYPT, KEY_MANAGEMENT_DECRYPT } = __webpack_require__(15010) const { JWA, JWK } = __webpack_require__(15501) // sign, verify __webpack_require__(25866)(JWA, JWK) __webpack_require__(77634)(JWA, JWK) __webpack_require__(18803)(JWA, JWK) __webpack_require__(35172)(JWA, JWK) __webpack_require__(16984)(JWA, JWK) __webpack_require__(72638)(JWA) // encrypt, decrypt __webpack_require__(49651)(JWA, JWK) __webpack_require__(21239)(JWA, JWK) // wrapKey, unwrapKey __webpack_require__(1029)(JWA, JWK) __webpack_require__(80477)(JWA, JWK) __webpack_require__(37813)(JWA, JWK) // deriveKey __webpack_require__(94515)(JWA, JWK) __webpack_require__(52652)(JWA, JWK) __webpack_require__(7668)(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) } } /***/ }), /***/ 72638: /***/ ((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) } /***/ }), /***/ 94515: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { pbkdf2Sync: pbkdf2, randomBytes } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const base64url = __webpack_require__(73385) 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 } }) } /***/ }), /***/ 1029: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { publicEncrypt, privateDecrypt, constants } = __webpack_require__(33373) const { oaepHashSupported } = __webpack_require__(32457) const { KEYOBJECT } = __webpack_require__(15010) const { asInput } = __webpack_require__(98921) 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] }) } /***/ }), /***/ 16984: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createSign, createVerify } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const resolveNodeAlg = __webpack_require__(20125) const { asInput } = __webpack_require__(98921) 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] }) } /***/ }), /***/ 35172: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createSign, createVerify, constants } = __webpack_require__(33373) const { KEYOBJECT } = __webpack_require__(15010) const resolveNodeAlg = __webpack_require__(20125) const { asInput } = __webpack_require__(98921) 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] }) } /***/ }), /***/ 73607: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inflateRawSync } = __webpack_require__(78761) const base64url = __webpack_require__(73385) const getKey = __webpack_require__(31308) const { KeyStore } = __webpack_require__(42896) const errors = __webpack_require__(52973) const { check, decrypt, keyManagementDecrypt } = __webpack_require__(50191) const JWK = __webpack_require__(67894) const { createSecretKey } = __webpack_require__(98921) const generateCEK = __webpack_require__(15242) const validateHeaders = __webpack_require__(46904) const { detect: resolveSerialization } = __webpack_require__(5348) 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) } } /* * @public */ const jweDecrypt = (skipValidateHeaders, serialization, jwe, 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(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 (algorithms && !algorithms.has(alg === 'dir' ? enc : alg)) { throw new errors.JOSEAlgNotWhitelisted('alg 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, algorithms: algorithms ? [...algorithms] : 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, algorithms: algorithms ? [...algorithms] : 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) /***/ }), /***/ 19094: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { deflateRawSync } = __webpack_require__(78761) const { KEYOBJECT } = __webpack_require__(15010) const generateIV = __webpack_require__(93137) const base64url = __webpack_require__(73385) const getKey = __webpack_require__(31308) const isObject = __webpack_require__(41805) const { createSecretKey } = __webpack_require__(98921) const deepClone = __webpack_require__(43653) const importKey = __webpack_require__(13468) const { JWEInvalid } = __webpack_require__(52973) const { check, keyManagementEncrypt, encrypt } = __webpack_require__(50191) const serializers = __webpack_require__(5348) const generateCEK = __webpack_require__(15242) const validateHeaders = __webpack_require__(46904) const PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT') class Encrypt { // TODO: in v2.x swap unprotectedHeader and aad constructor (cleartext, protectedHeader, unprotectedHeader, aad) { 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 /***/ }), /***/ 15242: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(33373) const { createSecretKey } = __webpack_require__(98921) const { KEYLENGTHS } = __webpack_require__(15501) const Key = __webpack_require__(50504) 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 }) } /***/ }), /***/ 72851: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Encrypt = __webpack_require__(19094) const decrypt = __webpack_require__(73607) // TODO: in v2.x swap unprotectedHeader and aad const single = (serialization, cleartext, key, protectedHeader, unprotectedHeader, aad) => { return new Encrypt(cleartext, protectedHeader, unprotectedHeader, aad) .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 /***/ }), /***/ 5348: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(41805) let validateCrit = __webpack_require__(530) const { JWEInvalid } = __webpack_require__(52973) 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 } /***/ }), /***/ 46904: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isDisjoint = __webpack_require__(56149) const base64url = __webpack_require__(73385) let validateCrit = __webpack_require__(530) const { JWEInvalid, JOSENotSupported } = __webpack_require__(52973) 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] } /***/ }), /***/ 39377: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const errors = __webpack_require__(52973) const importKey = __webpack_require__(13468) const RSAKey = __webpack_require__(73242) const ECKey = __webpack_require__(53426) const OKPKey = __webpack_require__(24510) const OctKey = __webpack_require__(50504) 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 /***/ }), /***/ 13468: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { deprecate } = __webpack_require__(31669) const { createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __webpack_require__(98921) const base64url = __webpack_require__(73385) const isObject = __webpack_require__(41805) const { jwkToPem } = __webpack_require__(69693) const errors = __webpack_require__(52973) const RSAKey = __webpack_require__(73242) const ECKey = __webpack_require__(53426) const OKPKey = __webpack_require__(24510) const OctKey = __webpack_require__(50504) 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 Object.defineProperty(asKey, 'deprecated', { value: deprecate((key, parameters) => { return asKey(key, parameters, { calculateMissingRSAPrimes: true }) }, 'JWK.importKey() is deprecated, use JWK.asKey() instead'), enumerable: false }) /***/ }), /***/ 67894: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Key = __webpack_require__(57841) const None = __webpack_require__(98012) const EmbeddedJWK = __webpack_require__(84902) const EmbeddedX5C = __webpack_require__(303) const importKey = __webpack_require__(13468) const generate = __webpack_require__(39377) module.exports = { ...generate, asKey: importKey, isKey: input => input instanceof Key, None, EmbeddedJWK, EmbeddedX5C } /* deprecated */ Object.defineProperty(module.exports, "importKey", ({ value: importKey.deprecated, enumerable: false })) /***/ }), /***/ 57841: /***/ ((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__(32457) const { createPublicKey } = __webpack_require__(98921) const { keyObjectToJWK } = __webpack_require__(69693) const { THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, JWK_MEMBERS, KEYOBJECT, USES_MAPPING, OPS, USES } = __webpack_require__(15010) const isObject = __webpack_require__(41805) const thumbprint = __webpack_require__(82253) const errors = __webpack_require__(52973) const privateApi = Symbol('privateApi') const { JWK } = __webpack_require__(15501) 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 /***/ }), /***/ 53426: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { generateKeyPairSync, generateKeyPair: async } = __webpack_require__(33373) const { promisify } = __webpack_require__(31669) const { THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT } = __webpack_require__(15010) const { EC_CURVES } = __webpack_require__(15501) const { keyObjectSupported } = __webpack_require__(32457) const { createPublicKey, createPrivateKey } = __webpack_require__(98921) const errors = __webpack_require__(52973) const { name: secp256k1 } = __webpack_require__(2044) const Key = __webpack_require__(57841) 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}`) } if (crv === secp256k1 && crv !== 'secp256k1') { crv = 'secp256k1' } 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}`) } if (crv === secp256k1 && crv !== 'secp256k1') { crv = 'secp256k1' } 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 /***/ }), /***/ 84902: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const Key = __webpack_require__(57841) 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() /***/ }), /***/ 303: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const Key = __webpack_require__(57841) 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() /***/ }), /***/ 98012: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { inspect } = __webpack_require__(31669) const Key = __webpack_require__(57841) 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() /***/ }), /***/ 50504: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { randomBytes } = __webpack_require__(33373) const { createSecretKey } = __webpack_require__(98921) const base64url = __webpack_require__(73385) const { THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT, KEYOBJECT } = __webpack_require__(15010) const Key = __webpack_require__(57841) 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 /***/ }), /***/ 24510: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { generateKeyPairSync, generateKeyPair: async } = __webpack_require__(33373) const { promisify } = __webpack_require__(31669) const { THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT } = __webpack_require__(15010) const { OKP_CURVES } = __webpack_require__(15501) const { edDSASupported } = __webpack_require__(32457) const errors = __webpack_require__(52973) const Key = __webpack_require__(57841) 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 /***/ }), /***/ 73242: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { generateKeyPairSync, generateKeyPair: async } = __webpack_require__(33373) const { promisify } = __webpack_require__(31669) const { THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT } = __webpack_require__(15010) const { keyObjectSupported } = __webpack_require__(32457) const { createPublicKey, createPrivateKey } = __webpack_require__(98921) const Key = __webpack_require__(57841) 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 /***/ }), /***/ 2044: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { deprecate } = __webpack_require__(31669) const deprecation = deprecate(() => {}, '"P-256K" EC curve name is deprecated') module.exports = { name: 'secp256k1', rename (value) { if (value !== 'secp256k1') { deprecation() } module.exports.name = value } } /***/ }), /***/ 82253: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHash } = __webpack_require__(33373) const base64url = __webpack_require__(73385) 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') /***/ }), /***/ 42896: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const KeyStore = __webpack_require__(24998) module.exports = KeyStore /***/ }), /***/ 24998: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { deprecate, inspect } = __webpack_require__(31669) const isObject = __webpack_require__(41805) const { generate, generateSync } = __webpack_require__(39377) const { USES_MAPPING } = __webpack_require__(15010) const { isKey, asKey: importKey } = __webpack_require__(67894) 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 } } }).filter(Boolean) return new KeyStore(...keys) } Object.defineProperty(KeyStore, 'fromJWKS', { value: deprecate(jwks => asKeyStore(jwks, { calculateMissingRSAPrimes: true }), 'JWKS.KeyStore.fromJWKS() is deprecated, use JWKS.asKeyStore() instead'), enumerable: false }) module.exports = { KeyStore, asKeyStore } /***/ }), /***/ 36518: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Sign = __webpack_require__(1728) const { verify } = __webpack_require__(39835) 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 /***/ }), /***/ 28104: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(41805) let validateCrit = __webpack_require__(530) const { JWSInvalid } = __webpack_require__(52973) 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 } /***/ }), /***/ 1728: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const base64url = __webpack_require__(73385) const isDisjoint = __webpack_require__(56149) const isObject = __webpack_require__(41805) const deepClone = __webpack_require__(43653) const { JWSInvalid } = __webpack_require__(52973) const { sign } = __webpack_require__(50191) const getKey = __webpack_require__(31308) const serializers = __webpack_require__(28104) 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 /***/ }), /***/ 39835: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { EOL } = __webpack_require__(12087) const base64url = __webpack_require__(73385) const isDisjoint = __webpack_require__(56149) const isObject = __webpack_require__(41805) let validateCrit = __webpack_require__(530) const getKey = __webpack_require__(31308) const { KeyStore } = __webpack_require__(42896) const errors = __webpack_require__(52973) const { check, verify } = __webpack_require__(50191) const JWK = __webpack_require__(67894) const { detect: resolveSerialization } = __webpack_require__(28104) 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, parse = true, encoding = 'utf8' } = {}) => { 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, encoding, parse, 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.crit || !combinedHeader.crit.includes('b64') || combinedHeader.b64) { if (parse) { payload = decoded ? decoded.payload : base64url.JSON.decode.try(payload, encoding) } 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, encoding, parse, 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) } /***/ }), /***/ 6743: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const base64url = __webpack_require__(73385) const errors = __webpack_require__(52973) 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('JWTs must be decrypted first') } 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') } } /***/ }), /***/ 18138: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const decode = __webpack_require__(6743) const sign = __webpack_require__(86703) const verify = __webpack_require__(44856) const profiles = __webpack_require__(39547) module.exports = { decode, sign, verify, ...profiles } /***/ }), /***/ 39547: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const verify = __webpack_require__(44856) module.exports = { IdToken: { verify: (token, key, options) => verify(token, key, { ...options, profile: 'id_token' }) }, LogoutToken: { verify: (token, key, options) => verify(token, key, { ...options, profile: 'logout_token' }) }, AccessToken: { verify: (token, key, options) => verify(token, key, { ...options, profile: 'at+JWT' }) } } /***/ }), /***/ 23951: /***/ ((module) => { const isNotString = val => typeof val !== 'string' || val.length === 0 module.exports.isNotString = isNotString module.exports.isString = function isString (Err, value, label, claim, required = false) { if (required && value === undefined) { throw new Err(`${label} is missing`, claim, 'missing') } if (value !== undefined && isNotString(value)) { throw new Err(`${label} must be a string`, claim, 'invalid') } } /***/ }), /***/ 86703: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(41805) const secs = __webpack_require__(97305) const epoch = __webpack_require__(47396) const getKey = __webpack_require__(31308) const JWS = __webpack_require__(36518) const isString = __webpack_require__(23951).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') isString(options.nonce, 'options.nonce') 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, nonce, notBefore, subject, now } = options validateOptions({ algorithm, audience, expiresIn, header, iat, issuer, jti, kid, nonce, 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, nonce: nonce || payload.nonce, 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 }) } /***/ }), /***/ 44856: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isObject = __webpack_require__(41805) const epoch = __webpack_require__(47396) const secs = __webpack_require__(97305) const getKey = __webpack_require__(31308) const { bare: verify } = __webpack_require__(39835) const { JWTClaimInvalid, JWTExpired } = __webpack_require__(52973) const { isString, isNotString } = __webpack_require__(23951) const decode = __webpack_require__(6743) const isPayloadString = isString.bind(undefined, JWTClaimInvalid) const isOptionString = isString.bind(undefined, TypeError) const IDTOKEN = 'id_token' const LOGOUTTOKEN = 'logout_token' const ATJWT = 'at+JWT' 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') } } const isNotArrayOfStrings = val => !Array.isArray(val) || val.length === 0 || val.some(isNotString) const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, '') const validateOptions = ({ algorithms, audience, clockTolerance, complete = false, crit, ignoreExp = false, ignoreIat = false, ignoreNbf = false, issuer, jti, maxAuthAge, maxTokenAge, nonce, now = new Date(), profile, subject, typ }) => { isOptionString(profile, 'options.profile') 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(maxAuthAge, 'options.maxAuthAge') 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') } isOptionString(nonce, 'options.nonce') 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') } switch (profile) { case IDTOKEN: if (!issuer) { throw new TypeError('"issuer" option is required to validate an ID Token') } if (!audience) { throw new TypeError('"audience" option is required to validate an ID Token') } break case ATJWT: if (!issuer) { throw new TypeError('"issuer" option is required to validate a JWT Access Token') } if (!audience) { throw new TypeError('"audience" option is required to validate a JWT Access Token') } typ = ATJWT break case LOGOUTTOKEN: if (!issuer) { throw new TypeError('"issuer" option is required to validate a Logout Token') } if (!audience) { throw new TypeError('"audience" option is required to validate a Logout Token') } break case undefined: break default: throw new TypeError(`unsupported options.profile value "${profile}"`) } return { algorithms, audience, clockTolerance, complete, crit, ignoreExp, ignoreIat, ignoreNbf, issuer, jti, maxAuthAge, maxTokenAge, nonce, now, profile, subject, typ } } const validateTypes = ({ header, payload }, profile, options) => { isPayloadString(header.alg, '"alg" header parameter', 'alg', true) isTimestamp(payload.iat, 'iat', profile === IDTOKEN || profile === LOGOUTTOKEN || profile === ATJWT || !!options.maxTokenAge) isTimestamp(payload.exp, 'exp', profile === IDTOKEN || profile === ATJWT) isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge) isTimestamp(payload.nbf, 'nbf') isPayloadString(payload.jti, '"jti" claim', 'jti', profile === LOGOUTTOKEN || profile === ATJWT || !!options.jti) isPayloadString(payload.acr, '"acr" claim', 'acr') isPayloadString(payload.nonce, '"nonce" claim', 'nonce', !!options.nonce) isStringOrArrayOfStrings(payload.iss, 'iss', !!options.issuer) isPayloadString(payload.sub, '"sub" claim', 'sub', profile === IDTOKEN || profile === ATJWT || !!options.subject) isStringOrArrayOfStrings(payload.aud, 'aud', !!options.audience) isPayloadString(payload.azp, '"azp" claim', 'azp', profile === IDTOKEN && Array.isArray(payload.aud) && payload.aud.length > 1) isStringOrArrayOfStrings(payload.amr, 'amr') isPayloadString(header.typ, '"typ" header parameter', 'typ', !!options.typ) if (profile === ATJWT) { isPayloadString(payload.client_id, '"client_id" claim', 'client_id', true) } if (profile === LOGOUTTOKEN) { 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') } } } const checkAudiencePresence = (audPayload, audOption, profile) => { 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, maxAuthAge, maxTokenAge, nonce, now, profile, 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, profile, 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 (nonce && decoded.payload.nonce !== nonce) { throw new JWTClaimInvalid('unexpected "nonce" claim value', 'nonce', '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, profile)) { 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 (maxAuthAge) { const maxAuthAgeSeconds = secs(maxAuthAge) if (decoded.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 (!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') } } if (profile === IDTOKEN && Array.isArray(decoded.payload.aud) && decoded.payload.aud.length > 1 && decoded.payload.azp !== audience) { throw new JWTClaimInvalid('unexpected "azp" claim value', 'azp', 'check_failed') } return complete ? decoded : decoded.payload } /***/ }), /***/ 30760: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { getCurves } = __webpack_require__(33373) const { name: secp256k1 } = __webpack_require__(2044) 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 /***/ }), /***/ 87168: /***/ ((module) => { module.exports = new Map() /***/ }), /***/ 15501: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const EC_CURVES = __webpack_require__(30760) const IVLENGTHS = __webpack_require__(19805) const JWA = __webpack_require__(72430) const JWK = __webpack_require__(95942) const KEYLENGTHS = __webpack_require__(54358) const OKP_CURVES = __webpack_require__(24720) const ECDH_DERIVE_LENGTHS = __webpack_require__(87168) module.exports = { EC_CURVES, ECDH_DERIVE_LENGTHS, IVLENGTHS, JWA, JWK, KEYLENGTHS, OKP_CURVES } /***/ }), /***/ 19805: /***/ ((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] ]) /***/ }), /***/ 72430: /***/ ((module) => { module.exports = { sign: new Map(), verify: new Map(), keyManagementEncrypt: new Map(), keyManagementDecrypt: new Map(), encrypt: new Map(), decrypt: new Map() } /***/ }), /***/ 95942: /***/ ((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: {} } } /***/ }), /***/ 54358: /***/ ((module) => { module.exports = new Map([ ['A128CBC-HS256', 256], ['A128GCM', 128], ['A192CBC-HS384', 384], ['A192GCM', 192], ['A256CBC-HS512', 512], ['A256GCM', 256] ]) /***/ }), /***/ 24720: /***/ ((module) => { const curves = new Set(['Ed25519']) if (!('electron' in process.versions)) { curves.add('Ed448') curves.add('X25519') curves.add('X448') } module.exports = curves /***/ }), /***/ 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); /***/ }), /***/ 22820: /***/ ((__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 new Buffer(value.substring(8), 'base64') else return /^:/.test(value) ? value.substring(1) : value } return value }) } /***/ }), /***/ 52533: /***/ ((module) => { "use strict"; var traverse = module.exports = function (schema, opts, cb) { // Legacy support for v0.3.1 and earlier. if (typeof opts == 'function') { cb = opts; opts = {}; } cb = opts.cb || cb; var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; var post = cb.post || function() {}; _traverse(opts, pre, post, schema, '', schema); }; traverse.keywords = { additionalItems: true, items: true, contains: true, additionalProperties: true, propertyNames: true, not: true }; traverse.arrayKeywords = { items: true, allOf: true, anyOf: true, oneOf: true }; traverse.propsKeywords = { definitions: true, properties: true, patternProperties: true, dependencies: true }; traverse.skipKeywords = { default: true, enum: true, const: true, required: true, maximum: true, minimum: true, exclusiveMaximum: true, exclusiveMinimum: true, multipleOf: true, maxLength: true, minLength: true, pattern: true, format: true, maxItems: true, minItems: true, uniqueItems: true, maxProperties: true, minProperties: true }; function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { if (schema && typeof schema == 'object' && !Array.isArray(schema)) { pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); for (var key in schema) { var sch = schema[key]; if (Array.isArray(sch)) { if (key in traverse.arrayKeywords) { for (var i=0; i schema.maxItems){ addError("There must be a maximum of " + schema.maxItems + " in the array"); } }else if(schema.properties || schema.additionalProperties){ errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties)); } if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){ addError("does not match the regex pattern " + schema.pattern); } if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){ addError("may only be " + schema.maxLength + " characters long"); } if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){ addError("must be at least " + schema.minLength + " characters long"); } if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum && schema.minimum > value){ addError("must have a minimum value of " + schema.minimum); } if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum && schema.maximum < value){ addError("must have a maximum value of " + schema.maximum); } if(schema['enum']){ var enumer = schema['enum']; l = enumer.length; var found; for(var j = 0; j < l; j++){ if(enumer[j]===value){ found=1; break; } } if(!found){ addError("does not have a value in the enumeration " + enumer.join(", ")); } } if(typeof schema.maxDecimal == 'number' && (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){ addError("may only have " + schema.maxDecimal + " digits of decimal places"); } } } return null; } // validate an object against a schema function checkObj(instance,objTypeDef,path,additionalProp){ if(typeof objTypeDef =='object'){ if(typeof instance != 'object' || instance instanceof Array){ errors.push({property:path,message:"an object is required"}); } for(var i in objTypeDef){ if(objTypeDef.hasOwnProperty(i)){ var value = instance[i]; // skip _not_ specified properties if (value === undefined && options.existingOnly) continue; var propDef = objTypeDef[i]; // set default if(value === undefined && propDef["default"]){ value = instance[i] = propDef["default"]; } if(options.coerce && i in instance){ value = instance[i] = options.coerce(value, propDef); } checkProp(value,propDef,path,i); } } } for(i in instance){ if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){ if (options.filter) { delete instance[i]; continue; } else { errors.push({property:path,message:(typeof value) + "The property " + i + " is not defined in the schema and the schema does not allow additional properties"}); } } var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires; if(requires && !(requires in instance)){ errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"}); } value = instance[i]; if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){ if(options.coerce){ value = instance[i] = options.coerce(value, additionalProp); } checkProp(value,additionalProp,path,i); } if(!_changing && value && value.$schema){ errors = errors.concat(checkProp(value,value.$schema,path,i)); } } return errors; } if(schema){ checkProp(instance,schema,'',_changing || ''); } if(!_changing && instance && instance.$schema){ checkProp(instance,instance.$schema,'',''); } return {valid:!errors.length,errors:errors}; }; exports.mustBeValid = function(result){ // summary: // This checks to ensure that the result is valid and will throw an appropriate error message if it is not // result: the result returned from checkPropertyChange or validate if(!result.valid){ throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n")); } } return exports; })); /***/ }), /***/ 81676: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var util = __webpack_require__(31669), TransformStream = __webpack_require__(92413).Transform; module.exports = function (options) { return new JSONStream(options); }; var JSONStream = module.exports.JSONStream = function (options) { options = options || {}; TransformStream.call(this, options); this._writableState.objectMode = false; this._readableState.objectMode = true; this._async = options.async || false; }; util.inherits(JSONStream, TransformStream); JSONStream.prototype._transform = function (data, encoding, callback) { if (!Buffer.isBuffer(data)) data = new Buffer(data); if (this._buffer) { data = Buffer.concat([this._buffer, data]); } var ptr = 0, start = 0; while (++ptr <= data.length) { if (data[ptr] === 10 || ptr === data.length) { var line; try { line = JSON.parse(data.slice(start, ptr)); } catch (ex) { } if (line) { this.push(line); line = null; } if (data[ptr] === 10) start = ++ptr; } } this._buffer = data.slice(start); return this._async ? void setImmediate(callback) : void callback(); }; /***/ }), /***/ 57073: /***/ ((module, exports) => { exports = module.exports = stringify exports.getSerialize = serializer function stringify(obj, replacer, spaces, cycleReplacer) { return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) } function serializer(replacer, cycleReplacer) { var stack = [], keys = [] if (cycleReplacer == null) cycleReplacer = function(key, value) { if (stack[0] === value) return "[Circular ~]" return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" } return function(key, value) { if (stack.length > 0) { var thisPos = stack.indexOf(this) ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) } else stack.push(value) return replacer == null ? value : replacer.call(this, key, value) } } /***/ }), /***/ 63269: /***/ (function(module, exports, __webpack_require__) { (function (global, factory) { true ? factory(exports) : 0; }(this, function (exports) { 'use strict'; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } /* eslint-disable no-eval */ var globalEval = eval; // eslint-disable-next-line import/no-commonjs var supportsNodeVM = true && Boolean(module.exports) && !(typeof navigator !== 'undefined' && navigator.product === 'ReactNative'); var allowedResultTypes = ['value', 'path', 'pointer', 'parent', 'parentProperty', 'all']; var hasOwnProp = Object.prototype.hasOwnProperty; /** * Copy items out of one array into another. * @param {Array} source Array with items to copy * @param {Array} target Array to which to copy * @param {Function} conditionCb Callback passed the current item; will move * item if evaluates to `true` * @returns {undefined} */ var moveToAnotherArray = function moveToAnotherArray(source, target, conditionCb) { var il = source.length; for (var i = 0; i < il; i++) { var item = source[i]; if (conditionCb(item)) { target.push(source.splice(i--, 1)[0]); } } }; var vm = supportsNodeVM ? __webpack_require__(92184) : { /** * @param {string} expr Expression to evaluate * @param {Object} context Object whose items will be added to evaluation * @returns {*} Result of evaluated code */ runInNewContext: function runInNewContext(expr, context) { var keys = Object.keys(context); var funcs = []; moveToAnotherArray(keys, funcs, function (key) { return typeof context[key] === 'function'; }); var code = funcs.reduce(function (s, func) { var fString = context[func].toString(); if (!/function/.exec(fString)) { fString = 'function ' + fString; } return 'var ' + func + '=' + fString + ';' + s; }, '') + keys.reduce(function (s, vr) { return 'var ' + vr + '=' + JSON.stringify(context[vr]).replace( // http://www.thespanner.co.uk/2011/07/25/the-json-specification-is-now-wrong/ /\u2028|\u2029/g, function (m) { return "\\u202" + (m === "\u2028" ? '8' : '9'); }) + ';' + s; }, expr); return globalEval(code); } }; /** * Copies array and then pushes item into it. * @param {Array} arr Array to copy and into which to push * @param {*} item Array item to add (to end) * @returns {Array} Copy of the original array */ function push(arr, item) { arr = arr.slice(); arr.push(item); return arr; } /** * Copies array and then unshifts item into it. * @param {*} item Array item to add (to beginning) * @param {Array} arr Array to copy and into which to unshift * @returns {Array} Copy of the original array */ function unshift(item, arr) { arr = arr.slice(); arr.unshift(item); return arr; } /** * Caught when JSONPath is used without `new` but rethrown if with `new` * @extends Error */ var NewError = /*#__PURE__*/ function (_Error) { _inherits(NewError, _Error); /** * @param {*} value The evaluated scalar value */ function NewError(value) { var _this; _classCallCheck(this, NewError); _this = _possibleConstructorReturn(this, _getPrototypeOf(NewError).call(this, 'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')); _this.avoidNew = true; _this.value = value; _this.name = 'NewError'; return _this; } return NewError; }(_wrapNativeSuper(Error)); /** * @param {Object} [opts] If present, must be an object * @param {string} expr JSON path to evaluate * @param {JSON} obj JSON object to evaluate against * @param {Function} callback Passed 3 arguments: 1) desired payload per `resultType`, * 2) `"value"|"property"`, 3) Full returned object with all payloads * @param {Function} otherTypeCallback If `@other()` is at the end of one's query, this * will be invoked with the value of the item, its path, its parent, and its parent's * property name, and it should return a boolean indicating whether the supplied value * belongs to the "other" type or not (or it may handle transformations and return `false`). * @returns {JSONPath} * @class */ function JSONPath(opts, expr, obj, callback, otherTypeCallback) { // eslint-disable-next-line no-restricted-syntax if (!(this instanceof JSONPath)) { try { return new JSONPath(opts, expr, obj, callback, otherTypeCallback); } catch (e) { if (!e.avoidNew) { throw e; } return e.value; } } if (typeof opts === 'string') { otherTypeCallback = callback; callback = obj; obj = expr; expr = opts; opts = {}; } opts = opts || {}; var objArgs = hasOwnProp.call(opts, 'json') && hasOwnProp.call(opts, 'path'); this.json = opts.json || obj; this.path = opts.path || expr; this.resultType = opts.resultType && opts.resultType.toLowerCase() || 'value'; this.flatten = opts.flatten || false; this.wrap = hasOwnProp.call(opts, 'wrap') ? opts.wrap : true; this.sandbox = opts.sandbox || {}; this.preventEval = opts.preventEval || false; this.parent = opts.parent || null; this.parentProperty = opts.parentProperty || null; this.callback = opts.callback || callback || null; this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function () { throw new Error('You must supply an otherTypeCallback callback option with the @other() operator.'); }; if (opts.autostart !== false) { var ret = this.evaluate({ path: objArgs ? opts.path : expr, json: objArgs ? opts.json : obj }); if (!ret || _typeof(ret) !== 'object') { throw new NewError(ret); } return ret; } } // PUBLIC METHODS JSONPath.prototype.evaluate = function (expr, json, callback, otherTypeCallback) { var that = this; var currParent = this.parent, currParentProperty = this.parentProperty; var flatten = this.flatten, wrap = this.wrap; this.currResultType = this.resultType; this.currPreventEval = this.preventEval; this.currSandbox = this.sandbox; callback = callback || this.callback; this.currOtherTypeCallback = otherTypeCallback || this.otherTypeCallback; json = json || this.json; expr = expr || this.path; if (expr && _typeof(expr) === 'object') { if (!expr.path) { throw new Error('You must supply a "path" property when providing an object argument to JSONPath.evaluate().'); } json = hasOwnProp.call(expr, 'json') ? expr.json : json; flatten = hasOwnProp.call(expr, 'flatten') ? expr.flatten : flatten; this.currResultType = hasOwnProp.call(expr, 'resultType') ? expr.resultType : this.currResultType; this.currSandbox = hasOwnProp.call(expr, 'sandbox') ? expr.sandbox : this.currSandbox; wrap = hasOwnProp.call(expr, 'wrap') ? expr.wrap : wrap; this.currPreventEval = hasOwnProp.call(expr, 'preventEval') ? expr.preventEval : this.currPreventEval; callback = hasOwnProp.call(expr, 'callback') ? expr.callback : callback; this.currOtherTypeCallback = hasOwnProp.call(expr, 'otherTypeCallback') ? expr.otherTypeCallback : this.currOtherTypeCallback; currParent = hasOwnProp.call(expr, 'parent') ? expr.parent : currParent; currParentProperty = hasOwnProp.call(expr, 'parentProperty') ? expr.parentProperty : currParentProperty; expr = expr.path; } currParent = currParent || null; currParentProperty = currParentProperty || null; if (Array.isArray(expr)) { expr = JSONPath.toPathString(expr); } if (!expr || !json || !allowedResultTypes.includes(this.currResultType)) { return undefined; } this._obj = json; var exprList = JSONPath.toPathArray(expr); if (exprList[0] === '$' && exprList.length > 1) { exprList.shift(); } this._hasParentSelector = null; var result = this._trace(exprList, json, ['$'], currParent, currParentProperty, callback).filter(function (ea) { return ea && !ea.isParentSelector; }); if (!result.length) { return wrap ? [] : undefined; } if (result.length === 1 && !wrap && !Array.isArray(result[0].value)) { return this._getPreferredOutput(result[0]); } return result.reduce(function (rslt, ea) { var valOrPath = that._getPreferredOutput(ea); if (flatten && Array.isArray(valOrPath)) { rslt = rslt.concat(valOrPath); } else { rslt.push(valOrPath); } return rslt; }, []); }; // PRIVATE METHODS JSONPath.prototype._getPreferredOutput = function (ea) { var resultType = this.currResultType; switch (resultType) { default: throw new TypeError('Unknown result type'); case 'all': ea.pointer = JSONPath.toPointer(ea.path); ea.path = typeof ea.path === 'string' ? ea.path : JSONPath.toPathString(ea.path); return ea; case 'value': case 'parent': case 'parentProperty': return ea[resultType]; case 'path': return JSONPath.toPathString(ea[resultType]); case 'pointer': return JSONPath.toPointer(ea.path); } }; JSONPath.prototype._handleCallback = function (fullRetObj, callback, type) { if (callback) { var preferredOutput = this._getPreferredOutput(fullRetObj); fullRetObj.path = typeof fullRetObj.path === 'string' ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); // eslint-disable-next-line callback-return callback(preferredOutput, type, fullRetObj); } }; JSONPath.prototype._trace = function (expr, val, path, parent, parentPropName, callback, literalPriority) { // No expr to follow? return path and value as the result of this trace branch var retObj; var that = this; if (!expr.length) { retObj = { path: path, value: val, parent: parent, parentProperty: parentPropName }; this._handleCallback(retObj, callback, 'value'); return retObj; } var loc = expr[0], x = expr.slice(1); // We need to gather the return value of recursive trace calls in order to // do the parent sel computation. var ret = []; function addRet(elems) { if (Array.isArray(elems)) { // This was causing excessive stack size in Node (with or without Babel) against our performance test: `ret.push(...elems);` elems.forEach(function (t) { ret.push(t); }); } else { ret.push(elems); } } if ((typeof loc !== 'string' || literalPriority) && val && hasOwnProp.call(val, loc)) { // simple case--directly follow property addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback)); } else if (loc === '*') { // all child properties // eslint-disable-next-line no-shadow this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { addRet(that._trace(unshift(m, x), v, p, par, pr, cb, true)); }); } else if (loc === '..') { // all descendent parent properties addRet(this._trace(x, val, path, parent, parentPropName, callback)); // Check remaining expression with val's immediate children // eslint-disable-next-line no-shadow this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { // We don't join m and x here because we only want parents, not scalar values if (_typeof(v[m]) === 'object') { // Keep going with recursive descent on val's object children addRet(that._trace(unshift(l, x), v[m], push(p, m), v, m, cb)); } }); // The parent sel computation is handled in the frame above using the // ancestor object of val } else if (loc === '^') { // This is not a final endpoint, so we do not invoke the callback here this._hasParentSelector = true; return path.length ? { path: path.slice(0, -1), expr: x, isParentSelector: true } : []; } else if (loc === '~') { // property name retObj = { path: push(path, loc), value: parentPropName, parent: parent, parentProperty: null }; this._handleCallback(retObj, callback, 'property'); return retObj; } else if (loc === '$') { // root only addRet(this._trace(x, val, path, null, null, callback)); } else if (/^(-?\d*):(-?\d*):?(\d*)$/.test(loc)) { // [start:end:step] Python slice syntax addRet(this._slice(loc, x, val, path, parent, parentPropName, callback)); } else if (loc.indexOf('?(') === 0) { // [?(expr)] (filtering) if (this.currPreventEval) { throw new Error('Eval [?(expr)] prevented in JSONPath expression.'); } // eslint-disable-next-line no-shadow this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { if (that._eval(l.replace(/^\?\((.*?)\)$/, '$1'), v[m], m, p, par, pr)) { addRet(that._trace(unshift(m, x), v, p, par, pr, cb)); } }); } else if (loc[0] === '(') { // [(expr)] (dynamic property/index) if (this.currPreventEval) { throw new Error('Eval [(expr)] prevented in JSONPath expression.'); } // As this will resolve to a property name (but we don't know it yet), property and parent information is relative to the parent of the property to which this expression will resolve addRet(this._trace(unshift(this._eval(loc, val, path[path.length - 1], path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback)); } else if (loc[0] === '@') { // value type: @boolean(), etc. var addType = false; var valueType = loc.slice(1, -2); switch (valueType) { default: throw new TypeError('Unknown value type ' + valueType); case 'scalar': if (!val || !['object', 'function'].includes(_typeof(val))) { addType = true; } break; case 'boolean': case 'string': case 'undefined': case 'function': if (_typeof(val) === valueType) { // eslint-disable-line valid-typeof addType = true; } break; case 'number': if (_typeof(val) === valueType && isFinite(val)) { // eslint-disable-line valid-typeof addType = true; } break; case 'nonFinite': if (typeof val === 'number' && !isFinite(val)) { addType = true; } break; case 'object': if (val && _typeof(val) === valueType) { // eslint-disable-line valid-typeof addType = true; } break; case 'array': if (Array.isArray(val)) { addType = true; } break; case 'other': addType = this.currOtherTypeCallback(val, path, parent, parentPropName); break; case 'integer': if (val === Number(val) && isFinite(val) && !(val % 1)) { addType = true; } break; case 'null': if (val === null) { addType = true; } break; } if (addType) { retObj = { path: path, value: val, parent: parent, parentProperty: parentPropName }; this._handleCallback(retObj, callback, 'value'); return retObj; } } else if (loc[0] === '`' && val && hasOwnProp.call(val, loc.slice(1))) { // `-escaped property var locProp = loc.slice(1); addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, true)); } else if (loc.includes(',')) { // [name1,name2,...] var parts = loc.split(','); var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var part = _step.value; addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback)); } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator["return"] != null) { _iterator["return"](); } } finally { if (_didIteratorError) { throw _iteratorError; } } } } else if (!literalPriority && val && hasOwnProp.call(val, loc)) { // simple case--directly follow property addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, true)); } // We check the resulting values for parent selections. For parent // selections we discard the value object and continue the trace with the // current val object if (this._hasParentSelector) { // eslint-disable-next-line unicorn/no-for-loop for (var t = 0; t < ret.length; t++) { var rett = ret[t]; if (rett.isParentSelector) { var tmp = that._trace(rett.expr, val, rett.path, parent, parentPropName, callback); if (Array.isArray(tmp)) { ret[t] = tmp[0]; var tl = tmp.length; for (var tt = 1; tt < tl; tt++) { t++; ret.splice(t, 0, tmp[tt]); } } else { ret[t] = tmp; } } } } return ret; }; JSONPath.prototype._walk = function (loc, expr, val, path, parent, parentPropName, callback, f) { if (Array.isArray(val)) { var n = val.length; for (var i = 0; i < n; i++) { f(i, loc, expr, val, path, parent, parentPropName, callback); } } else if (_typeof(val) === 'object') { for (var m in val) { if (hasOwnProp.call(val, m)) { f(m, loc, expr, val, path, parent, parentPropName, callback); } } } }; JSONPath.prototype._slice = function (loc, expr, val, path, parent, parentPropName, callback) { if (!Array.isArray(val)) { return undefined; } var len = val.length, parts = loc.split(':'), step = parts[2] && parseInt(parts[2]) || 1; var start = parts[0] && parseInt(parts[0]) || 0, end = parts[1] && parseInt(parts[1]) || len; start = start < 0 ? Math.max(0, start + len) : Math.min(len, start); end = end < 0 ? Math.max(0, end + len) : Math.min(len, end); var ret = []; for (var i = start; i < end; i += step) { var tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback); if (Array.isArray(tmp)) { // This was causing excessive stack size in Node (with or without Babel) against our performance test: `ret.push(...tmp);` tmp.forEach(function (t) { ret.push(t); }); } else { ret.push(tmp); } } return ret; }; JSONPath.prototype._eval = function (code, _v, _vname, path, parent, parentPropName) { if (!this._obj || !_v) { return false; } if (code.includes('@parentProperty')) { this.currSandbox._$_parentProperty = parentPropName; code = code.replace(/@parentProperty/g, '_$_parentProperty'); } if (code.includes('@parent')) { this.currSandbox._$_parent = parent; code = code.replace(/@parent/g, '_$_parent'); } if (code.includes('@property')) { this.currSandbox._$_property = _vname; code = code.replace(/@property/g, '_$_property'); } if (code.includes('@path')) { this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname])); code = code.replace(/@path/g, '_$_path'); } if (code.match(/@([.\s)[])/)) { this.currSandbox._$_v = _v; code = code.replace(/@([.\s)[])/g, '_$_v$1'); } try { return vm.runInNewContext(code, this.currSandbox); } catch (e) { // eslint-disable-next-line no-console console.log(e); throw new Error('jsonPath: ' + e.message + ': ' + code); } }; // PUBLIC CLASS PROPERTIES AND METHODS // Could store the cache object itself JSONPath.cache = {}; /** * @param {string[]} pathArr Array to convert * @returns {string} The path string */ JSONPath.toPathString = function (pathArr) { var x = pathArr, n = x.length; var p = '$'; for (var i = 1; i < n; i++) { if (!/^(~|\^|@.*?\(\))$/.test(x[i])) { p += /^[0-9*]+$/.test(x[i]) ? '[' + x[i] + ']' : "['" + x[i] + "']"; } } return p; }; /** * @param {string} pointer JSON Path * @returns {string} JSON Pointer */ JSONPath.toPointer = function (pointer) { var x = pointer, n = x.length; var p = ''; for (var i = 1; i < n; i++) { if (!/^(~|\^|@.*?\(\))$/.test(x[i])) { p += '/' + x[i].toString().replace(/~/g, '~0').replace(/\//g, '~1'); } } return p; }; /** * @param {string} expr Expression to convert * @returns {string[]} */ JSONPath.toPathArray = function (expr) { var cache = JSONPath.cache; if (cache[expr]) { return cache[expr].concat(); } var subx = []; var normalized = expr // Properties .replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g, ';$&;') // Parenthetical evaluations (filtering and otherwise), directly // within brackets or single quotes .replace(/[['](\??\(.*?\))[\]']/g, function ($0, $1) { return '[#' + (subx.push($1) - 1) + ']'; }) // Escape periods and tildes within properties .replace(/\['([^'\]]*)'\]/g, function ($0, prop) { return "['" + prop.replace(/\./g, '%@%').replace(/~/g, '%%@@%%') + "']"; }) // Properties operator .replace(/~/g, ';~;') // Split by property boundaries .replace(/'?\.'?(?![^[]*\])|\['?/g, ';') // Reinsert periods within properties .replace(/%@%/g, '.') // Reinsert tildes within properties .replace(/%%@@%%/g, '~') // Parent .replace(/(?:;)?(\^+)(?:;)?/g, function ($0, ups) { return ';' + ups.split('').join(';') + ';'; }) // Descendents .replace(/;;;|;;/g, ';..;') // Remove trailing .replace(/;$|'?\]|'$/g, ''); var exprList = normalized.split(';').map(function (exp) { var match = exp.match(/#(\d+)/); return !match || !match[1] ? exp : subx[match[1]]; }); cache[expr] = exprList; return cache[expr]; }; exports.JSONPath = JSONPath; Object.defineProperty(exports, '__esModule', { value: true }); })); /***/ }), /***/ 6287: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { /* * lib/jsprim.js: utilities for primitive JavaScript types */ var mod_assert = __webpack_require__(66631); var mod_util = __webpack_require__(31669); var mod_extsprintf = __webpack_require__(87264); var mod_verror = __webpack_require__(81692); var mod_jsonschema = __webpack_require__(21328); /* * Public interface */ exports.deepCopy = deepCopy; exports.deepEqual = deepEqual; exports.isEmpty = isEmpty; exports.hasKey = hasKey; exports.forEachKey = forEachKey; exports.pluck = pluck; exports.flattenObject = flattenObject; exports.flattenIter = flattenIter; exports.validateJsonObject = validateJsonObjectJS; exports.validateJsonObjectJS = validateJsonObjectJS; exports.randElt = randElt; exports.extraProperties = extraProperties; exports.mergeObjects = mergeObjects; exports.startsWith = startsWith; exports.endsWith = endsWith; exports.parseInteger = parseInteger; exports.iso8601 = iso8601; exports.rfc1123 = rfc1123; exports.parseDateTime = parseDateTime; exports.hrtimediff = hrtimeDiff; exports.hrtimeDiff = hrtimeDiff; exports.hrtimeAccum = hrtimeAccum; exports.hrtimeAdd = hrtimeAdd; exports.hrtimeNanosec = hrtimeNanosec; exports.hrtimeMicrosec = hrtimeMicrosec; exports.hrtimeMillisec = hrtimeMillisec; /* * Deep copy an acyclic *basic* Javascript object. This only handles basic * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects * containing these. This does *not* handle instances of other classes. */ function deepCopy(obj) { var ret, key; var marker = '__deepCopy'; if (obj && obj[marker]) throw (new Error('attempted deep copy of cyclic object')); if (obj && obj.constructor == Object) { ret = {}; obj[marker] = true; for (key in obj) { if (key == marker) continue; ret[key] = deepCopy(obj[key]); } delete (obj[marker]); return (ret); } if (obj && obj.constructor == Array) { ret = []; obj[marker] = true; for (key = 0; key < obj.length; key++) ret.push(deepCopy(obj[key])); delete (obj[marker]); return (ret); } /* * It must be a primitive type -- just return it. */ return (obj); } function deepEqual(obj1, obj2) { if (typeof (obj1) != typeof (obj2)) return (false); if (obj1 === null || obj2 === null || typeof (obj1) != 'object') return (obj1 === obj2); if (obj1.constructor != obj2.constructor) return (false); var k; for (k in obj1) { if (!obj2.hasOwnProperty(k)) return (false); if (!deepEqual(obj1[k], obj2[k])) return (false); } for (k in obj2) { if (!obj1.hasOwnProperty(k)) return (false); } return (true); } function isEmpty(obj) { var key; for (key in obj) return (false); return (true); } function hasKey(obj, key) { mod_assert.equal(typeof (key), 'string'); return (Object.prototype.hasOwnProperty.call(obj, key)); } function forEachKey(obj, callback) { for (var key in obj) { if (hasKey(obj, key)) { callback(key, obj[key]); } } } function pluck(obj, key) { mod_assert.equal(typeof (key), 'string'); return (pluckv(obj, key)); } function pluckv(obj, key) { if (obj === null || typeof (obj) !== 'object') return (undefined); if (obj.hasOwnProperty(key)) return (obj[key]); var i = key.indexOf('.'); if (i == -1) return (undefined); var key1 = key.substr(0, i); if (!obj.hasOwnProperty(key1)) return (undefined); return (pluckv(obj[key1], key.substr(i + 1))); } /* * Invoke callback(row) for each entry in the array that would be returned by * flattenObject(data, depth). This is just like flattenObject(data, * depth).forEach(callback), except that the intermediate array is never * created. */ function flattenIter(data, depth, callback) { doFlattenIter(data, depth, [], callback); } function doFlattenIter(data, depth, accum, callback) { var each; var key; if (depth === 0) { each = accum.slice(0); each.push(data); callback(each); return; } mod_assert.ok(data !== null); mod_assert.equal(typeof (data), 'object'); mod_assert.equal(typeof (depth), 'number'); mod_assert.ok(depth >= 0); for (key in data) { each = accum.slice(0); each.push(key); doFlattenIter(data[key], depth - 1, each, callback); } } function flattenObject(data, depth) { if (depth === 0) return ([ data ]); mod_assert.ok(data !== null); mod_assert.equal(typeof (data), 'object'); mod_assert.equal(typeof (depth), 'number'); mod_assert.ok(depth >= 0); var rv = []; var key; for (key in data) { flattenObject(data[key], depth - 1).forEach(function (p) { rv.push([ key ].concat(p)); }); } return (rv); } function startsWith(str, prefix) { return (str.substr(0, prefix.length) == prefix); } function endsWith(str, suffix) { return (str.substr( str.length - suffix.length, suffix.length) == suffix); } function iso8601(d) { if (typeof (d) == 'number') d = new Date(d); mod_assert.ok(d.constructor === Date); return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ', d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())); } var RFC1123_MONTHS = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var RFC1123_DAYS = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; function rfc1123(date) { return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT', RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(), RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds())); } /* * Parses a date expressed as a string, as either a number of milliseconds since * the epoch or any string format that Date accepts, giving preference to the * former where these two sets overlap (e.g., small numbers). */ function parseDateTime(str) { /* * This is irritatingly implicit, but significantly more concise than * alternatives. The "+str" will convert a string containing only a * number directly to a Number, or NaN for other strings. Thus, if the * conversion succeeds, we use it (this is the milliseconds-since-epoch * case). Otherwise, we pass the string directly to the Date * constructor to parse. */ var numeric = +str; if (!isNaN(numeric)) { return (new Date(numeric)); } else { return (new Date(str)); } } /* * Number.*_SAFE_INTEGER isn't present before node v0.12, so we hardcode * the ES6 definitions here, while allowing for them to someday be higher. */ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991; /* * Default options for parseInteger(). */ var PI_DEFAULTS = { base: 10, allowSign: true, allowPrefix: false, allowTrailing: false, allowImprecise: false, trimWhitespace: false, leadingZeroIsOctal: false }; var CP_0 = 0x30; var CP_9 = 0x39; var CP_A = 0x41; var CP_B = 0x42; var CP_O = 0x4f; var CP_T = 0x54; var CP_X = 0x58; var CP_Z = 0x5a; var CP_a = 0x61; var CP_b = 0x62; var CP_o = 0x6f; var CP_t = 0x74; var CP_x = 0x78; var CP_z = 0x7a; var PI_CONV_DEC = 0x30; var PI_CONV_UC = 0x37; var PI_CONV_LC = 0x57; /* * A stricter version of parseInt() that provides options for changing what * is an acceptable string (for example, disallowing trailing characters). */ function parseInteger(str, uopts) { mod_assert.string(str, 'str'); mod_assert.optionalObject(uopts, 'options'); var baseOverride = false; var options = PI_DEFAULTS; if (uopts) { baseOverride = hasKey(uopts, 'base'); options = mergeObjects(options, uopts); mod_assert.number(options.base, 'options.base'); mod_assert.ok(options.base >= 2, 'options.base >= 2'); mod_assert.ok(options.base <= 36, 'options.base <= 36'); mod_assert.bool(options.allowSign, 'options.allowSign'); mod_assert.bool(options.allowPrefix, 'options.allowPrefix'); mod_assert.bool(options.allowTrailing, 'options.allowTrailing'); mod_assert.bool(options.allowImprecise, 'options.allowImprecise'); mod_assert.bool(options.trimWhitespace, 'options.trimWhitespace'); mod_assert.bool(options.leadingZeroIsOctal, 'options.leadingZeroIsOctal'); if (options.leadingZeroIsOctal) { mod_assert.ok(!baseOverride, '"base" and "leadingZeroIsOctal" are ' + 'mutually exclusive'); } } var c; var pbase = -1; var base = options.base; var start; var mult = 1; var value = 0; var idx = 0; var len = str.length; /* Trim any whitespace on the left side. */ if (options.trimWhitespace) { while (idx < len && isSpace(str.charCodeAt(idx))) { ++idx; } } /* Check the number for a leading sign. */ if (options.allowSign) { if (str[idx] === '-') { idx += 1; mult = -1; } else if (str[idx] === '+') { idx += 1; } } /* Parse the base-indicating prefix if there is one. */ if (str[idx] === '0') { if (options.allowPrefix) { pbase = prefixToBase(str.charCodeAt(idx + 1)); if (pbase !== -1 && (!baseOverride || pbase === base)) { base = pbase; idx += 2; } } if (pbase === -1 && options.leadingZeroIsOctal) { base = 8; } } /* Parse the actual digits. */ for (start = idx; idx < len; ++idx) { c = translateDigit(str.charCodeAt(idx)); if (c !== -1 && c < base) { value *= base; value += c; } else { break; } } /* If we didn't parse any digits, we have an invalid number. */ if (start === idx) { return (new Error('invalid number: ' + JSON.stringify(str))); } /* Trim any whitespace on the right side. */ if (options.trimWhitespace) { while (idx < len && isSpace(str.charCodeAt(idx))) { ++idx; } } /* Check for trailing characters. */ if (idx < len && !options.allowTrailing) { return (new Error('trailing characters after number: ' + JSON.stringify(str.slice(idx)))); } /* If our value is 0, we return now, to avoid returning -0. */ if (value === 0) { return (0); } /* Calculate our final value. */ var result = value * mult; /* * If the string represents a value that cannot be precisely represented * by JavaScript, then we want to check that: * * - We never increased the value past MAX_SAFE_INTEGER * - We don't make the result negative and below MIN_SAFE_INTEGER * * Because we only ever increment the value during parsing, there's no * chance of moving past MAX_SAFE_INTEGER and then dropping below it * again, losing precision in the process. This means that we only need * to do our checks here, at the end. */ if (!options.allowImprecise && (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) { return (new Error('number is outside of the supported range: ' + JSON.stringify(str.slice(start, idx)))); } return (result); } /* * Interpret a character code as a base-36 digit. */ function translateDigit(d) { if (d >= CP_0 && d <= CP_9) { /* '0' to '9' -> 0 to 9 */ return (d - PI_CONV_DEC); } else if (d >= CP_A && d <= CP_Z) { /* 'A' - 'Z' -> 10 to 35 */ return (d - PI_CONV_UC); } else if (d >= CP_a && d <= CP_z) { /* 'a' - 'z' -> 10 to 35 */ return (d - PI_CONV_LC); } else { /* Invalid character code */ return (-1); } } /* * Test if a value matches the ECMAScript definition of trimmable whitespace. */ function isSpace(c) { return (c === 0x20) || (c >= 0x0009 && c <= 0x000d) || (c === 0x00a0) || (c === 0x1680) || (c === 0x180e) || (c >= 0x2000 && c <= 0x200a) || (c === 0x2028) || (c === 0x2029) || (c === 0x202f) || (c === 0x205f) || (c === 0x3000) || (c === 0xfeff); } /* * Determine which base a character indicates (e.g., 'x' indicates hex). */ function prefixToBase(c) { if (c === CP_b || c === CP_B) { /* 0b/0B (binary) */ return (2); } else if (c === CP_o || c === CP_O) { /* 0o/0O (octal) */ return (8); } else if (c === CP_t || c === CP_T) { /* 0t/0T (decimal) */ return (10); } else if (c === CP_x || c === CP_X) { /* 0x/0X (hexadecimal) */ return (16); } else { /* Not a meaningful character */ return (-1); } } function validateJsonObjectJS(schema, input) { var report = mod_jsonschema.validate(input, schema); if (report.errors.length === 0) return (null); /* Currently, we only do anything useful with the first error. */ var error = report.errors[0]; /* The failed property is given by a URI with an irrelevant prefix. */ var propname = error['property']; var reason = error['message'].toLowerCase(); var i, j; /* * There's at least one case where the property error message is * confusing at best. We work around this here. */ if ((i = reason.indexOf('the property ')) != -1 && (j = reason.indexOf(' is not defined in the schema and the ' + 'schema does not allow additional properties')) != -1) { i += 'the property '.length; if (propname === '') propname = reason.substr(i, j - i); else propname = propname + '.' + reason.substr(i, j - i); reason = 'unsupported property'; } var rv = new mod_verror.VError('property "%s": %s', propname, reason); rv.jsv_details = error; return (rv); } function randElt(arr) { mod_assert.ok(Array.isArray(arr) && arr.length > 0, 'randElt argument must be a non-empty array'); return (arr[Math.floor(Math.random() * arr.length)]); } function assertHrtime(a) { mod_assert.ok(a[0] >= 0 && a[1] >= 0, 'negative numbers not allowed in hrtimes'); mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow'); } /* * Compute the time elapsed between hrtime readings A and B, where A is later * than B. hrtime readings come from Node's process.hrtime(). There is no * defined way to represent negative deltas, so it's illegal to diff B from A * where the time denoted by B is later than the time denoted by A. If this * becomes valuable, we can define a representation and extend the * implementation to support it. */ function hrtimeDiff(a, b) { assertHrtime(a); assertHrtime(b); mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]), 'negative differences not allowed'); var rv = [ a[0] - b[0], 0 ]; if (a[1] >= b[1]) { rv[1] = a[1] - b[1]; } else { rv[0]--; rv[1] = 1e9 - (b[1] - a[1]); } return (rv); } /* * Convert a hrtime reading from the array format returned by Node's * process.hrtime() into a scalar number of nanoseconds. */ function hrtimeNanosec(a) { assertHrtime(a); return (Math.floor(a[0] * 1e9 + a[1])); } /* * Convert a hrtime reading from the array format returned by Node's * process.hrtime() into a scalar number of microseconds. */ function hrtimeMicrosec(a) { assertHrtime(a); return (Math.floor(a[0] * 1e6 + a[1] / 1e3)); } /* * Convert a hrtime reading from the array format returned by Node's * process.hrtime() into a scalar number of milliseconds. */ function hrtimeMillisec(a) { assertHrtime(a); return (Math.floor(a[0] * 1e3 + a[1] / 1e6)); } /* * Add two hrtime readings A and B, overwriting A with the result of the * addition. This function is useful for accumulating several hrtime intervals * into a counter. Returns A. */ function hrtimeAccum(a, b) { assertHrtime(a); assertHrtime(b); /* * Accumulate the nanosecond component. */ a[1] += b[1]; if (a[1] >= 1e9) { /* * The nanosecond component overflowed, so carry to the seconds * field. */ a[0]++; a[1] -= 1e9; } /* * Accumulate the seconds component. */ a[0] += b[0]; return (a); } /* * Add two hrtime readings A and B, returning the result as a new hrtime array. * Does not modify either input argument. */ function hrtimeAdd(a, b) { assertHrtime(a); var rv = [ a[0], a[1] ]; return (hrtimeAccum(rv, b)); } /* * Check an object for unexpected properties. Accepts the object to check, and * an array of allowed property names (strings). Returns an array of key names * that were found on the object, but did not appear in the list of allowed * properties. If no properties were found, the returned array will be of * zero length. */ function extraProperties(obj, allowed) { mod_assert.ok(typeof (obj) === 'object' && obj !== null, 'obj argument must be a non-null object'); mod_assert.ok(Array.isArray(allowed), 'allowed argument must be an array of strings'); for (var i = 0; i < allowed.length; i++) { mod_assert.ok(typeof (allowed[i]) === 'string', 'allowed argument must be an array of strings'); } return (Object.keys(obj).filter(function (key) { return (allowed.indexOf(key) === -1); })); } /* * Given three sets of properties "provided" (may be undefined), "overrides" * (required), and "defaults" (may be undefined), construct an object containing * the union of these sets with "overrides" overriding "provided", and * "provided" overriding "defaults". None of the input objects are modified. */ function mergeObjects(provided, overrides, defaults) { var rv, k; rv = {}; if (defaults) { for (k in defaults) rv[k] = defaults[k]; } if (provided) { for (k in provided) rv[k] = provided[k]; } if (overrides) { for (k in overrides) rv[k] = overrides[k]; } return (rv); } /***/ }), /***/ 51531: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const JSONB = __webpack_require__(22820); 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) { key = this._getKeyPrefix(key); const store = this.opts.store; return Promise.resolve() .then(() => store.get(key)) .then(data => { data = (typeof data === 'string') ? this.opts.deserialize(data) : data; if (data === undefined) { return undefined; } if (typeof data.expires === 'number' && Date.now() > data.expires) { this.delete(key); return undefined; } return data.value; }); } set(key, value, ttl) { key = this._getKeyPrefix(key); if (typeof ttl === 'undefined') { ttl = this.opts.ttl; } if (ttl === 0) { ttl = undefined; } const store = this.opts.store; return Promise.resolve() .then(() => { const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; value = { value, expires }; return store.set(key, this.opts.serialize(value), ttl); }) .then(() => true); } delete(key) { key = this._getKeyPrefix(key); const store = this.opts.store; return Promise.resolve() .then(() => store.delete(key)); } clear() { const store = this.opts.store; return Promise.resolve() .then(() => store.clear()); } } module.exports = Keyv; /***/ }), /***/ 44793: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * Fetches a bearer token via comamnd */ // for API compatability /* eslint no-sync: 0 */ const spawnSync = __webpack_require__(63129).spawnSync function getProperty (propertyName, object) { // remove leading . if (propertyName.match(/^\./)) { propertyName = propertyName.replace(/^\./, '') } const parts = propertyName.split('.') const length = parts.length let property = object || this for (let i = 0; i < length; i++) { property = property[parts[i]] } return property } module.exports = { refresh: function (config) { return new Promise((resolve, reject) => { const cmd = config['cmd-path'] const args = config['cmd-args'].split(' ') const cmdEnv = config['cmd-env'] let output if (process.platform === 'win32') { output = spawnSync(cmd, args, { env: Object.assign({}, process.env, cmdEnv), windowsHide: true, shell: true }) } else { output = spawnSync(cmd, args, { env: Object.assign({}, process.env, cmdEnv), windowsHide: true }) } let result try { result = JSON.parse(output.stdout.toString('utf8')) } catch (err) { return reject(new Error('Failed to run cmd.')) } const token = getProperty(config['token-key'].replace(/[{}]+/g, ''), result) return resolve(token) }) } } /***/ }), /***/ 54562: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * Refreshes a OpenID token. */ const Issuer = __webpack_require__(53140).Issuer module.exports = { refresh: function (config) { return new Promise((resolve, reject) => { Issuer.discover(config['idp-issuer-url']) .then(function (ourIssuer) { const client = new ourIssuer.Client({ client_id: config['client-id'], client_secret: config['client-secret'] }) return client.refresh(config['refresh-token']) }) .then(tokenSet => { return resolve(tokenSet.id_token) }) .catch(reject) }) } } /***/ }), /***/ 78412: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { function __ncc_wildcard$0 (arg) { if (arg === "cmd") return __webpack_require__(44793); else if (arg === "openid") return __webpack_require__(54562); } 'use strict' const { convertKubeconfig } = __webpack_require__(91899) const deprecate = __webpack_require__(18883)('kubernetes-client') const JSONStream = __webpack_require__(81676) const pump = __webpack_require__(18341) const qs = __webpack_require__(22760) const request = __webpack_require__(48699) const urljoin = __webpack_require__(12821) const WebSocket = __webpack_require__(8120) /** * Refresh whatever authentication {type} is. * @param {String} type - type of authentication * @param {Object} config - auth provider config * @returns {Promise} with request friendly auth object */ function refreshAuth (type, config) { return new Promise((resolve, reject) => { const provider = __ncc_wildcard$0(type) provider.refresh(config) .then(result => { const auth = { bearer: result } return resolve(auth) }) .catch(err => reject(err)) }) } const execChannels = [ 'stdin', 'stdout', 'stderr', 'error', 'resize' ] /** * Determine whether a failed Kubernetes API response is asking for an upgrade * @param {object} body - response body object from Kubernetes * @property {string} status - request status * @property {number} code - previous request's response code * @property {message} message - previous request response message * @returns {boolean} Upgrade the request */ function isUpgradeRequired (body) { return body.status === 'Failure' && body.code === 400 && body.message === 'Upgrade request required' } /** * Upgrade a request into a Websocket transaction & process the result * @param {ApiRequestOptions} options - Options object * @param {callback} cb - The callback that handles the response */ function upgradeRequest (options, cb) { const queryParams = qs.stringify(options.qs, { indices: false }) const wsUrl = urljoin(options.baseUrl, options.uri, `?${queryParams}`) const protocol = 'base64.channel.k8s.io' // Passing authorization header options.headers = { ...options.headers, authorization: `Bearer ${options.auth.bearer}` } const ws = new WebSocket(wsUrl, protocol, options) const messages = [] ws.on('message', (msg) => { const channel = execChannels[msg.slice(0, 1)] const message = Buffer.from(msg.slice(1), 'base64').toString('ascii') messages.push({ channel, message }) }) ws.on('error', (err) => { err.messages = messages cb(err, messages) }) ws.on('close', (code, reason) => cb(null, { messages, body: messages.map(({ message }) => message).join(''), code, reason })) return ws } class Request { /** * Internal representation of HTTP request object. * * @param {object} options - Options object * @param {string} options.url - Kubernetes API URL * @param {object} options.auth - request library auth object * @param {string} options.ca - Certificate authority * @param {string} options.cert - Client certificate * @param {string} options.key - Client key * @param {boolean} options.insecureSkipTlsVerify - Skip the validity check * on the server's certificate. */ constructor (options) { this.requestOptions = options.request || {} let convertedOptions if (!options.kubeconfig) { deprecate('Request() without a .kubeconfig option, see ' + 'https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md') convertedOptions = options } else { convertedOptions = convertKubeconfig(options.kubeconfig) } this.requestOptions.qsStringifyOptions = { indices: false } this.requestOptions.baseUrl = convertedOptions.url this.requestOptions.ca = convertedOptions.ca this.requestOptions.cert = convertedOptions.cert this.requestOptions.key = convertedOptions.key if ('insecureSkipTlsVerify' in convertedOptions) { this.requestOptions.strictSSL = !convertedOptions.insecureSkipTlsVerify } if ('timeout' in convertedOptions) { this.requestOptions.timeout = convertedOptions.timeout } this.authProvider = { type: null } if (convertedOptions.auth) { this.requestOptions.auth = convertedOptions.auth if (convertedOptions.auth.provider) { this.requestOptions.auth = convertedOptions.auth.request this.authProvider = convertedOptions.auth.provider } } } _request (options, cb) { const auth = this.authProvider return request(options, (err, res, body) => { if (err) return cb(err) if (body && isUpgradeRequired(body)) { return upgradeRequest(options, cb) } // Refresh auth if 401 or 403 if ((res.statusCode === 401 || res.statusCode === 403) && auth.type) { return refreshAuth(auth.type, auth.config) .then(newAuth => { this.requestOptions.auth = newAuth options.auth = newAuth return request(options, (err, res, body) => { if (err) return cb(err) return cb(null, { statusCode: res.statusCode, body }) }) }) .catch(err => cb(err)) } return cb(null, { statusCode: res.statusCode, body: body }) }) } async getLogByteStream (options) { return this.http(Object.assign({ stream: true }, options)) } async getWatchObjectStream (options) { const jsonStream = new JSONStream() const stream = this.http(Object.assign({ stream: true }, options)) pump(stream, jsonStream) return jsonStream } /** * @param {object} options - Options object * @param {Stream} options.stdin - optional stdin Readable stream * @param {Stream} options.stdout - optional stdout Writeable stream * @param {Stream} options.stderr - optional stdout Writeable stream * @returns {Promise} Promise resolving to a Kubernetes V1 Status object and a WebSocket */ async getWebSocket (options) { throw new Error('Request.getWebSocket not implemented') } /** * @typedef {object} ApiRequestOptions * @property {object} body - Request body * @property {object} headers - Headers object * @property {string} path - version-less path * @property {object} qs - {@link https://www.npmjs.com/package/request#requestoptions-callback| * request query parameter} */ /** * Invoke a REST request against the Kubernetes API server * @param {string} method - HTTP method, passed directly to `request` * @param {ApiRequestOptions} options - Options object * @param {callback} cb - The callback that handles the response * @returns {Stream} If cb is falsy, return a stream */ http (options) { const uri = options.pathname const requestOptions = Object.assign({ method: options.method, uri, body: options.body, json: 'json' in options ? Boolean(options.json) : true, qs: options.parameters || options.qs, headers: options.headers }, this.requestOptions) if (options.noAuth) { delete requestOptions.auth } if (options.stream) return request(requestOptions) return new Promise((resolve, reject) => { this._request(requestOptions, (err, res) => { if (err) return reject(err) if (res.statusCode < 200 || res.statusCode > 299) { const error = new Error(res.body.message || res.body) // .code is backwards compatible with pre-5.0.0 code. error.code = res.statusCode error.statusCode = res.statusCode return reject(error) } resolve(res) }) }) } } module.exports = Request /***/ }), /***/ 91899: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint no-process-env: 0 no-sync:0 */ const deprecate = __webpack_require__(18883)('kubernetes-client') const fs = __webpack_require__(35747) const path = __webpack_require__(85622) const yaml = __webpack_require__(17443) const merge = __webpack_require__(56323) const root = process.env.KUBERNETES_CLIENT_SERVICEACCOUNT_ROOT || '/var/run/secrets/kubernetes.io/serviceaccount/' const caPath = path.join(root, 'ca.crt') const tokenPath = path.join(root, 'token') const namespacePath = path.join(root, 'namespace') function convertKubeconfig (kubeconfig) { const context = kubeconfig.getCurrentContext() const cluster = kubeconfig.getCurrentCluster() const user = kubeconfig.getCurrentUser() const namespace = context.namespace let ca let insecureSkipTlsVerify = false if (cluster) { if (cluster.caFile) { ca = fs.readFileSync(path.normalize(cluster.caFile)) } else if (cluster.caData) { ca = Buffer.from(cluster.caData, 'base64').toString() } insecureSkipTlsVerify = cluster.skipTLSVerify } let cert let key let auth = {} if (user) { if (user.certFile) { cert = fs.readFileSync(path.normalize(user.certFile)) } else if (user.certData) { cert = Buffer.from(user.certData, 'base64').toString() } if (user.keyFile) { key = fs.readFileSync(path.normalize(user.keyFile)) } else if (user.keyData) { key = Buffer.from(user.keyData, 'base64').toString() } if (user.token) { auth.bearer = user.token } if (user.authProvider) { const config = user.authProvider.config // if we can't determine the type, just fail later (or don't refresh). let type = null let token = null if (config['cmd-path']) { type = 'cmd' token = config['access-token'] } else if (config['idp-issuer-url']) { type = 'openid' token = config['id-token'] } // If we have just an access-token, allow that... will expire later though. if (config['access-token'] && !type) { token = config['access-token'] } auth = { request: { bearer: token }, provider: { config, type } } } if (user.exec) { const env = {} if (user.exec.env) { user.exec.env.forEach(variable => { env[variable.name] = variable.value }) } let args = '' if (user.exec.args) { args = user.exec.args.join(' ') } auth = { provider: { type: 'cmd', config: { 'cmd-args': args, 'cmd-path': user.exec.command, 'token-key': 'status.token', 'cmd-env': env } } } } if (user.username) auth.user = user.username if (user.password) auth.pass = user.password } return { url: cluster.server, auth: Object.keys(auth).length ? auth : null, ca, insecureSkipTlsVerify, namespace, cert, key } } module.exports.convertKubeconfig = convertKubeconfig function defaultConfigPaths () { if (process.env.KUBECONFIG) { // From https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable // KUBECONFIG can support multiple config files. const delimiter = process.platform === 'win32' ? ';' : ':' return process.env.KUBECONFIG.split(delimiter) } const homeDir = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'] return [path.join(homeDir, '.kube', 'config')] } /** * Returns with in cluster config * Based on: https://github.com/kubernetes/client-go/blob/124670e99da15091e13916f0ad4b2b2df2a39cd5/rest/config.go#L274 * and http://kubernetes.io/docs/user-guide/accessing-the-cluster/#accessing-the-api-from-a-pod * * @function getInCluster * @returns {Object} { url, cert, auth, namespace } */ function getInCluster () { const host = process.env.KUBERNETES_SERVICE_HOST const port = process.env.KUBERNETES_SERVICE_PORT if (!host || !port) { throw new TypeError( 'Unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST' + ' and KUBERNETES_SERVICE_PORT must be defined') } const ca = fs.readFileSync(caPath, 'utf8') const bearer = fs.readFileSync(tokenPath, 'utf8') const namespace = fs.readFileSync(namespacePath, 'utf8') return { url: `https://${host}:${port}`, ca, auth: { bearer }, namespace } } module.exports.getInCluster = deprecate.function( getInCluster, 'getInCluster see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig-') // // Accept a manually specified current-context to take precedence over // `current-context` // /* eslint-disable complexity, max-statements */ function fromKubeconfig (kubeconfig, current) { if (!kubeconfig) kubeconfig = loadKubeconfig() // if kubeconfig is provided as a path to the yaml file, // or array of paths to the yaml files, // automatically load it. if (typeof kubeconfig === 'string' || Array.isArray(kubeconfig)) { kubeconfig = loadKubeconfig(kubeconfig) } current = current || kubeconfig['current-context'] const context = kubeconfig.contexts .find(item => item.name === current).context const cluster = kubeconfig.clusters .find(item => item.name === context.cluster).cluster const userConfig = kubeconfig.users .find(user => user.name === context.user) const user = userConfig ? userConfig.user : null const namespace = context.namespace let ca let insecureSkipTlsVerify = false if (cluster) { if (cluster['certificate-authority']) { ca = fs.readFileSync(path.normalize(cluster['certificate-authority'])) } else if (cluster['certificate-authority-data']) { ca = Buffer.from(cluster['certificate-authority-data'], 'base64').toString() } if (cluster['insecure-skip-tls-verify']) { insecureSkipTlsVerify = cluster['insecure-skip-tls-verify'] } } let cert let key let auth = {} if (user) { if (user['client-certificate']) { cert = fs.readFileSync(path.normalize(user['client-certificate'])) } else if (user['client-certificate-data']) { cert = Buffer.from(user['client-certificate-data'], 'base64').toString() } if (user['client-key']) { key = fs.readFileSync(path.normalize(user['client-key'])) } else if (user['client-key-data']) { key = Buffer.from(user['client-key-data'], 'base64').toString() } if (user.token) { auth.bearer = user.token } if (user['auth-provider']) { const config = user['auth-provider'].config // if we can't determine the type, just fail later (or don't refresh). let type = null let token = null if (config['cmd-path']) { type = 'cmd' token = config['access-token'] } else if (config['idp-issuer-url']) { type = 'openid' token = config['id-token'] } // If we have just an access-token, allow that... will expire later though. if (config['access-token'] && !type) { token = config['access-token'] } auth = { request: { bearer: token }, provider: { config, type } } } if (user.exec) { const env = {} if (user.exec.env) { user.exec.env.forEach(variable => { env[variable.name] = variable.value }) } let args = '' if (user.exec.args) { args = user.exec.args.join(' ') } auth = { provider: { type: 'cmd', config: { 'cmd-args': args, 'cmd-path': user.exec.command, 'token-key': 'status.token', 'cmd-env': env } } } } if (user.username) auth.user = user.username if (user.password) auth.pass = user.password } return { url: cluster.server, namespace, auth: Object.keys(auth).length ? auth : null, ca, insecureSkipTlsVerify, key, cert } } /* eslint-enable complexity, max-statements */ module.exports.fromKubeconfig = deprecate.function( fromKubeconfig, 'fromKubeconfig see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig-') function mapCertificates (cfgPath, config) { const configDir = path.dirname(cfgPath) if (config.clusters) { config.clusters.filter(cluster => cluster.cluster['certificate-authority']).forEach(cluster => { cluster.cluster['certificate-authority'] = path.resolve(configDir, cluster.cluster['certificate-authority']) }) } if (config.users) { config.users.filter(user => user.user['client-certificate']).forEach(user => { user.user['client-certificate'] = path.resolve(configDir, user.user['client-certificate']) }) config.users.filter(user => user.user['client-key']).forEach(user => { user.user['client-key'] = path.resolve(configDir, user.user['client-key']) }) } return config } function loadKubeconfig (cfgPath) { let cfgPaths if (!cfgPath) { cfgPaths = defaultConfigPaths() } else if (Array.isArray(cfgPath)) { cfgPaths = cfgPath } else { cfgPaths = [cfgPath] } const configs = cfgPaths.map(cfgPath => { const config = yaml.safeLoad(fs.readFileSync(cfgPath)) return mapCertificates(cfgPath, config) }) return merge.all(configs) } module.exports.loadKubeconfig = deprecate.function( loadKubeconfig, 'loadKubeconfig see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig-') /***/ }), /***/ 67002: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Request = __webpack_require__(78412) Request.config = __webpack_require__(91899) module.exports = Request /***/ }), /***/ 74790: /***/ ((module) => { "use strict"; // We support the full names and all the abbbreviated aliases: // http://kubernetes.io/docs/user-guide/kubectl-overview/ // and anything else we think is useful. const resourceAliases = { clusterroles: [], clusterrolebindings: [], componentstatuses: ['cs'], configmaps: ['cm'], cronjobs: [], customresourcedefinitions: ['crd'], daemonsets: ['ds'], deployments: ['deploy'], events: ['ev'], endpoints: ['ep'], horizontalpodautoscalers: ['hpa'], ingresses: ['ing'], jobs: [], limitranges: ['limits'], namespaces: ['ns'], nodes: ['no'], persistentvolumes: ['pv'], persistentvolumeclaims: ['pvc'], // Deprecated name of statefulsets in kubernetes 1.4 petsets: [], pods: ['po'], replicationcontrollers: ['rc'], replicasets: ['rs'], resourcequotas: ['quota'], roles: [], rolebindings: [], // Deprecated name of cronjobs in kubernetes 1.4 scheduledjobs: [], secrets: [], serviceaccounts: [], services: ['svc'], statefulsets: [], // Deprecated name of customresourcedefinition in kubernetes 1.7 thirdpartyresources: [] } const esPlurals = { componentstatuses: true, ingresses: true } const excludeFromAliasing = { apis: true, status: true } module.exports = function (resourceType) { let aliases = [resourceType] if (resourceAliases[resourceType]) { aliases = aliases.concat(resourceAliases[resourceType]) } // // NOTE(sbw): try to catch things that shouldn't have singular aliases. This // fails on some relatively common resources, like "status". // if ((resourceType.slice(-1) !== 's') || (resourceType in excludeFromAliasing)) { return aliases } const trimLength = esPlurals[resourceType] ? 2 : 1 const single = resourceType.substr(0, resourceType.length - trimLength) aliases.push(single) return aliases } /***/ }), /***/ 8428: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const k8s = __webpack_require__(89679) module.exports = k8s.KubeConfig /***/ }), /***/ 98862: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const deprecate = __webpack_require__(18883)('kubernetes-client') module.exports = { Client: __webpack_require__(10760).Client, Client1_13: __webpack_require__(10760).Client1_13, alias: __webpack_require__(74790), config: __webpack_require__(91899), KubeConfig: __webpack_require__(8428) } deprecate.property( module.exports, 'config', 'require(\'kubernetes-client\').config,' + ' use require(\'kubernetes-client/backends/request\').config.') /***/ }), /***/ 10760: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable no-sync */ /** * @file Convert a Swagger specification into a kubernetes-client API client. * * Represent Swagger a Path Item Object [1] with chains of objects: * * /api/v1/namespaces -> api.v1.namespaces * * Associate operations on a Path Item Object with functions: * * GET /api/v1/namespaces -> api.v1.namespaces.get() * * Represent Path Templating [2] with function calls: * * /api/v1/namespaces/{namespace}/pods -> api.v1.namespaces(namespace).pods * * Iterate over a Paths Object [3] to generate whole API client. * * [1]: https://swagger.io/specification/#pathItemObject * [2]: https://swagger.io/specification/#pathTemplating * [3]: https://swagger.io/specification/#pathsObject */ const Component = __webpack_require__(96789).Component const deprecate = __webpack_require__(18883)('kubernetes-client') const fs = __webpack_require__(35747) const KubeConfig = __webpack_require__(8428) const path = __webpack_require__(85622) const zlib = __webpack_require__(78761) const getAliases = __webpack_require__(74790) const Request = __webpack_require__(67002) class Root extends Component { _getSpec (pathname) { return this.backend.http({ method: 'GET', pathname }) .then(res => { return res.body }) } /** * Load swagger.json from kube-apiserver. * @returns {Promise} Promise */ loadSpec () { return this._getSpec('/openapi/v2') .catch(() => { return this._getSpec('/swagger.json') }) .then(res => { this._addSpec(res) return this }) .catch(err => { throw new Error(`Failed to get /openapi/v2 and /swagger.json: ${err.message}`) }) } _getLogByteStream (options) { return this.backend.getLogByteStream(Object.assign({ method: 'GET', pathItemObject: this.pathItemObject, pathname: this.getPath(), pathnameParameters: this.getPathnameParameters() }, options)) } async _getWatchObjectStream (options) { return this.backend.getWatchObjectStream(Object.assign({ method: 'GET', pathItemObject: this.pathItemObject, pathname: this.getPath(), pathnameParameters: this.getPathnameParameters() }, options)) } _addEndpoint (endpoint) { const component = super._addEndpoint(endpoint) if (!component) return component // // Deprecate stream API. // if (endpoint.pathItem.get) { const action = endpoint.pathItem.get['x-kubernetes-action'] if (action === 'watch' || action === 'watchlist') { component.getStream = deprecate.function( component.getStream, '.getStream use .getObjectStream, see ' + 'https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md') component.getObjectStream = component._getWatchObjectStream } else if (endpoint.name === '/api/v1/namespaces/{namespace}/pods/{name}/log') { component.getStream = deprecate.function( component.getStream, '.getStream use .getByteStream, see ' + 'https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md') component.getByteStream = component._getLogByteStream } else { component.getStream = deprecate.function( component.getStream, '.getStream see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md') } } } addCustomResourceDefinition (manifest) { const group = manifest.spec.group const name = manifest.spec.names.plural const namespace = manifest.spec.scope === 'Cluster' ? '' : '/namespaces/{namespace}' const addSpec = (version) => { const spec = { paths: {} } // // Make just enough of Swagger spec to generate some useful endpoints. // const templatePath = `/apis/${group}/${version}${namespace}/${name}/{name}` spec.paths[templatePath] = ['delete', 'get', 'patch', 'put'].reduce((acc, method) => { acc[method] = { operationId: `${method}Template${name}` } return acc }, {}) const resourcePath = `/apis/${group}/${version}${namespace}/${name}` spec.paths[resourcePath] = ['get', 'post'].reduce((acc, method) => { acc[method] = { operationId: `${method}${name}` } return acc }, {}) // // Namespaced CRDs get a cluster-level GET endpoint. // Similar to GET /api/v1/pods. // if (manifest.spec.scope === 'Namespaced') { const clusterPath = `/apis/${group}/${version}/${name}` spec.paths[clusterPath] = { get: { operationId: `getCluster${name}` } } } const watchPaths = { watchCluster: `/apis/${group}/${version}/watch/${name}`, watchNamespace: `/apis/${group}/${version}/watch${namespace}/${name}`, watchResource: `/apis/${group}/${version}/watch${namespace}/${name}/{name}` } Object.keys(watchPaths).forEach(operationId => { const watchPath = watchPaths[operationId] spec.paths[watchPath] = { get: { 'x-kubernetes-action': 'watch', operationId: `operationId${name}` } } }) // Add status endpoint - see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#customresourcesubresourcestatus-v1beta1-apiextensions-k8s-io if (manifest.spec.subresources && manifest.spec.subresources.status) { const statusPath = `/apis/${group}/${version}${namespace}/${name}/{name}/status` spec.paths[statusPath] = ['get', 'put'].reduce((acc, method) => { acc[method] = { operationId: `${method}Template${name}` } return acc }, {}) } // Add scale endpoints - see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#customresourcesubresourcescale-v1beta1-apiextensions-k8s-io if (manifest.spec.subresources && manifest.spec.subresources.scale) { const statusPath = `/apis/${group}/${version}${namespace}/${name}/{name}/scale` spec.paths[statusPath] = ['get', 'put'].reduce((acc, method) => { acc[method] = { operationId: `${method}Template${name}` } return acc }, {}) } this._addSpec(spec) } if (manifest.spec.version) { addSpec(manifest.spec.version) } else { const versions = manifest.spec.versions || [] versions.forEach(version => addSpec(version.name)) } } } class Client { constructor (options) { options = options || {} if (options.config) { deprecate('Client({ config }), see ' + 'https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md') } let backend = options.backend if (!backend) { if (options.config) { backend = new Request(options.config) } else { const kubeconfig = new KubeConfig() kubeconfig.loadFromDefault() backend = new Request({ kubeconfig }) } } let spec = options.spec if (!spec && options.version) { const swaggerPath = path.join( __dirname, 'specs', `swagger-${options.version}.json.gz`) spec = JSON.parse(zlib.gunzipSync(fs.readFileSync(swaggerPath))) } const root = new Root({ splits: [], backend, getNames: options.getNames || getAliases }) if (spec) root._addSpec(spec) return root } } // eslint-disable-next-line camelcase class Client1_13 extends Client { constructor (options) { super(Object.assign({}, options, { version: '1.13' })) } } module.exports = { Client, Client1_13 } /***/ }), /***/ 17443: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var yaml = __webpack_require__(44234); module.exports = yaml; /***/ }), /***/ 44234: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var loader = __webpack_require__(59480); var dumper = __webpack_require__(78992); function deprecated(name) { return function () { throw new Error('Function ' + name + ' is deprecated and cannot be used.'); }; } module.exports.Type = __webpack_require__(53525); module.exports.Schema = __webpack_require__(23607); module.exports.FAILSAFE_SCHEMA = __webpack_require__(48070); module.exports.JSON_SCHEMA = __webpack_require__(79069); module.exports.CORE_SCHEMA = __webpack_require__(11078); module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(76413); module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(51930); 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__(72734); // Deprecated schema names from JS-YAML 2.0.x module.exports.MINIMAL_SCHEMA = __webpack_require__(48070); module.exports.SAFE_SCHEMA = __webpack_require__(76413); module.exports.DEFAULT_SCHEMA = __webpack_require__(51930); // 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'); /***/ }), /***/ 93083: /***/ ((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; /***/ }), /***/ 78992: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable no-use-before-define*/ var common = __webpack_require__(93083); var YAMLException = __webpack_require__(72734); var DEFAULT_FULL_SCHEMA = __webpack_require__(51930); var DEFAULT_SAFE_SCHEMA = __webpack_require__(76413); 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; /***/ }), /***/ 72734: /***/ ((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; /***/ }), /***/ 59480: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable max-len,no-use-before-define*/ var common = __webpack_require__(93083); var YAMLException = __webpack_require__(72734); var Mark = __webpack_require__(79499); var DEFAULT_SAFE_SCHEMA = __webpack_require__(76413); var DEFAULT_FULL_SCHEMA = __webpack_require__(51930); 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 (!state.anchorMap.hasOwnProperty(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; /***/ }), /***/ 79499: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(93083); 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; /***/ }), /***/ 23607: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*eslint-disable max-len*/ var common = __webpack_require__(93083); var YAMLException = __webpack_require__(72734); var Type = __webpack_require__(53525); 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; /***/ }), /***/ 11078: /***/ ((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__(23607); module.exports = new Schema({ include: [ __webpack_require__(79069) ] }); /***/ }), /***/ 51930: /***/ ((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__(23607); module.exports = Schema.DEFAULT = new Schema({ include: [ __webpack_require__(76413) ], explicit: [ __webpack_require__(52982), __webpack_require__(47522), __webpack_require__(99945) ] }); /***/ }), /***/ 76413: /***/ ((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__(23607); module.exports = new Schema({ include: [ __webpack_require__(11078) ], implicit: [ __webpack_require__(72966), __webpack_require__(56436) ], explicit: [ __webpack_require__(49152), __webpack_require__(60318), __webpack_require__(29764), __webpack_require__(38394) ] }); /***/ }), /***/ 48070: /***/ ((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__(23607); module.exports = new Schema({ explicit: [ __webpack_require__(75849), __webpack_require__(73262), __webpack_require__(28535) ] }); /***/ }), /***/ 79069: /***/ ((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__(23607); module.exports = new Schema({ include: [ __webpack_require__(48070) ], implicit: [ __webpack_require__(67351), __webpack_require__(24438), __webpack_require__(79533), __webpack_require__(99053) ] }); /***/ }), /***/ 53525: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var YAMLException = __webpack_require__(72734); 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; /***/ }), /***/ 49152: /***/ ((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__(53525); // [ 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 }); /***/ }), /***/ 24438: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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' }); /***/ }), /***/ 99053: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(93083); var Type = __webpack_require__(53525); 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' }); /***/ }), /***/ 79533: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var common = __webpack_require__(93083); var Type = __webpack_require__(53525); 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' ] } }); /***/ }), /***/ 99945: /***/ ((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__(53525); 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 }); /***/ }), /***/ 47522: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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 }); /***/ }), /***/ 52982: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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 }); /***/ }), /***/ 28535: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); module.exports = new Type('tag:yaml.org,2002:map', { kind: 'mapping', construct: function (data) { return data !== null ? data : {}; } }); /***/ }), /***/ 56436: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); function resolveYamlMerge(data) { return data === '<<' || data === null; } module.exports = new Type('tag:yaml.org,2002:merge', { kind: 'scalar', resolve: resolveYamlMerge }); /***/ }), /***/ 67351: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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' }); /***/ }), /***/ 60318: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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 }); /***/ }), /***/ 29764: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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 }); /***/ }), /***/ 73262: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); module.exports = new Type('tag:yaml.org,2002:seq', { kind: 'sequence', construct: function (data) { return data !== null ? data : []; } }); /***/ }), /***/ 38394: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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 }); /***/ }), /***/ 75849: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); module.exports = new Type('tag:yaml.org,2002:str', { kind: 'scalar', construct: function (data) { return data !== null ? data : ''; } }); /***/ }), /***/ 72966: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Type = __webpack_require__(53525); 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 }); /***/ }), /***/ 8120: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const WebSocket = __webpack_require__(30418); WebSocket.createWebSocketStream = __webpack_require__(61997); WebSocket.Server = __webpack_require__(89535); WebSocket.Receiver = __webpack_require__(1937); WebSocket.Sender = __webpack_require__(7748); module.exports = WebSocket; /***/ }), /***/ 20034: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { EMPTY_BUFFER } = __webpack_require__(94122); /** * Merges an array of buffers into a new buffer. * * @param {Buffer[]} list The array of buffers to concat * @param {Number} totalLength The total length of buffers in the list * @return {Buffer} The resulting buffer * @public */ function concat(list, totalLength) { if (list.length === 0) return EMPTY_BUFFER; if (list.length === 1) return list[0]; const target = Buffer.allocUnsafe(totalLength); let offset = 0; for (let i = 0; i < list.length; i++) { const buf = list[i]; target.set(buf, offset); offset += buf.length; } if (offset < totalLength) return target.slice(0, offset); return target; } /** * Masks a buffer using the given mask. * * @param {Buffer} source The buffer to mask * @param {Buffer} mask The mask to use * @param {Buffer} output The buffer where to store the result * @param {Number} offset The offset at which to start writing * @param {Number} length The number of bytes to mask. * @public */ function _mask(source, mask, output, offset, length) { for (let i = 0; i < length; i++) { output[offset + i] = source[i] ^ mask[i & 3]; } } /** * Unmasks a buffer using the given mask. * * @param {Buffer} buffer The buffer to unmask * @param {Buffer} mask The mask to use * @public */ function _unmask(buffer, mask) { // Required until https://github.com/nodejs/node/issues/9006 is resolved. const length = buffer.length; for (let i = 0; i < length; i++) { buffer[i] ^= mask[i & 3]; } } /** * Converts a buffer to an `ArrayBuffer`. * * @param {Buffer} buf The buffer to convert * @return {ArrayBuffer} Converted buffer * @public */ function toArrayBuffer(buf) { if (buf.byteLength === buf.buffer.byteLength) { return buf.buffer; } return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); } /** * Converts `data` to a `Buffer`. * * @param {*} data The data to convert * @return {Buffer} The buffer * @throws {TypeError} * @public */ function toBuffer(data) { toBuffer.readOnly = true; if (Buffer.isBuffer(data)) return data; let buf; if (data instanceof ArrayBuffer) { buf = Buffer.from(data); } else if (ArrayBuffer.isView(data)) { buf = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } else { buf = Buffer.from(data); toBuffer.readOnly = false; } return buf; } try { const bufferUtil = __webpack_require__(71269); const bu = bufferUtil.BufferUtil || bufferUtil; module.exports = { concat, mask(source, mask, output, offset, length) { if (length < 48) _mask(source, mask, output, offset, length); else bu.mask(source, mask, output, offset, length); }, toArrayBuffer, toBuffer, unmask(buffer, mask) { if (buffer.length < 32) _unmask(buffer, mask); else bu.unmask(buffer, mask); } }; } catch (e) /* istanbul ignore next */ { module.exports = { concat, mask: _mask, toArrayBuffer, toBuffer, unmask: _unmask }; } /***/ }), /***/ 94122: /***/ ((module) => { "use strict"; module.exports = { BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'], GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', kStatusCode: Symbol('status-code'), kWebSocket: Symbol('websocket'), EMPTY_BUFFER: Buffer.alloc(0), NOOP: () => {} }; /***/ }), /***/ 63406: /***/ ((module) => { "use strict"; /** * Class representing an event. * * @private */ class Event { /** * Create a new `Event`. * * @param {String} type The name of the event * @param {Object} target A reference to the target to which the event was dispatched */ constructor(type, target) { this.target = target; this.type = type; } } /** * Class representing a message event. * * @extends Event * @private */ class MessageEvent extends Event { /** * Create a new `MessageEvent`. * * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(data, target) { super('message', target); this.data = data; } } /** * Class representing a close event. * * @extends Event * @private */ class CloseEvent extends Event { /** * Create a new `CloseEvent`. * * @param {Number} code The status code explaining why the connection is being closed * @param {String} reason A human-readable string explaining why the connection is closing * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(code, reason, target) { super('close', target); this.wasClean = target._closeFrameReceived && target._closeFrameSent; this.reason = reason; this.code = code; } } /** * Class representing an open event. * * @extends Event * @private */ class OpenEvent extends Event { /** * Create a new `OpenEvent`. * * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(target) { super('open', target); } } /** * Class representing an error event. * * @extends Event * @private */ class ErrorEvent extends Event { /** * Create a new `ErrorEvent`. * * @param {Object} error The error that generated this event * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(error, target) { super('error', target); this.message = error.message; this.error = error; } } /** * This provides methods for emulating the `EventTarget` interface. It's not * meant to be used directly. * * @mixin */ const EventTarget = { /** * Register an event listener. * * @param {String} type A string representing the event type to listen for * @param {Function} listener The listener to add * @param {Object} options An options object specifies characteristics about * the event listener * @param {Boolean} options.once A `Boolean`` indicating that the listener * should be invoked at most once after being added. If `true`, the * listener would be automatically removed when invoked. * @public */ addEventListener(type, listener, options) { if (typeof listener !== 'function') return; function onMessage(data) { listener.call(this, new MessageEvent(data, this)); } function onClose(code, message) { listener.call(this, new CloseEvent(code, message, this)); } function onError(error) { listener.call(this, new ErrorEvent(error, this)); } function onOpen() { listener.call(this, new OpenEvent(this)); } const method = options && options.once ? 'once' : 'on'; if (type === 'message') { onMessage._listener = listener; this[method](type, onMessage); } else if (type === 'close') { onClose._listener = listener; this[method](type, onClose); } else if (type === 'error') { onError._listener = listener; this[method](type, onError); } else if (type === 'open') { onOpen._listener = listener; this[method](type, onOpen); } else { this[method](type, listener); } }, /** * Remove an event listener. * * @param {String} type A string representing the event type to remove * @param {Function} listener The listener to remove * @public */ removeEventListener(type, listener) { const listeners = this.listeners(type); for (let i = 0; i < listeners.length; i++) { if (listeners[i] === listener || listeners[i]._listener === listener) { this.removeListener(type, listeners[i]); } } } }; module.exports = EventTarget; /***/ }), /***/ 97821: /***/ ((module) => { "use strict"; // // Allowed token characters: // // '!', '#', '$', '%', '&', ''', '*', '+', '-', // '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~' // // tokenChars[32] === 0 // ' ' // tokenChars[33] === 1 // '!' // tokenChars[34] === 0 // '"' // ... // // prettier-ignore const tokenChars = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127 ]; /** * Adds an offer to the map of extension offers or a parameter to the map of * parameters. * * @param {Object} dest The map of extension offers or parameters * @param {String} name The extension or parameter name * @param {(Object|Boolean|String)} elem The extension parameters or the * parameter value * @private */ function push(dest, name, elem) { if (dest[name] === undefined) dest[name] = [elem]; else dest[name].push(elem); } /** * Parses the `Sec-WebSocket-Extensions` header into an object. * * @param {String} header The field value of the header * @return {Object} The parsed object * @public */ function parse(header) { const offers = Object.create(null); if (header === undefined || header === '') return offers; let params = Object.create(null); let mustUnescape = false; let isEscaping = false; let inQuotes = false; let extensionName; let paramName; let start = -1; let end = -1; let i = 0; for (; i < header.length; i++) { const code = header.charCodeAt(i); if (extensionName === undefined) { if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x20 /* ' ' */ || code === 0x09 /* '\t' */) { if (end === -1 && start !== -1) end = i; } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; const name = header.slice(start, end); if (code === 0x2c) { push(offers, name, params); params = Object.create(null); } else { extensionName = name; } start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else if (paramName === undefined) { if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x20 || code === 0x09) { if (end === -1 && start !== -1) end = i; } else if (code === 0x3b || code === 0x2c) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; push(params, header.slice(start, end), true); if (code === 0x2c) { push(offers, extensionName, params); params = Object.create(null); extensionName = undefined; } start = end = -1; } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) { paramName = header.slice(start, i); start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else { // // The value of a quoted-string after unescaping must conform to the // token ABNF, so only token characters are valid. // Ref: https://tools.ietf.org/html/rfc6455#section-9.1 // if (isEscaping) { if (tokenChars[code] !== 1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (start === -1) start = i; else if (!mustUnescape) mustUnescape = true; isEscaping = false; } else if (inQuotes) { if (tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x22 /* '"' */ && start !== -1) { inQuotes = false; end = i; } else if (code === 0x5c /* '\' */) { isEscaping = true; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { inQuotes = true; } else if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (start !== -1 && (code === 0x20 || code === 0x09)) { if (end === -1) end = i; } else if (code === 0x3b || code === 0x2c) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; let value = header.slice(start, end); if (mustUnescape) { value = value.replace(/\\/g, ''); mustUnescape = false; } push(params, paramName, value); if (code === 0x2c) { push(offers, extensionName, params); params = Object.create(null); extensionName = undefined; } paramName = undefined; start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } } if (start === -1 || inQuotes) { throw new SyntaxError('Unexpected end of input'); } if (end === -1) end = i; const token = header.slice(start, end); if (extensionName === undefined) { push(offers, token, params); } else { if (paramName === undefined) { push(params, token, true); } else if (mustUnescape) { push(params, paramName, token.replace(/\\/g, '')); } else { push(params, paramName, token); } push(offers, extensionName, params); } return offers; } /** * Builds the `Sec-WebSocket-Extensions` header field value. * * @param {Object} extensions The map of extensions and parameters to format * @return {String} A string representing the given object * @public */ function format(extensions) { return Object.keys(extensions) .map((extension) => { let configurations = extensions[extension]; if (!Array.isArray(configurations)) configurations = [configurations]; return configurations .map((params) => { return [extension] .concat( Object.keys(params).map((k) => { let values = params[k]; if (!Array.isArray(values)) values = [values]; return values .map((v) => (v === true ? k : `${k}=${v}`)) .join('; '); }) ) .join('; '); }) .join(', '); }) .join(', '); } module.exports = { format, parse }; /***/ }), /***/ 78602: /***/ ((module) => { "use strict"; const kDone = Symbol('kDone'); const kRun = Symbol('kRun'); /** * A very simple job queue with adjustable concurrency. Adapted from * https://github.com/STRML/async-limiter */ class Limiter { /** * Creates a new `Limiter`. * * @param {Number} concurrency The maximum number of jobs allowed to run * concurrently */ constructor(concurrency) { this[kDone] = () => { this.pending--; this[kRun](); }; this.concurrency = concurrency || Infinity; this.jobs = []; this.pending = 0; } /** * Adds a job to the queue. * * @public */ add(job) { this.jobs.push(job); this[kRun](); } /** * Removes a job from the queue and runs it if possible. * * @private */ [kRun]() { if (this.pending === this.concurrency) return; if (this.jobs.length) { const job = this.jobs.shift(); this.pending++; job(this[kDone]); } } } module.exports = Limiter; /***/ }), /***/ 99604: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const zlib = __webpack_require__(78761); const bufferUtil = __webpack_require__(20034); const Limiter = __webpack_require__(78602); const { kStatusCode, NOOP } = __webpack_require__(94122); const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); const kPerMessageDeflate = Symbol('permessage-deflate'); const kTotalLength = Symbol('total-length'); const kCallback = Symbol('callback'); const kBuffers = Symbol('buffers'); const kError = Symbol('error'); // // We limit zlib concurrency, which prevents severe memory fragmentation // as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913 // and https://github.com/websockets/ws/issues/1202 // // Intentionally global; it's the global thread pool that's an issue. // let zlibLimiter; /** * permessage-deflate implementation. */ class PerMessageDeflate { /** * Creates a PerMessageDeflate instance. * * @param {Object} options Configuration options * @param {Boolean} options.serverNoContextTakeover Request/accept disabling * of server context takeover * @param {Boolean} options.clientNoContextTakeover Advertise/acknowledge * disabling of client context takeover * @param {(Boolean|Number)} options.serverMaxWindowBits Request/confirm the * use of a custom server window size * @param {(Boolean|Number)} options.clientMaxWindowBits Advertise support * for, or request, a custom client window size * @param {Object} options.zlibDeflateOptions Options to pass to zlib on deflate * @param {Object} options.zlibInflateOptions Options to pass to zlib on inflate * @param {Number} options.threshold Size (in bytes) below which messages * should not be compressed * @param {Number} options.concurrencyLimit The number of concurrent calls to * zlib * @param {Boolean} isServer Create the instance in either server or client * mode * @param {Number} maxPayload The maximum allowed message length */ constructor(options, isServer, maxPayload) { this._maxPayload = maxPayload | 0; this._options = options || {}; this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024; this._isServer = !!isServer; this._deflate = null; this._inflate = null; this.params = null; if (!zlibLimiter) { const concurrency = this._options.concurrencyLimit !== undefined ? this._options.concurrencyLimit : 10; zlibLimiter = new Limiter(concurrency); } } /** * @type {String} */ static get extensionName() { return 'permessage-deflate'; } /** * Create an extension negotiation offer. * * @return {Object} Extension parameters * @public */ offer() { const params = {}; if (this._options.serverNoContextTakeover) { params.server_no_context_takeover = true; } if (this._options.clientNoContextTakeover) { params.client_no_context_takeover = true; } if (this._options.serverMaxWindowBits) { params.server_max_window_bits = this._options.serverMaxWindowBits; } if (this._options.clientMaxWindowBits) { params.client_max_window_bits = this._options.clientMaxWindowBits; } else if (this._options.clientMaxWindowBits == null) { params.client_max_window_bits = true; } return params; } /** * Accept an extension negotiation offer/response. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Object} Accepted configuration * @public */ accept(configurations) { configurations = this.normalizeParams(configurations); this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations); return this.params; } /** * Releases all resources used by the extension. * * @public */ cleanup() { if (this._inflate) { this._inflate.close(); this._inflate = null; } if (this._deflate) { const callback = this._deflate[kCallback]; this._deflate.close(); this._deflate = null; if (callback) { callback( new Error( 'The deflate stream was closed while data was being processed' ) ); } } } /** * Accept an extension negotiation offer. * * @param {Array} offers The extension negotiation offers * @return {Object} Accepted configuration * @private */ acceptAsServer(offers) { const opts = this._options; const accepted = offers.find((params) => { if ( (opts.serverNoContextTakeover === false && params.server_no_context_takeover) || (params.server_max_window_bits && (opts.serverMaxWindowBits === false || (typeof opts.serverMaxWindowBits === 'number' && opts.serverMaxWindowBits > params.server_max_window_bits))) || (typeof opts.clientMaxWindowBits === 'number' && !params.client_max_window_bits) ) { return false; } return true; }); if (!accepted) { throw new Error('None of the extension offers can be accepted'); } if (opts.serverNoContextTakeover) { accepted.server_no_context_takeover = true; } if (opts.clientNoContextTakeover) { accepted.client_no_context_takeover = true; } if (typeof opts.serverMaxWindowBits === 'number') { accepted.server_max_window_bits = opts.serverMaxWindowBits; } if (typeof opts.clientMaxWindowBits === 'number') { accepted.client_max_window_bits = opts.clientMaxWindowBits; } else if ( accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false ) { delete accepted.client_max_window_bits; } return accepted; } /** * Accept the extension negotiation response. * * @param {Array} response The extension negotiation response * @return {Object} Accepted configuration * @private */ acceptAsClient(response) { const params = response[0]; if ( this._options.clientNoContextTakeover === false && params.client_no_context_takeover ) { throw new Error('Unexpected parameter "client_no_context_takeover"'); } if (!params.client_max_window_bits) { if (typeof this._options.clientMaxWindowBits === 'number') { params.client_max_window_bits = this._options.clientMaxWindowBits; } } else if ( this._options.clientMaxWindowBits === false || (typeof this._options.clientMaxWindowBits === 'number' && params.client_max_window_bits > this._options.clientMaxWindowBits) ) { throw new Error( 'Unexpected or invalid parameter "client_max_window_bits"' ); } return params; } /** * Normalize parameters. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Array} The offers/response with normalized parameters * @private */ normalizeParams(configurations) { configurations.forEach((params) => { Object.keys(params).forEach((key) => { let value = params[key]; if (value.length > 1) { throw new Error(`Parameter "${key}" must have only a single value`); } value = value[0]; if (key === 'client_max_window_bits') { if (value !== true) { const num = +value; if (!Number.isInteger(num) || num < 8 || num > 15) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } value = num; } else if (!this._isServer) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } } else if (key === 'server_max_window_bits') { const num = +value; if (!Number.isInteger(num) || num < 8 || num > 15) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } value = num; } else if ( key === 'client_no_context_takeover' || key === 'server_no_context_takeover' ) { if (value !== true) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } } else { throw new Error(`Unknown parameter "${key}"`); } params[key] = value; }); }); return configurations; } /** * Decompress data. Concurrency limited. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ decompress(data, fin, callback) { zlibLimiter.add((done) => { this._decompress(data, fin, (err, result) => { done(); callback(err, result); }); }); } /** * Compress data. Concurrency limited. * * @param {Buffer} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ compress(data, fin, callback) { zlibLimiter.add((done) => { this._compress(data, fin, (err, result) => { done(); callback(err, result); }); }); } /** * Decompress data. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _decompress(data, fin, callback) { const endpoint = this._isServer ? 'client' : 'server'; if (!this._inflate) { const key = `${endpoint}_max_window_bits`; const windowBits = typeof this.params[key] !== 'number' ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; this._inflate = zlib.createInflateRaw({ ...this._options.zlibInflateOptions, windowBits }); this._inflate[kPerMessageDeflate] = this; this._inflate[kTotalLength] = 0; this._inflate[kBuffers] = []; this._inflate.on('error', inflateOnError); this._inflate.on('data', inflateOnData); } this._inflate[kCallback] = callback; this._inflate.write(data); if (fin) this._inflate.write(TRAILER); this._inflate.flush(() => { const err = this._inflate[kError]; if (err) { this._inflate.close(); this._inflate = null; callback(err); return; } const data = bufferUtil.concat( this._inflate[kBuffers], this._inflate[kTotalLength] ); if (fin && this.params[`${endpoint}_no_context_takeover`]) { this._inflate.close(); this._inflate = null; } else { this._inflate[kTotalLength] = 0; this._inflate[kBuffers] = []; } callback(null, data); }); } /** * Compress data. * * @param {Buffer} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _compress(data, fin, callback) { const endpoint = this._isServer ? 'server' : 'client'; if (!this._deflate) { const key = `${endpoint}_max_window_bits`; const windowBits = typeof this.params[key] !== 'number' ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; this._deflate = zlib.createDeflateRaw({ ...this._options.zlibDeflateOptions, windowBits }); this._deflate[kTotalLength] = 0; this._deflate[kBuffers] = []; // // An `'error'` event is emitted, only on Node.js < 10.0.0, if the // `zlib.DeflateRaw` instance is closed while data is being processed. // This can happen if `PerMessageDeflate#cleanup()` is called at the wrong // time due to an abnormal WebSocket closure. // this._deflate.on('error', NOOP); this._deflate.on('data', deflateOnData); } this._deflate[kCallback] = callback; this._deflate.write(data); this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { if (!this._deflate) { // // The deflate stream was closed while data was being processed. // return; } let data = bufferUtil.concat( this._deflate[kBuffers], this._deflate[kTotalLength] ); if (fin) data = data.slice(0, data.length - 4); // // Ensure that the callback will not be called again in // `PerMessageDeflate#cleanup()`. // this._deflate[kCallback] = null; if (fin && this.params[`${endpoint}_no_context_takeover`]) { this._deflate.close(); this._deflate = null; } else { this._deflate[kTotalLength] = 0; this._deflate[kBuffers] = []; } callback(null, data); }); } } module.exports = PerMessageDeflate; /** * The listener of the `zlib.DeflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function deflateOnData(chunk) { this[kBuffers].push(chunk); this[kTotalLength] += chunk.length; } /** * The listener of the `zlib.InflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function inflateOnData(chunk) { this[kTotalLength] += chunk.length; if ( this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload ) { this[kBuffers].push(chunk); return; } this[kError] = new RangeError('Max payload size exceeded'); this[kError][kStatusCode] = 1009; this.removeListener('data', inflateOnData); this.reset(); } /** * The listener of the `zlib.InflateRaw` stream `'error'` event. * * @param {Error} err The emitted error * @private */ function inflateOnError(err) { // // There is no need to call `Zlib#close()` as the handle is automatically // closed when an error is emitted. // this[kPerMessageDeflate]._inflate = null; err[kStatusCode] = 1007; this[kCallback](err); } /***/ }), /***/ 1937: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { Writable } = __webpack_require__(92413); const PerMessageDeflate = __webpack_require__(99604); const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__(94122); const { concat, toArrayBuffer, unmask } = __webpack_require__(20034); const { isValidStatusCode, isValidUTF8 } = __webpack_require__(28541); const GET_INFO = 0; const GET_PAYLOAD_LENGTH_16 = 1; const GET_PAYLOAD_LENGTH_64 = 2; const GET_MASK = 3; const GET_DATA = 4; const INFLATING = 5; /** * HyBi Receiver implementation. * * @extends stream.Writable */ class Receiver extends Writable { /** * Creates a Receiver instance. * * @param {String} binaryType The type for binary data * @param {Object} extensions An object containing the negotiated extensions * @param {Boolean} isServer Specifies whether to operate in client or server * mode * @param {Number} maxPayload The maximum allowed message length */ constructor(binaryType, extensions, isServer, maxPayload) { super(); this._binaryType = binaryType || BINARY_TYPES[0]; this[kWebSocket] = undefined; this._extensions = extensions || {}; this._isServer = !!isServer; this._maxPayload = maxPayload | 0; this._bufferedBytes = 0; this._buffers = []; this._compressed = false; this._payloadLength = 0; this._mask = undefined; this._fragmented = 0; this._masked = false; this._fin = false; this._opcode = 0; this._totalPayloadLength = 0; this._messageLength = 0; this._fragments = []; this._state = GET_INFO; this._loop = false; } /** * Implements `Writable.prototype._write()`. * * @param {Buffer} chunk The chunk of data to write * @param {String} encoding The character encoding of `chunk` * @param {Function} cb Callback * @private */ _write(chunk, encoding, cb) { if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); this._bufferedBytes += chunk.length; this._buffers.push(chunk); this.startLoop(cb); } /** * Consumes `n` bytes from the buffered data. * * @param {Number} n The number of bytes to consume * @return {Buffer} The consumed bytes * @private */ consume(n) { this._bufferedBytes -= n; if (n === this._buffers[0].length) return this._buffers.shift(); if (n < this._buffers[0].length) { const buf = this._buffers[0]; this._buffers[0] = buf.slice(n); return buf.slice(0, n); } const dst = Buffer.allocUnsafe(n); do { const buf = this._buffers[0]; const offset = dst.length - n; if (n >= buf.length) { dst.set(this._buffers.shift(), offset); } else { dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); this._buffers[0] = buf.slice(n); } n -= buf.length; } while (n > 0); return dst; } /** * Starts the parsing loop. * * @param {Function} cb Callback * @private */ startLoop(cb) { let err; this._loop = true; do { switch (this._state) { case GET_INFO: err = this.getInfo(); break; case GET_PAYLOAD_LENGTH_16: err = this.getPayloadLength16(); break; case GET_PAYLOAD_LENGTH_64: err = this.getPayloadLength64(); break; case GET_MASK: this.getMask(); break; case GET_DATA: err = this.getData(cb); break; default: // `INFLATING` this._loop = false; return; } } while (this._loop); cb(err); } /** * Reads the first two bytes of a frame. * * @return {(RangeError|undefined)} A possible error * @private */ getInfo() { if (this._bufferedBytes < 2) { this._loop = false; return; } const buf = this.consume(2); if ((buf[0] & 0x30) !== 0x00) { this._loop = false; return error(RangeError, 'RSV2 and RSV3 must be clear', true, 1002); } const compressed = (buf[0] & 0x40) === 0x40; if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { this._loop = false; return error(RangeError, 'RSV1 must be clear', true, 1002); } this._fin = (buf[0] & 0x80) === 0x80; this._opcode = buf[0] & 0x0f; this._payloadLength = buf[1] & 0x7f; if (this._opcode === 0x00) { if (compressed) { this._loop = false; return error(RangeError, 'RSV1 must be clear', true, 1002); } if (!this._fragmented) { this._loop = false; return error(RangeError, 'invalid opcode 0', true, 1002); } this._opcode = this._fragmented; } else if (this._opcode === 0x01 || this._opcode === 0x02) { if (this._fragmented) { this._loop = false; return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002); } this._compressed = compressed; } else if (this._opcode > 0x07 && this._opcode < 0x0b) { if (!this._fin) { this._loop = false; return error(RangeError, 'FIN must be set', true, 1002); } if (compressed) { this._loop = false; return error(RangeError, 'RSV1 must be clear', true, 1002); } if (this._payloadLength > 0x7d) { this._loop = false; return error( RangeError, `invalid payload length ${this._payloadLength}`, true, 1002 ); } } else { this._loop = false; return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002); } if (!this._fin && !this._fragmented) this._fragmented = this._opcode; this._masked = (buf[1] & 0x80) === 0x80; if (this._isServer) { if (!this._masked) { this._loop = false; return error(RangeError, 'MASK must be set', true, 1002); } } else if (this._masked) { this._loop = false; return error(RangeError, 'MASK must be clear', true, 1002); } if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; else return this.haveLength(); } /** * Gets extended payload length (7+16). * * @return {(RangeError|undefined)} A possible error * @private */ getPayloadLength16() { if (this._bufferedBytes < 2) { this._loop = false; return; } this._payloadLength = this.consume(2).readUInt16BE(0); return this.haveLength(); } /** * Gets extended payload length (7+64). * * @return {(RangeError|undefined)} A possible error * @private */ getPayloadLength64() { if (this._bufferedBytes < 8) { this._loop = false; return; } const buf = this.consume(8); const num = buf.readUInt32BE(0); // // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned // if payload length is greater than this number. // if (num > Math.pow(2, 53 - 32) - 1) { this._loop = false; return error( RangeError, 'Unsupported WebSocket frame: payload length > 2^53 - 1', false, 1009 ); } this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); return this.haveLength(); } /** * Payload length has been read. * * @return {(RangeError|undefined)} A possible error * @private */ haveLength() { if (this._payloadLength && this._opcode < 0x08) { this._totalPayloadLength += this._payloadLength; if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { this._loop = false; return error(RangeError, 'Max payload size exceeded', false, 1009); } } if (this._masked) this._state = GET_MASK; else this._state = GET_DATA; } /** * Reads mask bytes. * * @private */ getMask() { if (this._bufferedBytes < 4) { this._loop = false; return; } this._mask = this.consume(4); this._state = GET_DATA; } /** * Reads data bytes. * * @param {Function} cb Callback * @return {(Error|RangeError|undefined)} A possible error * @private */ getData(cb) { let data = EMPTY_BUFFER; if (this._payloadLength) { if (this._bufferedBytes < this._payloadLength) { this._loop = false; return; } data = this.consume(this._payloadLength); if (this._masked) unmask(data, this._mask); } if (this._opcode > 0x07) return this.controlMessage(data); if (this._compressed) { this._state = INFLATING; this.decompress(data, cb); return; } if (data.length) { // // This message is not compressed so its lenght is the sum of the payload // length of all fragments. // this._messageLength = this._totalPayloadLength; this._fragments.push(data); } return this.dataMessage(); } /** * Decompresses data. * * @param {Buffer} data Compressed data * @param {Function} cb Callback * @private */ decompress(data, cb) { const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; perMessageDeflate.decompress(data, this._fin, (err, buf) => { if (err) return cb(err); if (buf.length) { this._messageLength += buf.length; if (this._messageLength > this._maxPayload && this._maxPayload > 0) { return cb( error(RangeError, 'Max payload size exceeded', false, 1009) ); } this._fragments.push(buf); } const er = this.dataMessage(); if (er) return cb(er); this.startLoop(cb); }); } /** * Handles a data message. * * @return {(Error|undefined)} A possible error * @private */ dataMessage() { if (this._fin) { const messageLength = this._messageLength; const fragments = this._fragments; this._totalPayloadLength = 0; this._messageLength = 0; this._fragmented = 0; this._fragments = []; if (this._opcode === 2) { let data; if (this._binaryType === 'nodebuffer') { data = concat(fragments, messageLength); } else if (this._binaryType === 'arraybuffer') { data = toArrayBuffer(concat(fragments, messageLength)); } else { data = fragments; } this.emit('message', data); } else { const buf = concat(fragments, messageLength); if (!isValidUTF8(buf)) { this._loop = false; return error(Error, 'invalid UTF-8 sequence', true, 1007); } this.emit('message', buf.toString()); } } this._state = GET_INFO; } /** * Handles a control message. * * @param {Buffer} data Data to handle * @return {(Error|RangeError|undefined)} A possible error * @private */ controlMessage(data) { if (this._opcode === 0x08) { this._loop = false; if (data.length === 0) { this.emit('conclude', 1005, ''); this.end(); } else if (data.length === 1) { return error(RangeError, 'invalid payload length 1', true, 1002); } else { const code = data.readUInt16BE(0); if (!isValidStatusCode(code)) { return error(RangeError, `invalid status code ${code}`, true, 1002); } const buf = data.slice(2); if (!isValidUTF8(buf)) { return error(Error, 'invalid UTF-8 sequence', true, 1007); } this.emit('conclude', code, buf.toString()); this.end(); } } else if (this._opcode === 0x09) { this.emit('ping', data); } else { this.emit('pong', data); } this._state = GET_INFO; } } module.exports = Receiver; /** * Builds an error object. * * @param {(Error|RangeError)} ErrorCtor The error constructor * @param {String} message The error message * @param {Boolean} prefix Specifies whether or not to add a default prefix to * `message` * @param {Number} statusCode The status code * @return {(Error|RangeError)} The error * @private */ function error(ErrorCtor, message, prefix, statusCode) { const err = new ErrorCtor( prefix ? `Invalid WebSocket frame: ${message}` : message ); Error.captureStackTrace(err, error); err[kStatusCode] = statusCode; return err; } /***/ }), /***/ 7748: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { randomFillSync } = __webpack_require__(33373); const PerMessageDeflate = __webpack_require__(99604); const { EMPTY_BUFFER } = __webpack_require__(94122); const { isValidStatusCode } = __webpack_require__(28541); const { mask: applyMask, toBuffer } = __webpack_require__(20034); const mask = Buffer.alloc(4); /** * HyBi Sender implementation. */ class Sender { /** * Creates a Sender instance. * * @param {net.Socket} socket The connection socket * @param {Object} extensions An object containing the negotiated extensions */ constructor(socket, extensions) { this._extensions = extensions || {}; this._socket = socket; this._firstFragment = true; this._compress = false; this._bufferedBytes = 0; this._deflating = false; this._queue = []; } /** * Frames a piece of data according to the HyBi WebSocket protocol. * * @param {Buffer} data The data to frame * @param {Object} options Options object * @param {Number} options.opcode The opcode * @param {Boolean} options.readOnly Specifies whether `data` can be modified * @param {Boolean} options.fin Specifies whether or not to set the FIN bit * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Boolean} options.rsv1 Specifies whether or not to set the RSV1 bit * @return {Buffer[]} The framed data as a list of `Buffer` instances * @public */ static frame(data, options) { const merge = options.mask && options.readOnly; let offset = options.mask ? 6 : 2; let payloadLength = data.length; if (data.length >= 65536) { offset += 8; payloadLength = 127; } else if (data.length > 125) { offset += 2; payloadLength = 126; } const target = Buffer.allocUnsafe(merge ? data.length + offset : offset); target[0] = options.fin ? options.opcode | 0x80 : options.opcode; if (options.rsv1) target[0] |= 0x40; target[1] = payloadLength; if (payloadLength === 126) { target.writeUInt16BE(data.length, 2); } else if (payloadLength === 127) { target.writeUInt32BE(0, 2); target.writeUInt32BE(data.length, 6); } if (!options.mask) return [target, data]; randomFillSync(mask, 0, 4); target[1] |= 0x80; target[offset - 4] = mask[0]; target[offset - 3] = mask[1]; target[offset - 2] = mask[2]; target[offset - 1] = mask[3]; if (merge) { applyMask(data, mask, target, offset, data.length); return [target]; } applyMask(data, mask, data, 0, data.length); return [target, data]; } /** * Sends a close message to the other peer. * * @param {(Number|undefined)} code The status code component of the body * @param {String} data The message component of the body * @param {Boolean} mask Specifies whether or not to mask the message * @param {Function} cb Callback * @public */ close(code, data, mask, cb) { let buf; if (code === undefined) { buf = EMPTY_BUFFER; } else if (typeof code !== 'number' || !isValidStatusCode(code)) { throw new TypeError('First argument must be a valid error code number'); } else if (data === undefined || data === '') { buf = Buffer.allocUnsafe(2); buf.writeUInt16BE(code, 0); } else { const length = Buffer.byteLength(data); if (length > 123) { throw new RangeError('The message must not be greater than 123 bytes'); } buf = Buffer.allocUnsafe(2 + length); buf.writeUInt16BE(code, 0); buf.write(data, 2); } if (this._deflating) { this.enqueue([this.doClose, buf, mask, cb]); } else { this.doClose(buf, mask, cb); } } /** * Frames and sends a close message. * * @param {Buffer} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @private */ doClose(data, mask, cb) { this.sendFrame( Sender.frame(data, { fin: true, rsv1: false, opcode: 0x08, mask, readOnly: false }), cb ); } /** * Sends a ping message to the other peer. * * @param {*} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @public */ ping(data, mask, cb) { const buf = toBuffer(data); if (buf.length > 125) { throw new RangeError('The data size must not be greater than 125 bytes'); } if (this._deflating) { this.enqueue([this.doPing, buf, mask, toBuffer.readOnly, cb]); } else { this.doPing(buf, mask, toBuffer.readOnly, cb); } } /** * Frames and sends a ping message. * * @param {Buffer} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Boolean} readOnly Specifies whether `data` can be modified * @param {Function} cb Callback * @private */ doPing(data, mask, readOnly, cb) { this.sendFrame( Sender.frame(data, { fin: true, rsv1: false, opcode: 0x09, mask, readOnly }), cb ); } /** * Sends a pong message to the other peer. * * @param {*} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @public */ pong(data, mask, cb) { const buf = toBuffer(data); if (buf.length > 125) { throw new RangeError('The data size must not be greater than 125 bytes'); } if (this._deflating) { this.enqueue([this.doPong, buf, mask, toBuffer.readOnly, cb]); } else { this.doPong(buf, mask, toBuffer.readOnly, cb); } } /** * Frames and sends a pong message. * * @param {Buffer} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Boolean} readOnly Specifies whether `data` can be modified * @param {Function} cb Callback * @private */ doPong(data, mask, readOnly, cb) { this.sendFrame( Sender.frame(data, { fin: true, rsv1: false, opcode: 0x0a, mask, readOnly }), cb ); } /** * Sends a data message to the other peer. * * @param {*} data The message to send * @param {Object} options Options object * @param {Boolean} options.compress Specifies whether or not to compress `data` * @param {Boolean} options.binary Specifies whether `data` is binary or text * @param {Boolean} options.fin Specifies whether the fragment is the last one * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @public */ send(data, options, cb) { const buf = toBuffer(data); const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; let opcode = options.binary ? 2 : 1; let rsv1 = options.compress; if (this._firstFragment) { this._firstFragment = false; if (rsv1 && perMessageDeflate) { rsv1 = buf.length >= perMessageDeflate._threshold; } this._compress = rsv1; } else { rsv1 = false; opcode = 0; } if (options.fin) this._firstFragment = true; if (perMessageDeflate) { const opts = { fin: options.fin, rsv1, opcode, mask: options.mask, readOnly: toBuffer.readOnly }; if (this._deflating) { this.enqueue([this.dispatch, buf, this._compress, opts, cb]); } else { this.dispatch(buf, this._compress, opts, cb); } } else { this.sendFrame( Sender.frame(buf, { fin: options.fin, rsv1: false, opcode, mask: options.mask, readOnly: toBuffer.readOnly }), cb ); } } /** * Dispatches a data message. * * @param {Buffer} data The message to send * @param {Boolean} compress Specifies whether or not to compress `data` * @param {Object} options Options object * @param {Number} options.opcode The opcode * @param {Boolean} options.readOnly Specifies whether `data` can be modified * @param {Boolean} options.fin Specifies whether or not to set the FIN bit * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Boolean} options.rsv1 Specifies whether or not to set the RSV1 bit * @param {Function} cb Callback * @private */ dispatch(data, compress, options, cb) { if (!compress) { this.sendFrame(Sender.frame(data, options), cb); return; } const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; this._bufferedBytes += data.length; this._deflating = true; perMessageDeflate.compress(data, options.fin, (_, buf) => { if (this._socket.destroyed) { const err = new Error( 'The socket was closed while data was being compressed' ); if (typeof cb === 'function') cb(err); for (let i = 0; i < this._queue.length; i++) { const callback = this._queue[i][4]; if (typeof callback === 'function') callback(err); } return; } this._bufferedBytes -= data.length; this._deflating = false; options.readOnly = false; this.sendFrame(Sender.frame(buf, options), cb); this.dequeue(); }); } /** * Executes queued send operations. * * @private */ dequeue() { while (!this._deflating && this._queue.length) { const params = this._queue.shift(); this._bufferedBytes -= params[1].length; Reflect.apply(params[0], this, params.slice(1)); } } /** * Enqueues a send operation. * * @param {Array} params Send operation parameters. * @private */ enqueue(params) { this._bufferedBytes += params[1].length; this._queue.push(params); } /** * Sends a frame. * * @param {Buffer[]} list The frame to send * @param {Function} cb Callback * @private */ sendFrame(list, cb) { if (list.length === 2) { this._socket.cork(); this._socket.write(list[0]); this._socket.write(list[1], cb); this._socket.uncork(); } else { this._socket.write(list[0], cb); } } } module.exports = Sender; /***/ }), /***/ 61997: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { Duplex } = __webpack_require__(92413); /** * Emits the `'close'` event on a stream. * * @param {stream.Duplex} The stream. * @private */ function emitClose(stream) { stream.emit('close'); } /** * The listener of the `'end'` event. * * @private */ function duplexOnEnd() { if (!this.destroyed && this._writableState.finished) { this.destroy(); } } /** * The listener of the `'error'` event. * * @private */ function duplexOnError(err) { this.removeListener('error', duplexOnError); this.destroy(); if (this.listenerCount('error') === 0) { // Do not suppress the throwing behavior. this.emit('error', err); } } /** * Wraps a `WebSocket` in a duplex stream. * * @param {WebSocket} ws The `WebSocket` to wrap * @param {Object} options The options for the `Duplex` constructor * @return {stream.Duplex} The duplex stream * @public */ function createWebSocketStream(ws, options) { let resumeOnReceiverDrain = true; function receiverOnDrain() { if (resumeOnReceiverDrain) ws._socket.resume(); } if (ws.readyState === ws.CONNECTING) { ws.once('open', function open() { ws._receiver.removeAllListeners('drain'); ws._receiver.on('drain', receiverOnDrain); }); } else { ws._receiver.removeAllListeners('drain'); ws._receiver.on('drain', receiverOnDrain); } const duplex = new Duplex({ ...options, autoDestroy: false, emitClose: false, objectMode: false, writableObjectMode: false }); ws.on('message', function message(msg) { if (!duplex.push(msg)) { resumeOnReceiverDrain = false; ws._socket.pause(); } }); ws.once('error', function error(err) { if (duplex.destroyed) return; duplex.destroy(err); }); ws.once('close', function close() { if (duplex.destroyed) return; duplex.push(null); }); duplex._destroy = function (err, callback) { if (ws.readyState === ws.CLOSED) { callback(err); process.nextTick(emitClose, duplex); return; } let called = false; ws.once('error', function error(err) { called = true; callback(err); }); ws.once('close', function close() { if (!called) callback(err); process.nextTick(emitClose, duplex); }); ws.terminate(); }; duplex._final = function (callback) { if (ws.readyState === ws.CONNECTING) { ws.once('open', function open() { duplex._final(callback); }); return; } // If the value of the `_socket` property is `null` it means that `ws` is a // client websocket and the handshake failed. In fact, when this happens, a // socket is never assigned to the websocket. Wait for the `'error'` event // that will be emitted by the websocket. if (ws._socket === null) return; if (ws._socket._writableState.finished) { callback(); if (duplex._readableState.endEmitted) duplex.destroy(); } else { ws._socket.once('finish', function finish() { // `duplex` is not destroyed here because the `'end'` event will be // emitted on `duplex` after this `'finish'` event. The EOF signaling // `null` chunk is, in fact, pushed when the websocket emits `'close'`. callback(); }); ws.close(); } }; duplex._read = function () { if (ws.readyState === ws.OPEN && !resumeOnReceiverDrain) { resumeOnReceiverDrain = true; if (!ws._receiver._writableState.needDrain) ws._socket.resume(); } }; duplex._write = function (chunk, encoding, callback) { if (ws.readyState === ws.CONNECTING) { ws.once('open', function open() { duplex._write(chunk, encoding, callback); }); return; } ws.send(chunk, callback); }; duplex.on('end', duplexOnEnd); duplex.on('error', duplexOnError); return duplex; } module.exports = createWebSocketStream; /***/ }), /***/ 28541: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; try { const isValidUTF8 = __webpack_require__(24592); exports.isValidUTF8 = typeof isValidUTF8 === 'object' ? isValidUTF8.Validation.isValidUTF8 // utf-8-validate@<3.0.0 : isValidUTF8; } catch (e) /* istanbul ignore next */ { exports.isValidUTF8 = () => true; } /** * Checks if a status code is allowed in a close frame. * * @param {Number} code The status code * @return {Boolean} `true` if the status code is valid, else `false` * @public */ exports.isValidStatusCode = (code) => { return ( (code >= 1000 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006) || (code >= 3000 && code <= 4999) ); }; /***/ }), /***/ 89535: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const { createHash } = __webpack_require__(33373); const { createServer, STATUS_CODES } = __webpack_require__(98605); const PerMessageDeflate = __webpack_require__(99604); const WebSocket = __webpack_require__(30418); const { format, parse } = __webpack_require__(97821); const { GUID, kWebSocket } = __webpack_require__(94122); const keyRegex = /^[+/0-9A-Za-z]{22}==$/; /** * Class representing a WebSocket server. * * @extends EventEmitter */ class WebSocketServer extends EventEmitter { /** * Create a `WebSocketServer` instance. * * @param {Object} options Configuration options * @param {Number} options.backlog The maximum length of the queue of pending * connections * @param {Boolean} options.clientTracking Specifies whether or not to track * clients * @param {Function} options.handleProtocols A hook to handle protocols * @param {String} options.host The hostname where to bind the server * @param {Number} options.maxPayload The maximum allowed message size * @param {Boolean} options.noServer Enable no server mode * @param {String} options.path Accept only connections matching this path * @param {(Boolean|Object)} options.perMessageDeflate Enable/disable * permessage-deflate * @param {Number} options.port The port where to bind the server * @param {http.Server} options.server A pre-created HTTP/S server to use * @param {Function} options.verifyClient A hook to reject connections * @param {Function} callback A listener for the `listening` event */ constructor(options, callback) { super(); options = { maxPayload: 100 * 1024 * 1024, perMessageDeflate: false, handleProtocols: null, clientTracking: true, verifyClient: null, noServer: false, backlog: null, // use default (511 as implemented in net.js) server: null, host: null, path: null, port: null, ...options }; if (options.port == null && !options.server && !options.noServer) { throw new TypeError( 'One of the "port", "server", or "noServer" options must be specified' ); } if (options.port != null) { this._server = createServer((req, res) => { const body = STATUS_CODES[426]; res.writeHead(426, { 'Content-Length': body.length, 'Content-Type': 'text/plain' }); res.end(body); }); this._server.listen( options.port, options.host, options.backlog, callback ); } else if (options.server) { this._server = options.server; } if (this._server) { this._removeListeners = addListeners(this._server, { listening: this.emit.bind(this, 'listening'), error: this.emit.bind(this, 'error'), upgrade: (req, socket, head) => { this.handleUpgrade(req, socket, head, (ws) => { this.emit('connection', ws, req); }); } }); } if (options.perMessageDeflate === true) options.perMessageDeflate = {}; if (options.clientTracking) this.clients = new Set(); this.options = options; } /** * Returns the bound address, the address family name, and port of the server * as reported by the operating system if listening on an IP socket. * If the server is listening on a pipe or UNIX domain socket, the name is * returned as a string. * * @return {(Object|String|null)} The address of the server * @public */ address() { if (this.options.noServer) { throw new Error('The server is operating in "noServer" mode'); } if (!this._server) return null; return this._server.address(); } /** * Close the server. * * @param {Function} cb Callback * @public */ close(cb) { if (cb) this.once('close', cb); // // Terminate all associated clients. // if (this.clients) { for (const client of this.clients) client.terminate(); } const server = this._server; if (server) { this._removeListeners(); this._removeListeners = this._server = null; // // Close the http server if it was internally created. // if (this.options.port != null) { server.close(() => this.emit('close')); return; } } process.nextTick(emitClose, this); } /** * See if a given request should be handled by this server instance. * * @param {http.IncomingMessage} req Request object to inspect * @return {Boolean} `true` if the request is valid, else `false` * @public */ shouldHandle(req) { if (this.options.path) { const index = req.url.indexOf('?'); const pathname = index !== -1 ? req.url.slice(0, index) : req.url; if (pathname !== this.options.path) return false; } return true; } /** * Handle a HTTP Upgrade request. * * @param {http.IncomingMessage} req The request object * @param {net.Socket} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @public */ handleUpgrade(req, socket, head, cb) { socket.on('error', socketOnError); const key = req.headers['sec-websocket-key'] !== undefined ? req.headers['sec-websocket-key'].trim() : false; const version = +req.headers['sec-websocket-version']; const extensions = {}; if ( req.method !== 'GET' || req.headers.upgrade.toLowerCase() !== 'websocket' || !key || !keyRegex.test(key) || (version !== 8 && version !== 13) || !this.shouldHandle(req) ) { return abortHandshake(socket, 400); } if (this.options.perMessageDeflate) { const perMessageDeflate = new PerMessageDeflate( this.options.perMessageDeflate, true, this.options.maxPayload ); try { const offers = parse(req.headers['sec-websocket-extensions']); if (offers[PerMessageDeflate.extensionName]) { perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); extensions[PerMessageDeflate.extensionName] = perMessageDeflate; } } catch (err) { return abortHandshake(socket, 400); } } // // Optionally call external client verification handler. // if (this.options.verifyClient) { const info = { origin: req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], secure: !!(req.connection.authorized || req.connection.encrypted), req }; if (this.options.verifyClient.length === 2) { this.options.verifyClient(info, (verified, code, message, headers) => { if (!verified) { return abortHandshake(socket, code || 401, message, headers); } this.completeUpgrade(key, extensions, req, socket, head, cb); }); return; } if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); } this.completeUpgrade(key, extensions, req, socket, head, cb); } /** * Upgrade the connection to WebSocket. * * @param {String} key The value of the `Sec-WebSocket-Key` header * @param {Object} extensions The accepted extensions * @param {http.IncomingMessage} req The request object * @param {net.Socket} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @throws {Error} If called more than once with the same socket * @private */ completeUpgrade(key, extensions, req, socket, head, cb) { // // Destroy the socket if the client has already sent a FIN packet. // if (!socket.readable || !socket.writable) return socket.destroy(); if (socket[kWebSocket]) { throw new Error( 'server.handleUpgrade() was called more than once with the same ' + 'socket, possibly due to a misconfiguration' ); } const digest = createHash('sha1') .update(key + GUID) .digest('base64'); const headers = [ 'HTTP/1.1 101 Switching Protocols', 'Upgrade: websocket', 'Connection: Upgrade', `Sec-WebSocket-Accept: ${digest}` ]; const ws = new WebSocket(null); let protocol = req.headers['sec-websocket-protocol']; if (protocol) { protocol = protocol.trim().split(/ *, */); // // Optionally call external protocol selection handler. // if (this.options.handleProtocols) { protocol = this.options.handleProtocols(protocol, req); } else { protocol = protocol[0]; } if (protocol) { headers.push(`Sec-WebSocket-Protocol: ${protocol}`); ws.protocol = protocol; } } if (extensions[PerMessageDeflate.extensionName]) { const params = extensions[PerMessageDeflate.extensionName].params; const value = format({ [PerMessageDeflate.extensionName]: [params] }); headers.push(`Sec-WebSocket-Extensions: ${value}`); ws._extensions = extensions; } // // Allow external modification/inspection of handshake headers. // this.emit('headers', headers, req); socket.write(headers.concat('\r\n').join('\r\n')); socket.removeListener('error', socketOnError); ws.setSocket(socket, head, this.options.maxPayload); if (this.clients) { this.clients.add(ws); ws.on('close', () => this.clients.delete(ws)); } cb(ws); } } module.exports = WebSocketServer; /** * Add event listeners on an `EventEmitter` using a map of * pairs. * * @param {EventEmitter} server The event emitter * @param {Object.} map The listeners to add * @return {Function} A function that will remove the added listeners when called * @private */ function addListeners(server, map) { for (const event of Object.keys(map)) server.on(event, map[event]); return function removeListeners() { for (const event of Object.keys(map)) { server.removeListener(event, map[event]); } }; } /** * Emit a `'close'` event on an `EventEmitter`. * * @param {EventEmitter} server The event emitter * @private */ function emitClose(server) { server.emit('close'); } /** * Handle premature socket errors. * * @private */ function socketOnError() { this.destroy(); } /** * Close the connection when preconditions are not fulfilled. * * @param {net.Socket} socket The socket of the upgrade request * @param {Number} code The HTTP response status code * @param {String} [message] The HTTP response body * @param {Object} [headers] Additional HTTP response headers * @private */ function abortHandshake(socket, code, message, headers) { if (socket.writable) { message = message || STATUS_CODES[code]; headers = { Connection: 'close', 'Content-Type': 'text/html', 'Content-Length': Buffer.byteLength(message), ...headers }; socket.write( `HTTP/1.1 ${code} ${STATUS_CODES[code]}\r\n` + Object.keys(headers) .map((h) => `${h}: ${headers[h]}`) .join('\r\n') + '\r\n\r\n' + message ); } socket.removeListener('error', socketOnError); socket.destroy(); } /***/ }), /***/ 30418: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const https = __webpack_require__(57211); const http = __webpack_require__(98605); const net = __webpack_require__(11631); const tls = __webpack_require__(4016); const { randomBytes, createHash } = __webpack_require__(33373); const { URL } = __webpack_require__(78835); const PerMessageDeflate = __webpack_require__(99604); const Receiver = __webpack_require__(1937); const Sender = __webpack_require__(7748); const { BINARY_TYPES, EMPTY_BUFFER, GUID, kStatusCode, kWebSocket, NOOP } = __webpack_require__(94122); const { addEventListener, removeEventListener } = __webpack_require__(63406); const { format, parse } = __webpack_require__(97821); const { toBuffer } = __webpack_require__(20034); const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; const protocolVersions = [8, 13]; const closeTimeout = 30 * 1000; /** * Class representing a WebSocket. * * @extends EventEmitter */ class WebSocket extends EventEmitter { /** * Create a new `WebSocket`. * * @param {(String|url.URL)} address The URL to which to connect * @param {(String|String[])} protocols The subprotocols * @param {Object} options Connection options */ constructor(address, protocols, options) { super(); this.readyState = WebSocket.CONNECTING; this.protocol = ''; this._binaryType = BINARY_TYPES[0]; this._closeFrameReceived = false; this._closeFrameSent = false; this._closeMessage = ''; this._closeTimer = null; this._closeCode = 1006; this._extensions = {}; this._receiver = null; this._sender = null; this._socket = null; if (address !== null) { this._bufferedAmount = 0; this._isServer = false; this._redirects = 0; if (Array.isArray(protocols)) { protocols = protocols.join(', '); } else if (typeof protocols === 'object' && protocols !== null) { options = protocols; protocols = undefined; } initAsClient(this, address, protocols, options); } else { this._isServer = true; } } get CONNECTING() { return WebSocket.CONNECTING; } get CLOSING() { return WebSocket.CLOSING; } get CLOSED() { return WebSocket.CLOSED; } get OPEN() { return WebSocket.OPEN; } /** * This deviates from the WHATWG interface since ws doesn't support the * required default "blob" type (instead we define a custom "nodebuffer" * type). * * @type {String} */ get binaryType() { return this._binaryType; } set binaryType(type) { if (!BINARY_TYPES.includes(type)) return; this._binaryType = type; // // Allow to change `binaryType` on the fly. // if (this._receiver) this._receiver._binaryType = type; } /** * @type {Number} */ get bufferedAmount() { if (!this._socket) return this._bufferedAmount; return this._socket._writableState.length + this._sender._bufferedBytes; } /** * @type {String} */ get extensions() { return Object.keys(this._extensions).join(); } /** * Set up the socket and the internal resources. * * @param {net.Socket} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Number} maxPayload The maximum allowed message size * @private */ setSocket(socket, head, maxPayload) { const receiver = new Receiver( this._binaryType, this._extensions, this._isServer, maxPayload ); this._sender = new Sender(socket, this._extensions); this._receiver = receiver; this._socket = socket; receiver[kWebSocket] = this; socket[kWebSocket] = this; receiver.on('conclude', receiverOnConclude); receiver.on('drain', receiverOnDrain); receiver.on('error', receiverOnError); receiver.on('message', receiverOnMessage); receiver.on('ping', receiverOnPing); receiver.on('pong', receiverOnPong); socket.setTimeout(0); socket.setNoDelay(); if (head.length > 0) socket.unshift(head); socket.on('close', socketOnClose); socket.on('data', socketOnData); socket.on('end', socketOnEnd); socket.on('error', socketOnError); this.readyState = WebSocket.OPEN; this.emit('open'); } /** * Emit the `'close'` event. * * @private */ emitClose() { if (!this._socket) { this.readyState = WebSocket.CLOSED; this.emit('close', this._closeCode, this._closeMessage); return; } if (this._extensions[PerMessageDeflate.extensionName]) { this._extensions[PerMessageDeflate.extensionName].cleanup(); } this._receiver.removeAllListeners(); this.readyState = WebSocket.CLOSED; this.emit('close', this._closeCode, this._closeMessage); } /** * Start a closing handshake. * * +----------+ +-----------+ +----------+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - * | +----------+ +-----------+ +----------+ | * +----------+ +-----------+ | * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING * +----------+ +-----------+ | * | | | +---+ | * +------------------------+-->|fin| - - - - * | +---+ | +---+ * - - - - -|fin|<---------------------+ * +---+ * * @param {Number} code Status code explaining why the connection is closing * @param {String} data A string explaining why the connection is closing * @public */ close(code, data) { if (this.readyState === WebSocket.CLOSED) return; if (this.readyState === WebSocket.CONNECTING) { const msg = 'WebSocket was closed before the connection was established'; return abortHandshake(this, this._req, msg); } if (this.readyState === WebSocket.CLOSING) { if (this._closeFrameSent && this._closeFrameReceived) this._socket.end(); return; } this.readyState = WebSocket.CLOSING; this._sender.close(code, data, !this._isServer, (err) => { // // This error is handled by the `'error'` listener on the socket. We only // want to know if the close frame has been sent here. // if (err) return; this._closeFrameSent = true; if (this._closeFrameReceived) this._socket.end(); }); // // Specify a timeout for the closing handshake to complete. // this._closeTimer = setTimeout( this._socket.destroy.bind(this._socket), closeTimeout ); } /** * Send a ping. * * @param {*} data The data to send * @param {Boolean} mask Indicates whether or not to mask `data` * @param {Function} cb Callback which is executed when the ping is sent * @public */ ping(data, mask, cb) { if (this.readyState === WebSocket.CONNECTING) { throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); } if (typeof data === 'function') { cb = data; data = mask = undefined; } else if (typeof mask === 'function') { cb = mask; mask = undefined; } if (typeof data === 'number') data = data.toString(); if (this.readyState !== WebSocket.OPEN) { sendAfterClose(this, data, cb); return; } if (mask === undefined) mask = !this._isServer; this._sender.ping(data || EMPTY_BUFFER, mask, cb); } /** * Send a pong. * * @param {*} data The data to send * @param {Boolean} mask Indicates whether or not to mask `data` * @param {Function} cb Callback which is executed when the pong is sent * @public */ pong(data, mask, cb) { if (this.readyState === WebSocket.CONNECTING) { throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); } if (typeof data === 'function') { cb = data; data = mask = undefined; } else if (typeof mask === 'function') { cb = mask; mask = undefined; } if (typeof data === 'number') data = data.toString(); if (this.readyState !== WebSocket.OPEN) { sendAfterClose(this, data, cb); return; } if (mask === undefined) mask = !this._isServer; this._sender.pong(data || EMPTY_BUFFER, mask, cb); } /** * Send a data message. * * @param {*} data The message to send * @param {Object} options Options object * @param {Boolean} options.compress Specifies whether or not to compress * `data` * @param {Boolean} options.binary Specifies whether `data` is binary or text * @param {Boolean} options.fin Specifies whether the fragment is the last one * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Function} cb Callback which is executed when data is written out * @public */ send(data, options, cb) { if (this.readyState === WebSocket.CONNECTING) { throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); } if (typeof options === 'function') { cb = options; options = {}; } if (typeof data === 'number') data = data.toString(); if (this.readyState !== WebSocket.OPEN) { sendAfterClose(this, data, cb); return; } const opts = { binary: typeof data !== 'string', mask: !this._isServer, compress: true, fin: true, ...options }; if (!this._extensions[PerMessageDeflate.extensionName]) { opts.compress = false; } this._sender.send(data || EMPTY_BUFFER, opts, cb); } /** * Forcibly close the connection. * * @public */ terminate() { if (this.readyState === WebSocket.CLOSED) return; if (this.readyState === WebSocket.CONNECTING) { const msg = 'WebSocket was closed before the connection was established'; return abortHandshake(this, this._req, msg); } if (this._socket) { this.readyState = WebSocket.CLOSING; this._socket.destroy(); } } } readyStates.forEach((readyState, i) => { WebSocket[readyState] = i; }); // // Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes. // See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface // ['open', 'error', 'close', 'message'].forEach((method) => { Object.defineProperty(WebSocket.prototype, `on${method}`, { /** * Return the listener of the event. * * @return {(Function|undefined)} The event listener or `undefined` * @public */ get() { const listeners = this.listeners(method); for (let i = 0; i < listeners.length; i++) { if (listeners[i]._listener) return listeners[i]._listener; } return undefined; }, /** * Add a listener for the event. * * @param {Function} listener The listener to add * @public */ set(listener) { const listeners = this.listeners(method); for (let i = 0; i < listeners.length; i++) { // // Remove only the listeners added via `addEventListener`. // if (listeners[i]._listener) this.removeListener(method, listeners[i]); } this.addEventListener(method, listener); } }); }); WebSocket.prototype.addEventListener = addEventListener; WebSocket.prototype.removeEventListener = removeEventListener; module.exports = WebSocket; /** * Initialize a WebSocket client. * * @param {WebSocket} websocket The client to initialize * @param {(String|url.URL)} address The URL to which to connect * @param {String} protocols The subprotocols * @param {Object} options Connection options * @param {(Boolean|Object)} options.perMessageDeflate Enable/disable * permessage-deflate * @param {Number} options.handshakeTimeout Timeout in milliseconds for the * handshake request * @param {Number} options.protocolVersion Value of the `Sec-WebSocket-Version` * header * @param {String} options.origin Value of the `Origin` or * `Sec-WebSocket-Origin` header * @param {Number} options.maxPayload The maximum allowed message size * @param {Boolean} options.followRedirects Whether or not to follow redirects * @param {Number} options.maxRedirects The maximum number of redirects allowed * @private */ function initAsClient(websocket, address, protocols, options) { const opts = { protocolVersion: protocolVersions[1], maxPayload: 100 * 1024 * 1024, perMessageDeflate: true, followRedirects: false, maxRedirects: 10, ...options, createConnection: undefined, socketPath: undefined, hostname: undefined, protocol: undefined, timeout: undefined, method: undefined, host: undefined, path: undefined, port: undefined }; if (!protocolVersions.includes(opts.protocolVersion)) { throw new RangeError( `Unsupported protocol version: ${opts.protocolVersion} ` + `(supported versions: ${protocolVersions.join(', ')})` ); } let parsedUrl; if (address instanceof URL) { parsedUrl = address; websocket.url = address.href; } else { parsedUrl = new URL(address); websocket.url = address; } const isUnixSocket = parsedUrl.protocol === 'ws+unix:'; if (!parsedUrl.host && (!isUnixSocket || !parsedUrl.pathname)) { throw new Error(`Invalid URL: ${websocket.url}`); } const isSecure = parsedUrl.protocol === 'wss:' || parsedUrl.protocol === 'https:'; const defaultPort = isSecure ? 443 : 80; const key = randomBytes(16).toString('base64'); const get = isSecure ? https.get : http.get; let perMessageDeflate; opts.createConnection = isSecure ? tlsConnect : netConnect; opts.defaultPort = opts.defaultPort || defaultPort; opts.port = parsedUrl.port || defaultPort; opts.host = parsedUrl.hostname.startsWith('[') ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname; opts.headers = { 'Sec-WebSocket-Version': opts.protocolVersion, 'Sec-WebSocket-Key': key, Connection: 'Upgrade', Upgrade: 'websocket', ...opts.headers }; opts.path = parsedUrl.pathname + parsedUrl.search; opts.timeout = opts.handshakeTimeout; if (opts.perMessageDeflate) { perMessageDeflate = new PerMessageDeflate( opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, false, opts.maxPayload ); opts.headers['Sec-WebSocket-Extensions'] = format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() }); } if (protocols) { opts.headers['Sec-WebSocket-Protocol'] = protocols; } if (opts.origin) { if (opts.protocolVersion < 13) { opts.headers['Sec-WebSocket-Origin'] = opts.origin; } else { opts.headers.Origin = opts.origin; } } if (parsedUrl.username || parsedUrl.password) { opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; } if (isUnixSocket) { const parts = opts.path.split(':'); opts.socketPath = parts[0]; opts.path = parts[1]; } let req = (websocket._req = get(opts)); if (opts.timeout) { req.on('timeout', () => { abortHandshake(websocket, req, 'Opening handshake has timed out'); }); } req.on('error', (err) => { if (websocket._req.aborted) return; req = websocket._req = null; websocket.readyState = WebSocket.CLOSING; websocket.emit('error', err); websocket.emitClose(); }); req.on('response', (res) => { const location = res.headers.location; const statusCode = res.statusCode; if ( location && opts.followRedirects && statusCode >= 300 && statusCode < 400 ) { if (++websocket._redirects > opts.maxRedirects) { abortHandshake(websocket, req, 'Maximum redirects exceeded'); return; } req.abort(); const addr = new URL(location, address); initAsClient(websocket, addr, protocols, options); } else if (!websocket.emit('unexpected-response', req, res)) { abortHandshake( websocket, req, `Unexpected server response: ${res.statusCode}` ); } }); req.on('upgrade', (res, socket, head) => { websocket.emit('upgrade', res); // // The user may have closed the connection from a listener of the `upgrade` // event. // if (websocket.readyState !== WebSocket.CONNECTING) return; req = websocket._req = null; const digest = createHash('sha1') .update(key + GUID) .digest('base64'); if (res.headers['sec-websocket-accept'] !== digest) { abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); return; } const serverProt = res.headers['sec-websocket-protocol']; const protList = (protocols || '').split(/, */); let protError; if (!protocols && serverProt) { protError = 'Server sent a subprotocol but none was requested'; } else if (protocols && !serverProt) { protError = 'Server sent no subprotocol'; } else if (serverProt && !protList.includes(serverProt)) { protError = 'Server sent an invalid subprotocol'; } if (protError) { abortHandshake(websocket, socket, protError); return; } if (serverProt) websocket.protocol = serverProt; if (perMessageDeflate) { try { const extensions = parse(res.headers['sec-websocket-extensions']); if (extensions[PerMessageDeflate.extensionName]) { perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); websocket._extensions[ PerMessageDeflate.extensionName ] = perMessageDeflate; } } catch (err) { abortHandshake( websocket, socket, 'Invalid Sec-WebSocket-Extensions header' ); return; } } websocket.setSocket(socket, head, opts.maxPayload); }); } /** * Create a `net.Socket` and initiate a connection. * * @param {Object} options Connection options * @return {net.Socket} The newly created socket used to start the connection * @private */ function netConnect(options) { options.path = options.socketPath; return net.connect(options); } /** * Create a `tls.TLSSocket` and initiate a connection. * * @param {Object} options Connection options * @return {tls.TLSSocket} The newly created socket used to start the connection * @private */ function tlsConnect(options) { options.path = undefined; if (!options.servername && options.servername !== '') { options.servername = options.host; } return tls.connect(options); } /** * Abort the handshake and emit an error. * * @param {WebSocket} websocket The WebSocket instance * @param {(http.ClientRequest|net.Socket)} stream The request to abort or the * socket to destroy * @param {String} message The error message * @private */ function abortHandshake(websocket, stream, message) { websocket.readyState = WebSocket.CLOSING; const err = new Error(message); Error.captureStackTrace(err, abortHandshake); if (stream.setHeader) { stream.abort(); stream.once('abort', websocket.emitClose.bind(websocket)); websocket.emit('error', err); } else { stream.destroy(err); stream.once('error', websocket.emit.bind(websocket, 'error')); stream.once('close', websocket.emitClose.bind(websocket)); } } /** * Handle cases where the `ping()`, `pong()`, or `send()` methods are called * when the `readyState` attribute is `CLOSING` or `CLOSED`. * * @param {WebSocket} websocket The WebSocket instance * @param {*} data The data to send * @param {Function} cb Callback * @private */ function sendAfterClose(websocket, data, cb) { if (data) { const length = toBuffer(data).length; // // The `_bufferedAmount` property is used only when the peer is a client and // the opening handshake fails. Under these circumstances, in fact, the // `setSocket()` method is not called, so the `_socket` and `_sender` // properties are set to `null`. // if (websocket._socket) websocket._sender._bufferedBytes += length; else websocket._bufferedAmount += length; } if (cb) { const err = new Error( `WebSocket is not open: readyState ${websocket.readyState} ` + `(${readyStates[websocket.readyState]})` ); cb(err); } } /** * The listener of the `Receiver` `'conclude'` event. * * @param {Number} code The status code * @param {String} reason The reason for closing * @private */ function receiverOnConclude(code, reason) { const websocket = this[kWebSocket]; websocket._socket.removeListener('data', socketOnData); websocket._socket.resume(); websocket._closeFrameReceived = true; websocket._closeMessage = reason; websocket._closeCode = code; if (code === 1005) websocket.close(); else websocket.close(code, reason); } /** * The listener of the `Receiver` `'drain'` event. * * @private */ function receiverOnDrain() { this[kWebSocket]._socket.resume(); } /** * The listener of the `Receiver` `'error'` event. * * @param {(RangeError|Error)} err The emitted error * @private */ function receiverOnError(err) { const websocket = this[kWebSocket]; websocket._socket.removeListener('data', socketOnData); websocket.readyState = WebSocket.CLOSING; websocket._closeCode = err[kStatusCode]; websocket.emit('error', err); websocket._socket.destroy(); } /** * The listener of the `Receiver` `'finish'` event. * * @private */ function receiverOnFinish() { this[kWebSocket].emitClose(); } /** * The listener of the `Receiver` `'message'` event. * * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The message * @private */ function receiverOnMessage(data) { this[kWebSocket].emit('message', data); } /** * The listener of the `Receiver` `'ping'` event. * * @param {Buffer} data The data included in the ping frame * @private */ function receiverOnPing(data) { const websocket = this[kWebSocket]; websocket.pong(data, !websocket._isServer, NOOP); websocket.emit('ping', data); } /** * The listener of the `Receiver` `'pong'` event. * * @param {Buffer} data The data included in the pong frame * @private */ function receiverOnPong(data) { this[kWebSocket].emit('pong', data); } /** * The listener of the `net.Socket` `'close'` event. * * @private */ function socketOnClose() { const websocket = this[kWebSocket]; this.removeListener('close', socketOnClose); this.removeListener('end', socketOnEnd); websocket.readyState = WebSocket.CLOSING; // // The close frame might not have been received or the `'end'` event emitted, // for example, if the socket was destroyed due to an error. Ensure that the // `receiver` stream is closed after writing any remaining buffered data to // it. If the readable side of the socket is in flowing mode then there is no // buffered data as everything has been already written and `readable.read()` // will return `null`. If instead, the socket is paused, any possible buffered // data will be read as a single chunk and emitted synchronously in a single // `'data'` event. // websocket._socket.read(); websocket._receiver.end(); this.removeListener('data', socketOnData); this[kWebSocket] = undefined; clearTimeout(websocket._closeTimer); if ( websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted ) { websocket.emitClose(); } else { websocket._receiver.on('error', receiverOnFinish); websocket._receiver.on('finish', receiverOnFinish); } } /** * The listener of the `net.Socket` `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function socketOnData(chunk) { if (!this[kWebSocket]._receiver.write(chunk)) { this.pause(); } } /** * The listener of the `net.Socket` `'end'` event. * * @private */ function socketOnEnd() { const websocket = this[kWebSocket]; websocket.readyState = WebSocket.CLOSING; websocket._receiver.end(); this.end(); } /** * The listener of the `net.Socket` `'error'` event. * * @private */ function socketOnError() { const websocket = this[kWebSocket]; this.removeListener('error', socketOnError); this.on('error', NOOP); if (websocket) { websocket.readyState = WebSocket.CLOSING; this.destroy(); } } /***/ }), /***/ 9662: /***/ ((module) => { "use strict"; module.exports = function (obj) { var ret = {}; var keys = Object.keys(Object(obj)); for (var i = 0; i < keys.length; i++) { ret[keys[i].toLowerCase()] = obj[keys[i]]; } return ret; }; /***/ }), /***/ 7129: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // A linked list to keep track of recently-used-ness const Yallist = __webpack_require__(40665) const MAX = Symbol('max') const LENGTH = Symbol('length') const LENGTH_CALCULATOR = Symbol('lengthCalculator') const ALLOW_STALE = Symbol('allowStale') const MAX_AGE = Symbol('maxAge') const DISPOSE = Symbol('dispose') const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') const LRU_LIST = Symbol('lruList') const CACHE = Symbol('cache') const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') const naiveLength = () => 1 // lruList is a yallist where the head is the youngest // item, and the tail is the oldest. the list contains the Hit // objects as the entries. // Each Hit object has a reference to its Yallist.Node. This // never changes. // // cache is a Map (or PseudoMap) that matches the keys to // the Yallist.Node object. class LRUCache { constructor (options) { if (typeof options === 'number') options = { max: options } if (!options) options = {} if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number') // Kind of weird to have a default max of Infinity, but oh well. const max = this[MAX] = options.max || Infinity const lc = options.length || naiveLength this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc this[ALLOW_STALE] = options.stale || false if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number') this[MAX_AGE] = options.maxAge || 0 this[DISPOSE] = options.dispose this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false this.reset() } // resize the cache when the max changes. set max (mL) { if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number') this[MAX] = mL || Infinity trim(this) } get max () { return this[MAX] } set allowStale (allowStale) { this[ALLOW_STALE] = !!allowStale } get allowStale () { return this[ALLOW_STALE] } set maxAge (mA) { if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number') this[MAX_AGE] = mA trim(this) } get maxAge () { return this[MAX_AGE] } // resize the cache when the lengthCalculator changes. set lengthCalculator (lC) { if (typeof lC !== 'function') lC = naiveLength if (lC !== this[LENGTH_CALCULATOR]) { this[LENGTH_CALCULATOR] = lC this[LENGTH] = 0 this[LRU_LIST].forEach(hit => { hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) this[LENGTH] += hit.length }) } trim(this) } get lengthCalculator () { return this[LENGTH_CALCULATOR] } get length () { return this[LENGTH] } get itemCount () { return this[LRU_LIST].length } rforEach (fn, thisp) { thisp = thisp || this for (let walker = this[LRU_LIST].tail; walker !== null;) { const prev = walker.prev forEachStep(this, fn, walker, thisp) walker = prev } } forEach (fn, thisp) { thisp = thisp || this for (let walker = this[LRU_LIST].head; walker !== null;) { const next = walker.next forEachStep(this, fn, walker, thisp) walker = next } } keys () { return this[LRU_LIST].toArray().map(k => k.key) } values () { return this[LRU_LIST].toArray().map(k => k.value) } reset () { if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) } this[CACHE] = new Map() // hash of items by key this[LRU_LIST] = new Yallist() // list of items in order of use recency this[LENGTH] = 0 // length of items in the list } dump () { return this[LRU_LIST].map(hit => isStale(this, hit) ? false : { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) }).toArray().filter(h => h) } dumpLru () { return this[LRU_LIST] } set (key, value, maxAge) { maxAge = maxAge || this[MAX_AGE] if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number') const now = maxAge ? Date.now() : 0 const len = this[LENGTH_CALCULATOR](value, key) if (this[CACHE].has(key)) { if (len > this[MAX]) { del(this, this[CACHE].get(key)) return false } const node = this[CACHE].get(key) const item = node.value // dispose of the old one before overwriting // split out into 2 ifs for better coverage tracking if (this[DISPOSE]) { if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value) } item.now = now item.maxAge = maxAge item.value = value this[LENGTH] += len - item.length item.length = len this.get(key) trim(this) return true } const hit = new Entry(key, value, len, now, maxAge) // oversized objects fall out of cache automatically. if (hit.length > this[MAX]) { if (this[DISPOSE]) this[DISPOSE](key, value) return false } this[LENGTH] += hit.length this[LRU_LIST].unshift(hit) this[CACHE].set(key, this[LRU_LIST].head) trim(this) return true } has (key) { if (!this[CACHE].has(key)) return false const hit = this[CACHE].get(key).value return !isStale(this, hit) } get (key) { return get(this, key, true) } peek (key) { return get(this, key, false) } pop () { const node = this[LRU_LIST].tail if (!node) return null del(this, node) return node.value } del (key) { del(this, this[CACHE].get(key)) } load (arr) { // reset the cache this.reset() const now = Date.now() // A previous serialized cache has the most recent items first for (let l = arr.length - 1; l >= 0; l--) { const hit = arr[l] const expiresAt = hit.e || 0 if (expiresAt === 0) // the item was created without expiration in a non aged cache this.set(hit.k, hit.v) else { const maxAge = expiresAt - now // dont add already expired items if (maxAge > 0) { this.set(hit.k, hit.v, maxAge) } } } } prune () { this[CACHE].forEach((value, key) => get(this, key, false)) } } const get = (self, key, doUse) => { const node = self[CACHE].get(key) if (node) { const hit = node.value if (isStale(self, hit)) { del(self, node) if (!self[ALLOW_STALE]) return undefined } else { if (doUse) { if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now() self[LRU_LIST].unshiftNode(node) } } return hit.value } } const isStale = (self, hit) => { if (!hit || (!hit.maxAge && !self[MAX_AGE])) return false const diff = Date.now() - hit.now return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && (diff > self[MAX_AGE]) } const trim = self => { if (self[LENGTH] > self[MAX]) { for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { // We know that we're about to delete this one, and also // what the next least recently used key will be, so just // go ahead and set it now. const prev = walker.prev del(self, walker) walker = prev } } } const del = (self, node) => { if (node) { const hit = node.value if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value) self[LENGTH] -= hit.length self[CACHE].delete(hit.key) self[LRU_LIST].removeNode(node) } } class Entry { constructor (key, value, length, now, maxAge) { this.key = key this.value = value this.length = length this.now = now this.maxAge = maxAge || 0 } } const forEachStep = (self, fn, node, thisp) => { let hit = node.value if (isStale(self, hit)) { del(self, node) if (!self[ALLOW_STALE]) hit = undefined } if (hit) fn.call(thisp, hit.value, hit.key, self) } module.exports = LRUCache /***/ }), /***/ 21381: /***/ ((module, exports) => { "use strict"; // ISC @ Julien Fontanet // =================================================================== var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined; var defineProperty = Object.defineProperty; // ------------------------------------------------------------------- var captureStackTrace = Error.captureStackTrace; if (captureStackTrace === undefined) { captureStackTrace = function captureStackTrace(error) { var container = new Error(); defineProperty(error, "stack", { configurable: true, get: function getStack() { var stack = container.stack; // Replace property with value for faster future accesses. defineProperty(this, "stack", { configurable: true, value: stack, writable: true, }); return stack; }, set: function setStack(stack) { defineProperty(error, "stack", { configurable: true, value: stack, writable: true, }); }, }); }; } // ------------------------------------------------------------------- function BaseError(message) { if (message !== undefined) { defineProperty(this, "message", { configurable: true, value: message, writable: true, }); } var cname = this.constructor.name; if (cname !== undefined && cname !== this.name) { defineProperty(this, "name", { configurable: true, value: cname, writable: true, }); } captureStackTrace(this, this.constructor); } BaseError.prototype = Object.create(Error.prototype, { // See: https://github.com/JsCommunity/make-error/issues/4 constructor: { configurable: true, value: BaseError, writable: true, }, }); // ------------------------------------------------------------------- // Sets the name of a function if possible (depends of the JS engine). var setFunctionName = (function() { function setFunctionName(fn, name) { return defineProperty(fn, "name", { configurable: true, value: name, }); } try { var f = function() {}; setFunctionName(f, "foo"); if (f.name === "foo") { return setFunctionName; } } catch (_) {} })(); // ------------------------------------------------------------------- function makeError(constructor, super_) { if (super_ == null || super_ === Error) { super_ = BaseError; } else if (typeof super_ !== "function") { throw new TypeError("super_ should be a function"); } var name; if (typeof constructor === "string") { name = constructor; constructor = construct !== undefined ? function() { return construct(super_, arguments, this.constructor); } : function() { super_.apply(this, arguments); }; // If the name can be set, do it once and for all. if (setFunctionName !== undefined) { setFunctionName(constructor, name); name = undefined; } } else if (typeof constructor !== "function") { throw new TypeError("constructor should be either a string or a function"); } // Also register the super constructor also as `constructor.super_` just // like Node's `util.inherits()`. // // eslint-disable-next-line dot-notation constructor.super_ = constructor["super"] = super_; var properties = { constructor: { configurable: true, value: constructor, writable: true, }, }; // If the name could not be set on the constructor, set it on the // prototype. if (name !== undefined) { properties.name = { configurable: true, value: name, writable: true, }; } constructor.prototype = Object.create(super_.prototype, properties); return constructor; } exports = module.exports = makeError; exports.BaseError = BaseError; /***/ }), /***/ 47426: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /*! * mime-db * Copyright(c) 2014 Jonathan Ong * MIT Licensed */ /** * Module exports. */ module.exports = __webpack_require__(73313) /***/ }), /***/ 43583: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /*! * mime-types * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ /** * Module dependencies. * @private */ var db = __webpack_require__(47426) var extname = __webpack_require__(85622).extname /** * Module variables. * @private */ var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ var TEXT_TYPE_REGEXP = /^text\//i /** * Module exports. * @public */ exports.charset = charset exports.charsets = { lookup: charset } exports.contentType = contentType exports.extension = extension exports.extensions = Object.create(null) exports.lookup = lookup exports.types = Object.create(null) // Populate the extensions/types maps populateMaps(exports.extensions, exports.types) /** * Get the default charset for a MIME type. * * @param {string} type * @return {boolean|string} */ function charset (type) { if (!type || typeof type !== 'string') { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP.exec(type) var mime = match && db[match[1].toLowerCase()] if (mime && mime.charset) { return mime.charset } // default text/* to utf-8 if (match && TEXT_TYPE_REGEXP.test(match[1])) { return 'UTF-8' } return false } /** * Create a full Content-Type header given a MIME type or extension. * * @param {string} str * @return {boolean|string} */ function contentType (str) { // TODO: should this even be in this module? if (!str || typeof str !== 'string') { return false } var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str if (!mime) { return false } // TODO: use content-type or other module if (mime.indexOf('charset') === -1) { var charset = exports.charset(mime) if (charset) mime += '; charset=' + charset.toLowerCase() } return mime } /** * Get the default extension for a MIME type. * * @param {string} type * @return {boolean|string} */ function extension (type) { if (!type || typeof type !== 'string') { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP.exec(type) // get extensions var exts = match && exports.extensions[match[1].toLowerCase()] if (!exts || !exts.length) { return false } return exts[0] } /** * Lookup the MIME type for a file path/extension. * * @param {string} path * @return {boolean|string} */ function lookup (path) { if (!path || typeof path !== 'string') { return false } // get the extension ("ext" or ".ext" or full path) var extension = extname('x.' + path) .toLowerCase() .substr(1) if (!extension) { return false } return exports.types[extension] || false } /** * Populate the extensions and types maps. * @private */ function populateMaps (extensions, types) { // source preference (least -> most) var preference = ['nginx', 'apache', undefined, 'iana'] Object.keys(db).forEach(function forEachMimeType (type) { var mime = db[type] var exts = mime.extensions if (!exts || !exts.length) { return } // mime -> extensions extensions[type] = exts // extension -> mime for (var i = 0; i < exts.length; i++) { var extension = exts[i] if (types[extension]) { var from = preference.indexOf(db[types[extension]].source) var to = preference.indexOf(mime.source) if (types[extension] !== 'application/octet-stream' && (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { // skip the remapping continue } } // set the extension -> mime types[extension] = type } }) } /***/ }), /***/ 42610: /***/ ((module) => { "use strict"; // We define these manually to ensure they're always copied // even if they would move up the prototype chain // https://nodejs.org/api/http.html#http_class_http_incomingmessage const knownProps = [ 'destroy', 'setTimeout', 'socket', 'headers', 'trailers', 'rawHeaders', 'statusCode', 'httpVersion', 'httpVersionMinor', 'httpVersionMajor', 'rawTrailers', 'statusMessage' ]; module.exports = (fromStream, toStream) => { const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); for (const prop of fromProps) { // Don't overwrite existing properties if (prop in toStream) { continue; } toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop]; } }; /***/ }), /***/ 83973: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = minimatch minimatch.Minimatch = Minimatch var path = { sep: '/' } try { path = __webpack_require__(85622) } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = __webpack_require__(33717) var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, '?': { open: '(?:', close: ')?' }, '+': { open: '(?:', close: ')+' }, '*': { open: '(?:', close: ')*' }, '@': { open: '(?:', close: ')' } } // any single thing other than / // don't need to escape / when using new RegExp() var qmark = '[^/]' // * => any number of characters var star = qmark + '*?' // ** when dots are allowed. Anything goes, except .. and . // not (^ or / followed by one or two dots followed by $ or /), // followed by anything, any number of times. var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' // not a ^ or / followed by a dot, // followed by anything, any number of times. var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' // characters that need to be escaped in RegExp. var reSpecials = charSet('().*{}+?[]^$\\!') // "abc" -> { a:true, b:true, c:true } function charSet (s) { return s.split('').reduce(function (set, c) { set[c] = true return set }, {}) } // normalizes slashes. var slashSplit = /\/+/ minimatch.filter = filter function filter (pattern, options) { options = options || {} return function (p, i, list) { return minimatch(p, pattern, options) } } function ext (a, b) { a = a || {} b = b || {} var t = {} Object.keys(b).forEach(function (k) { t[k] = b[k] }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) return t } minimatch.defaults = function (def) { if (!def || !Object.keys(def).length) return minimatch var orig = minimatch var m = function minimatch (p, pattern, options) { return orig.minimatch(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } return m } Minimatch.defaults = function (def) { if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { if (typeof pattern !== 'string') { throw new TypeError('glob pattern string required') } if (!options) options = {} // shortcut: comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { return false } // "" only matches "" if (pattern.trim() === '') return p === '' return new Minimatch(pattern, options).match(p) } function Minimatch (pattern, options) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options) } if (typeof pattern !== 'string') { throw new TypeError('glob pattern string required') } if (!options) options = {} pattern = pattern.trim() // windows support: need to use /, not \ if (path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } this.options = options this.set = [] this.pattern = pattern this.regexp = null this.negate = false this.comment = false this.empty = false // make the set of regexps etc. this.make() } Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { // don't do it more than once. if (this._made) return var pattern = this.pattern var options = this.options // empty patterns and comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { this.comment = true return } if (!pattern) { this.empty = true return } // step 1: figure out negation, etc. this.parseNegate() // step 2: expand braces var set = this.globSet = this.braceExpand() if (options.debug) this.debug = console.error this.debug(this.pattern, set) // step 3: now we have a set, so turn each one into a series of path-portion // matching patterns. // These will be regexps, except in the case of "**", which is // set to the GLOBSTAR object for globstar behavior, // and will not contain any / characters set = this.globParts = set.map(function (s) { return s.split(slashSplit) }) this.debug(this.pattern, set) // glob --> regexps set = set.map(function (s, si, set) { return s.map(this.parse, this) }, this) this.debug(this.pattern, set) // filter out everything that didn't compile properly. set = set.filter(function (s) { return s.indexOf(false) === -1 }) this.debug(this.pattern, set) this.set = set } Minimatch.prototype.parseNegate = parseNegate function parseNegate () { var pattern = this.pattern var negate = false var options = this.options var negateOffset = 0 if (options.nonegate) return for (var i = 0, l = pattern.length ; i < l && pattern.charAt(i) === '!' ; i++) { negate = !negate negateOffset++ } if (negateOffset) this.pattern = pattern.substr(negateOffset) this.negate = negate } // Brace expansion: // a{b,c}d -> abd acd // a{b,}c -> abc ac // a{0..3}d -> a0d a1d a2d a3d // a{b,c{d,e}f}g -> abg acdfg acefg // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg // // Invalid sets are not expanded. // a{2..}b -> a{2..}b // a{b}c -> a{b}c minimatch.braceExpand = function (pattern, options) { return braceExpand(pattern, options) } Minimatch.prototype.braceExpand = braceExpand function braceExpand (pattern, options) { if (!options) { if (this instanceof Minimatch) { options = this.options } else { options = {} } } pattern = typeof pattern === 'undefined' ? this.pattern : pattern if (typeof pattern === 'undefined') { throw new TypeError('undefined pattern') } if (options.nobrace || !pattern.match(/\{.*\}/)) { // shortcut. no need to expand. return [pattern] } return expand(pattern) } // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full // pattern, split on '/', and then turned into a regular expression. // A regexp is made at the end which joins each array with an // escaped /, and another full one which joins each regexp with |. // // Following the lead of Bash 4.1, note that "**" only has special meaning // when it is the *only* thing in a path portion. Otherwise, any series // of * is equivalent to a single *. Globstar behavior is enabled by // default, and can be disabled by setting options.noglobstar. Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { if (pattern.length > 1024 * 64) { throw new TypeError('pattern is too long') } var options = this.options // shortcuts if (!options.noglobstar && pattern === '**') return GLOBSTAR if (pattern === '') return '' var re = '' var hasMagic = !!options.nocase var escaping = false // ? => one single character var patternListStack = [] var negativeLists = [] var stateChar var inClass = false var reClassStart = -1 var classStart = -1 // . and .. never match anything that doesn't start with ., // even when options.dot is set. var patternStart = pattern.charAt(0) === '.' ? '' // anything // not (start or / followed by . or .. followed by / or end) : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)' var self = this function clearStateChar () { if (stateChar) { // we had some state-tracking character // that wasn't consumed by this pass. switch (stateChar) { case '*': re += star hasMagic = true break case '?': re += qmark hasMagic = true break default: re += '\\' + stateChar break } self.debug('clearStateChar %j %j', stateChar, re) stateChar = false } } for (var i = 0, len = pattern.length, c ; (i < len) && (c = pattern.charAt(i)) ; i++) { this.debug('%s\t%s %s %j', pattern, i, re, c) // skip over any that are escaped. if (escaping && reSpecials[c]) { re += '\\' + c escaping = false continue } switch (c) { case '/': // completely not allowed, even escaped. // Should already be path-split by now. return false case '\\': clearStateChar() escaping = true continue // the various stateChar values // for the "extglob" stuff. case '?': case '*': case '+': case '@': case '!': this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) // all of those are literals inside a class, except that // the glob [!a] means [^a] in regexp if (inClass) { this.debug(' in class') if (c === '!' && i === classStart + 1) c = '^' re += c continue } // if we already have a stateChar, then it means // that there was something like ** or +? in there. // Handle the stateChar, then proceed with this one. self.debug('call clearStateChar %j', stateChar) clearStateChar() stateChar = c // if extglob is disabled, then +(asdf|foo) isn't a thing. // just clear the statechar *now*, rather than even diving into // the patternList stuff. if (options.noext) clearStateChar() continue case '(': if (inClass) { re += '(' continue } if (!stateChar) { re += '\\(' continue } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }) // negation is (?:(?!js)[^/]*) re += stateChar === '!' ? '(?:(?!(?:' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false continue case ')': if (inClass || !patternListStack.length) { re += '\\)' continue } clearStateChar() hasMagic = true var pl = patternListStack.pop() // negation is (?:(?!js)[^/]*) // The others are (?:) re += pl.close if (pl.type === '!') { negativeLists.push(pl) } pl.reEnd = re.length continue case '|': if (inClass || !patternListStack.length || escaping) { re += '\\|' escaping = false continue } clearStateChar() re += '|' continue // these are mostly the same in regexp and glob case '[': // swallow any state-tracking char before the [ clearStateChar() if (inClass) { re += '\\' + c continue } inClass = true classStart = i reClassStart = re.length re += c continue case ']': // a right bracket shall lose its special // meaning and represent itself in // a bracket expression if it occurs // first in the list. -- POSIX.2 2.8.3.2 if (i === classStart + 1 || !inClass) { re += '\\' + c escaping = false continue } // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" if (inClass) { // split where the last [ was, make sure we don't have // an invalid re. if so, re-walk the contents of the // would-be class to re-translate any characters that // were passed through as-is // TODO: It would probably be faster to determine this // without a try/catch and a new RegExp, but it's tricky // to do safely. For now, this is safe and works. var cs = pattern.substring(classStart + 1, i) try { RegExp('[' + cs + ']') } catch (er) { // not a valid class! var sp = this.parse(cs, SUBPARSE) re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' hasMagic = hasMagic || sp[1] inClass = false continue } } // finish up the class. hasMagic = true inClass = false re += c continue default: // swallow any state char that wasn't consumed clearStateChar() if (escaping) { // no need escaping = false } else if (reSpecials[c] && !(c === '^' && inClass)) { re += '\\' } re += c } // switch } // for // handle the case where we left a class open. // "[abc" is valid, equivalent to "\[abc" if (inClass) { // split where the last [ was, and escape it // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is cs = pattern.substr(classStart + 1) sp = this.parse(cs, SUBPARSE) re = re.substr(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } // handle the case where we had a +( thing at the *end* // of the pattern. // each pattern list stack adds 3 chars, and we need to go through // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length) this.debug('setting tail', re, pl) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. $2 = '\\' } // need to escape all those slashes *again*, without escaping the // one that we need for escaping the | character. As it works out, // escaping an even number of slashes can be done by simply repeating // it exactly after itself. That's why this trick works. // // I am sorry that you have to see this. return $1 + $1 + $2 + '|' }) this.debug('tail=%j\n %s', tail, tail, pl, re) var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type hasMagic = true re = re.slice(0, pl.reStart) + t + '\\(' + tail } // handle trailing things that only matter at the very end. clearStateChar() if (escaping) { // trailing \\ re += '\\\\' } // only need to apply the nodot start if the re starts with // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { case '.': case '[': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS // A pattern like: *.!(x).!(y|z) needs to ensure that a name // like 'a.xyz.yz' doesn't match. So, the first negative // lookahead, has to look ALL the way ahead, to the end of // the pattern. for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n] var nlBefore = re.slice(0, nl.reStart) var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) var nlAfter = re.slice(nl.reEnd) nlLast += nlAfter // Handle nested stuff like *(*.js|!(*.json)), where open parens // mean that we should *not* include the ) in the bit that is considered // "after" the negated section. var openParensBefore = nlBefore.split('(').length - 1 var cleanAfter = nlAfter for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } nlAfter = cleanAfter var dollar = '' if (nlAfter === '' && isSub !== SUBPARSE) { dollar = '$' } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast re = newRe } // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. if (re !== '' && hasMagic) { re = '(?=.)' + re } if (addPatternStart) { re = patternStart + re } // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { return [re, hasMagic] } // skip the regexp for non-magical patterns // unescape anything in it, though, so that it'll be // an exact match against a file etc. if (!hasMagic) { return globUnescape(pattern) } var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) } catch (er) { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line // mode, but it's not a /m regex. return new RegExp('$.') } regExp._glob = pattern regExp._src = re return regExp } minimatch.makeRe = function (pattern, options) { return new Minimatch(pattern, options || {}).makeRe() } Minimatch.prototype.makeRe = makeRe function makeRe () { if (this.regexp || this.regexp === false) return this.regexp // at this point, this.set is a 2d array of partial // pattern strings, or "**". // // It's better to use .match(). This function shouldn't // be used, really, but it's pretty convenient sometimes, // when you just want to work with a regex. var set = this.set if (!set.length) { this.regexp = false return this.regexp } var options = this.options var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot var flags = options.nocase ? 'i' : '' var re = set.map(function (pattern) { return pattern.map(function (p) { return (p === GLOBSTAR) ? twoStar : (typeof p === 'string') ? regExpEscape(p) : p._src }).join('\\\/') }).join('|') // must match entire pattern // ending in a * or ** will make it less strict. re = '^(?:' + re + ')$' // can match anything, as long as it's not this. if (this.negate) re = '^(?!' + re + ').*$' try { this.regexp = new RegExp(re, flags) } catch (ex) { this.regexp = false } return this.regexp } minimatch.match = function (list, pattern, options) { options = options || {} var mm = new Minimatch(pattern, options) list = list.filter(function (f) { return mm.match(f) }) if (mm.options.nonull && !list.length) { list.push(pattern) } return list } Minimatch.prototype.match = match function match (f, partial) { this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. if (this.comment) return false if (this.empty) return f === '' if (f === '/' && partial) return true var options = this.options // windows: need to use /, not \ if (path.sep !== '/') { f = f.split(path.sep).join('/') } // treat the test path as a set of pathparts. f = f.split(slashSplit) this.debug(this.pattern, 'split', f) // just ONE of the pattern sets in this.set needs to match // in order for it to be valid. If negating, then just one // match means that we have failed. // Either way, return on the first hit. var set = this.set this.debug(this.pattern, 'set', set) // Find the basename of the path by looking for the last non-empty segment var filename var i for (i = f.length - 1; i >= 0; i--) { filename = f[i] if (filename) break } for (i = 0; i < set.length; i++) { var pattern = set[i] var file = f if (options.matchBase && pattern.length === 1) { file = [filename] } var hit = this.matchOne(file, pattern, partial) if (hit) { if (options.flipNegate) return true return !this.negate } } // didn't get any hits. this is success if it's a negative // pattern, failure otherwise. if (options.flipNegate) return false return this.negate } // set partial to true to test if, for example, // "/a/b" matches the start of "/*/b/*/d" // Partial means, if you run out of file before you run // out of pattern, then that's fine, as long as all // the parts match. Minimatch.prototype.matchOne = function (file, pattern, partial) { var options = this.options this.debug('matchOne', { 'this': this, file: file, pattern: pattern }) this.debug('matchOne', file.length, pattern.length) for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length ; (fi < fl) && (pi < pl) ; fi++, pi++) { this.debug('matchOne loop') var p = pattern[pi] var f = file[fi] this.debug(pattern, p, f) // should be impossible. // some invalid regexp stuff in the set. if (p === false) return false if (p === GLOBSTAR) { this.debug('GLOBSTAR', [pattern, p, f]) // "**" // a/**/b/**/c would match the following: // a/b/x/y/z/c // a/x/y/z/b/c // a/b/x/b/x/c // a/b/c // To do this, take the rest of the pattern after // the **, and see if it would match the file remainder. // If so, return success. // If not, the ** "swallows" a segment, and try again. // This is recursively awful. // // a/**/b/**/c matching a/b/x/y/z/c // - a matches a // - doublestar // - matchOne(b/x/y/z/c, b/**/c) // - b matches b // - doublestar // - matchOne(x/y/z/c, c) -> no // - matchOne(y/z/c, c) -> no // - matchOne(z/c, c) -> no // - matchOne(c, c) yes, hit var fr = fi var pr = pi + 1 if (pr === pl) { this.debug('** at the end') // a ** at the end will just swallow the rest. // We have found a match. // however, it will not swallow /.x, unless // options.dot is set. // . and .. are *never* matched by **, for explosively // exponential reasons. for (; fi < fl; fi++) { if (file[fi] === '.' || file[fi] === '..' || (!options.dot && file[fi].charAt(0) === '.')) return false } return true } // ok, let's see if we can swallow whatever we can. while (fr < fl) { var swallowee = file[fr] this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) // XXX remove this slice. Just pass the start index. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug('globstar found match!', fr, fl, swallowee) // found a match. return true } else { // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. if (swallowee === '.' || swallowee === '..' || (!options.dot && swallowee.charAt(0) === '.')) { this.debug('dot detected!', file, fr, pattern, pr) break } // ** swallows a segment, and continue. this.debug('globstar swallow a segment, and continue') fr++ } } // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) if (fr === fl) return true } return false } // something other than ** // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { if (options.nocase) { hit = f.toLowerCase() === p.toLowerCase() } else { hit = f === p } this.debug('string match', p, f, hit) } else { hit = f.match(p) this.debug('pattern match', p, f, hit) } if (!hit) return false } // Note: ending in / means that we'll get a final "" // at the end of the pattern. This can only match a // corresponding "" at the end of the file. // If the file ends in /, then it can only match a // a pattern that ends in /, unless the pattern just // doesn't have any more for it. But, a/b/ should *not* // match "a/b/*", even though "" matches against the // [^/]*? pattern, except in partial mode, where it might // simply not be reached yet. // However, a/b/ should still satisfy a/* // now either we fell off the end of the pattern, or we're done. if (fi === fl && pi === pl) { // ran out of pattern and filename at the same time. // an exact hit! return true } else if (fi === fl) { // ran out of file, but still had pattern left. // this is ok if we're doing the match as part of // a glob fs traversal. return partial } else if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') return emptyFileEnd } // should be unreachable. throw new Error('wtf?') } // replace stuff like \* with * function globUnescape (s) { return s.replace(/\\(.)/g, '$1') } function regExpEscape (s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } /***/ }), /***/ 17952: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Use the `URL` global when targeting Node.js 10 const URLParser = typeof URL === 'undefined' ? __webpack_require__(78835).URL : URL; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; const testParameter = (name, filters) => { return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); }; const normalizeDataURL = (urlString, {stripHash}) => { const parts = urlString.match(/^data:(.*?),(.*?)(?:#(.*))?$/); if (!parts) { throw new Error(`Invalid URL: ${urlString}`); } const mediaType = parts[1].split(';'); const body = parts[2]; const hash = stripHash ? '' : parts[3]; let base64 = false; if (mediaType[mediaType.length - 1] === 'base64') { mediaType.pop(); base64 = true; } // Lowercase MIME type const mimeType = (mediaType.shift() || '').toLowerCase(); const attributes = mediaType .map(attribute => { let [key, value = ''] = attribute.split('=').map(string => string.trim()); // Lowercase `charset` if (key === 'charset') { value = value.toLowerCase(); if (value === DATA_URL_DEFAULT_CHARSET) { return ''; } } return `${key}${value ? `=${value}` : ''}`; }) .filter(Boolean); const normalizedMediaType = [ ...attributes ]; if (base64) { normalizedMediaType.push('base64'); } if (normalizedMediaType.length !== 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { normalizedMediaType.unshift(mimeType); } return `data:${normalizedMediaType.join(';')},${base64 ? body.trim() : body}${hash ? `#${hash}` : ''}`; }; const normalizeUrl = (urlString, options) => { options = { defaultProtocol: 'http:', normalizeProtocol: true, forceHttp: false, forceHttps: false, stripAuthentication: true, stripHash: false, stripWWW: true, removeQueryParameters: [/^utm_\w+/i], removeTrailingSlash: true, removeDirectoryIndex: false, sortQueryParameters: true, ...options }; // TODO: Remove this at some point in the future if (Reflect.has(options, 'normalizeHttps')) { throw new Error('options.normalizeHttps is renamed to options.forceHttp'); } if (Reflect.has(options, 'normalizeHttp')) { throw new Error('options.normalizeHttp is renamed to options.forceHttps'); } if (Reflect.has(options, 'stripFragment')) { throw new Error('options.stripFragment is renamed to options.stripHash'); } urlString = urlString.trim(); // Data URL if (/^data:/i.test(urlString)) { return normalizeDataURL(urlString, options); } const hasRelativeProtocol = urlString.startsWith('//'); const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); // Prepend protocol if (!isRelativeUrl) { urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); } const urlObj = new URLParser(urlString); if (options.forceHttp && options.forceHttps) { throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); } if (options.forceHttp && urlObj.protocol === 'https:') { urlObj.protocol = 'http:'; } if (options.forceHttps && urlObj.protocol === 'http:') { urlObj.protocol = 'https:'; } // Remove auth if (options.stripAuthentication) { urlObj.username = ''; urlObj.password = ''; } // Remove hash if (options.stripHash) { urlObj.hash = ''; } // Remove duplicate slashes if not preceded by a protocol if (urlObj.pathname) { // TODO: Use the following instead when targeting Node.js 10 // `urlObj.pathname = urlObj.pathname.replace(/(? { if (/^(?!\/)/g.test(p1)) { return `${p1}/`; } return '/'; }); } // Decode URI octets if (urlObj.pathname) { urlObj.pathname = decodeURI(urlObj.pathname); } // Remove directory index if (options.removeDirectoryIndex === true) { options.removeDirectoryIndex = [/^index\.[a-z]+$/]; } if (Array.isArray(options.removeDirectoryIndex) && options.removeDirectoryIndex.length > 0) { let pathComponents = urlObj.pathname.split('/'); const lastComponent = pathComponents[pathComponents.length - 1]; if (testParameter(lastComponent, options.removeDirectoryIndex)) { pathComponents = pathComponents.slice(0, pathComponents.length - 1); urlObj.pathname = pathComponents.slice(1).join('/') + '/'; } } if (urlObj.hostname) { // Remove trailing dot urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); // Remove `www.` if (options.stripWWW && /^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(urlObj.hostname)) { // Each label should be max 63 at length (min: 2). // The extension should be max 5 at length (min: 2). // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); } } // Remove query unwanted parameters if (Array.isArray(options.removeQueryParameters)) { for (const key of [...urlObj.searchParams.keys()]) { if (testParameter(key, options.removeQueryParameters)) { urlObj.searchParams.delete(key); } } } // Sort query parameters if (options.sortQueryParameters) { urlObj.searchParams.sort(); } if (options.removeTrailingSlash) { urlObj.pathname = urlObj.pathname.replace(/\/$/, ''); } // Take advantage of many of the Node `url` normalizations urlString = urlObj.toString(); // Remove ending `/` if ((options.removeTrailingSlash || urlObj.pathname === '/') && urlObj.hash === '') { urlString = urlString.replace(/\/$/, ''); } // Restore relative protocol, if applicable if (hasRelativeProtocol && !options.normalizeProtocol) { urlString = urlString.replace(/^http:\/\//, '//'); } // Remove http/https if (options.stripProtocol) { urlString = urlString.replace(/^(?:https?:)?\/\//, ''); } return urlString; }; module.exports = normalizeUrl; // TODO: Remove this for the next major release module.exports.default = normalizeUrl; /***/ }), /***/ 43248: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var crypto = __webpack_require__(33373) function sha (key, body, algorithm) { return crypto.createHmac(algorithm, key).update(body).digest('base64') } function rsa (key, body) { return crypto.createSign('RSA-SHA1').update(body).sign(key, 'base64') } function rfc3986 (str) { return encodeURIComponent(str) .replace(/!/g,'%21') .replace(/\*/g,'%2A') .replace(/\(/g,'%28') .replace(/\)/g,'%29') .replace(/'/g,'%27') } // Maps object to bi-dimensional array // Converts { foo: 'A', bar: [ 'b', 'B' ]} to // [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] function map (obj) { var key, val, arr = [] for (key in obj) { val = obj[key] if (Array.isArray(val)) for (var i = 0; i < val.length; i++) arr.push([key, val[i]]) else if (typeof val === 'object') for (var prop in val) arr.push([key + '[' + prop + ']', val[prop]]) else arr.push([key, val]) } return arr } // Compare function for sort function compare (a, b) { return a > b ? 1 : a < b ? -1 : 0 } function generateBase (httpMethod, base_uri, params) { // adapted from https://dev.twitter.com/docs/auth/oauth and // https://dev.twitter.com/docs/auth/creating-signature // Parameter normalization // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 var normalized = map(params) // 1. First, the name and value of each parameter are encoded .map(function (p) { return [ rfc3986(p[0]), rfc3986(p[1] || '') ] }) // 2. The parameters are sorted by name, using ascending byte value // ordering. If two or more parameters share the same name, they // are sorted by their value. .sort(function (a, b) { return compare(a[0], b[0]) || compare(a[1], b[1]) }) // 3. The name of each parameter is concatenated to its corresponding // value using an "=" character (ASCII code 61) as a separator, even // if the value is empty. .map(function (p) { return p.join('=') }) // 4. The sorted name/value pairs are concatenated together into a // single string by using an "&" character (ASCII code 38) as // separator. .join('&') var base = [ rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), rfc3986(base_uri), rfc3986(normalized) ].join('&') return base } function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { var base = generateBase(httpMethod, base_uri, params) var key = [ consumer_secret || '', token_secret || '' ].map(rfc3986).join('&') return sha(key, base, 'sha1') } function hmacsign256 (httpMethod, base_uri, params, consumer_secret, token_secret) { var base = generateBase(httpMethod, base_uri, params) var key = [ consumer_secret || '', token_secret || '' ].map(rfc3986).join('&') return sha(key, base, 'sha256') } function rsasign (httpMethod, base_uri, params, private_key, token_secret) { var base = generateBase(httpMethod, base_uri, params) var key = private_key || '' return rsa(key, base) } function plaintext (consumer_secret, token_secret) { var key = [ consumer_secret || '', token_secret || '' ].map(rfc3986).join('&') return key } function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { var method var skipArgs = 1 switch (signMethod) { case 'RSA-SHA1': method = rsasign break case 'HMAC-SHA1': method = hmacsign break case 'HMAC-SHA256': method = hmacsign256 break case 'PLAINTEXT': method = plaintext skipArgs = 4 break default: throw new Error('Signature method not supported: ' + signMethod) } return method.apply(null, [].slice.call(arguments, skipArgs)) } exports.hmacsign = hmacsign exports.hmacsign256 = hmacsign256 exports.rsasign = rsasign exports.plaintext = plaintext exports.sign = sign exports.rfc3986 = rfc3986 exports.generateBase = generateBase /***/ }), /***/ 24856: /***/ ((module, exports, __webpack_require__) => { "use strict"; var crypto = __webpack_require__(33373); /** * Exported function * * Options: * * - `algorithm` hash algo to be used by this instance: *'sha1', 'md5' * - `excludeValues` {true|*false} hash object keys, values ignored * - `encoding` hash encoding, supports 'buffer', '*hex', 'binary', 'base64' * - `ignoreUnknown` {true|*false} ignore unknown object types * - `replacer` optional function that replaces values before hashing * - `respectFunctionProperties` {*true|false} consider function properties when hashing * - `respectFunctionNames` {*true|false} consider 'name' property of functions for hashing * - `respectType` {*true|false} Respect special properties (prototype, constructor) * when hashing to distinguish between types * - `unorderedArrays` {true|*false} Sort all arrays before hashing * - `unorderedSets` {*true|false} Sort `Set` and `Map` instances before hashing * * = default * * @param {object} object value to hash * @param {object} options hashing options * @return {string} hash value * @api public */ exports = module.exports = objectHash; function objectHash(object, options){ options = applyDefaults(object, options); return hash(object, options); } /** * Exported sugar methods * * @param {object} object value to hash * @return {string} hash value * @api public */ exports.sha1 = function(object){ return objectHash(object); }; exports.keys = function(object){ return objectHash(object, {excludeValues: true, algorithm: 'sha1', encoding: 'hex'}); }; exports.MD5 = function(object){ return objectHash(object, {algorithm: 'md5', encoding: 'hex'}); }; exports.keysMD5 = function(object){ return objectHash(object, {algorithm: 'md5', encoding: 'hex', excludeValues: true}); }; // Internals var hashes = crypto.getHashes ? crypto.getHashes().slice() : ['sha1', 'md5']; hashes.push('passthrough'); var encodings = ['buffer', 'hex', 'binary', 'base64']; function applyDefaults(object, sourceOptions){ sourceOptions = sourceOptions || {}; // create a copy rather than mutating var options = {}; options.algorithm = sourceOptions.algorithm || 'sha1'; options.encoding = sourceOptions.encoding || 'hex'; options.excludeValues = sourceOptions.excludeValues ? true : false; options.algorithm = options.algorithm.toLowerCase(); options.encoding = options.encoding.toLowerCase(); options.ignoreUnknown = sourceOptions.ignoreUnknown !== true ? false : true; // default to false options.respectType = sourceOptions.respectType === false ? false : true; // default to true options.respectFunctionNames = sourceOptions.respectFunctionNames === false ? false : true; options.respectFunctionProperties = sourceOptions.respectFunctionProperties === false ? false : true; options.unorderedArrays = sourceOptions.unorderedArrays !== true ? false : true; // default to false options.unorderedSets = sourceOptions.unorderedSets === false ? false : true; // default to false options.unorderedObjects = sourceOptions.unorderedObjects === false ? false : true; // default to true options.replacer = sourceOptions.replacer || undefined; options.excludeKeys = sourceOptions.excludeKeys || undefined; if(typeof object === 'undefined') { throw new Error('Object argument required.'); } // if there is a case-insensitive match in the hashes list, accept it // (i.e. SHA256 for sha256) for (var i = 0; i < hashes.length; ++i) { if (hashes[i].toLowerCase() === options.algorithm.toLowerCase()) { options.algorithm = hashes[i]; } } if(hashes.indexOf(options.algorithm) === -1){ throw new Error('Algorithm "' + options.algorithm + '" not supported. ' + 'supported values: ' + hashes.join(', ')); } if(encodings.indexOf(options.encoding) === -1 && options.algorithm !== 'passthrough'){ throw new Error('Encoding "' + options.encoding + '" not supported. ' + 'supported values: ' + encodings.join(', ')); } return options; } /** Check if the given function is a native function */ function isNativeFunction(f) { if ((typeof f) !== 'function') { return false; } var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i; return exp.exec(Function.prototype.toString.call(f)) != null; } function hash(object, options) { var hashingStream; if (options.algorithm !== 'passthrough') { hashingStream = crypto.createHash(options.algorithm); } else { hashingStream = new PassThrough(); } if (typeof hashingStream.write === 'undefined') { hashingStream.write = hashingStream.update; hashingStream.end = hashingStream.update; } var hasher = typeHasher(options, hashingStream); hasher.dispatch(object); if (!hashingStream.update) { hashingStream.end(''); } if (hashingStream.digest) { return hashingStream.digest(options.encoding === 'buffer' ? undefined : options.encoding); } var buf = hashingStream.read(); if (options.encoding === 'buffer') { return buf; } return buf.toString(options.encoding); } /** * Expose streaming API * * @param {object} object Value to serialize * @param {object} options Options, as for hash() * @param {object} stream A stream to write the serializiation to * @api public */ exports.writeToStream = function(object, options, stream) { if (typeof stream === 'undefined') { stream = options; options = {}; } options = applyDefaults(object, options); return typeHasher(options, stream).dispatch(object); }; function typeHasher(options, writeTo, context){ context = context || []; var write = function(str) { if (writeTo.update) { return writeTo.update(str, 'utf8'); } else { return writeTo.write(str, 'utf8'); } }; return { dispatch: function(value){ if (options.replacer) { value = options.replacer(value); } var type = typeof value; if (value === null) { type = 'null'; } //console.log("[DEBUG] Dispatch: ", value, "->", type, " -> ", "_" + type); return this['_' + type](value); }, _object: function(object) { var pattern = (/\[object (.*)\]/i); var objString = Object.prototype.toString.call(object); var objType = pattern.exec(objString); if (!objType) { // object type did not match [object ...] objType = 'unknown:[' + objString + ']'; } else { objType = objType[1]; // take only the class name } objType = objType.toLowerCase(); var objectNumber = null; if ((objectNumber = context.indexOf(object)) >= 0) { return this.dispatch('[CIRCULAR:' + objectNumber + ']'); } else { context.push(object); } if (typeof Buffer !== 'undefined' && Buffer.isBuffer && Buffer.isBuffer(object)) { write('buffer:'); return write(object); } if(objType !== 'object' && objType !== 'function' && objType !== 'asyncfunction') { if(this['_' + objType]) { this['_' + objType](object); } else if (options.ignoreUnknown) { return write('[' + objType + ']'); } else { throw new Error('Unknown object type "' + objType + '"'); } }else{ var keys = Object.keys(object); if (options.unorderedObjects) { keys = keys.sort(); } // Make sure to incorporate special properties, so // Types with different prototypes will produce // a different hash and objects derived from // different functions (`new Foo`, `new Bar`) will // produce different hashes. // We never do this for native functions since some // seem to break because of that. if (options.respectType !== false && !isNativeFunction(object)) { keys.splice(0, 0, 'prototype', '__proto__', 'constructor'); } if (options.excludeKeys) { keys = keys.filter(function(key) { return !options.excludeKeys(key); }); } write('object:' + keys.length + ':'); var self = this; return keys.forEach(function(key){ self.dispatch(key); write(':'); if(!options.excludeValues) { self.dispatch(object[key]); } write(','); }); } }, _array: function(arr, unordered){ unordered = typeof unordered !== 'undefined' ? unordered : options.unorderedArrays !== false; // default to options.unorderedArrays var self = this; write('array:' + arr.length + ':'); if (!unordered || arr.length <= 1) { return arr.forEach(function(entry) { return self.dispatch(entry); }); } // the unordered case is a little more complicated: // since there is no canonical ordering on objects, // i.e. {a:1} < {a:2} and {a:1} > {a:2} are both false, // we first serialize each entry using a PassThrough stream // before sorting. // also: we can’t use the same context array for all entries // since the order of hashing should *not* matter. instead, // we keep track of the additions to a copy of the context array // and add all of them to the global context array when we’re done var contextAdditions = []; var entries = arr.map(function(entry) { var strm = new PassThrough(); var localContext = context.slice(); // make copy var hasher = typeHasher(options, strm, localContext); hasher.dispatch(entry); // take only what was added to localContext and append it to contextAdditions contextAdditions = contextAdditions.concat(localContext.slice(context.length)); return strm.read().toString(); }); context = context.concat(contextAdditions); entries.sort(); return this._array(entries, false); }, _date: function(date){ return write('date:' + date.toJSON()); }, _symbol: function(sym){ return write('symbol:' + sym.toString()); }, _error: function(err){ return write('error:' + err.toString()); }, _boolean: function(bool){ return write('bool:' + bool.toString()); }, _string: function(string){ write('string:' + string.length + ':'); write(string.toString()); }, _function: function(fn){ write('fn:'); if (isNativeFunction(fn)) { this.dispatch('[native]'); } else { this.dispatch(fn.toString()); } if (options.respectFunctionNames !== false) { // Make sure we can still distinguish native functions // by their name, otherwise String and Function will // have the same hash this.dispatch("function-name:" + String(fn.name)); } if (options.respectFunctionProperties) { this._object(fn); } }, _number: function(number){ return write('number:' + number.toString()); }, _xml: function(xml){ return write('xml:' + xml.toString()); }, _null: function() { return write('Null'); }, _undefined: function() { return write('Undefined'); }, _regexp: function(regex){ return write('regex:' + regex.toString()); }, _uint8array: function(arr){ write('uint8array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _uint8clampedarray: function(arr){ write('uint8clampedarray:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _int8array: function(arr){ write('uint8array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _uint16array: function(arr){ write('uint16array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _int16array: function(arr){ write('uint16array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _uint32array: function(arr){ write('uint32array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _int32array: function(arr){ write('uint32array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _float32array: function(arr){ write('float32array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _float64array: function(arr){ write('float64array:'); return this.dispatch(Array.prototype.slice.call(arr)); }, _arraybuffer: function(arr){ write('arraybuffer:'); return this.dispatch(new Uint8Array(arr)); }, _url: function(url) { return write('url:' + url.toString(), 'utf8'); }, _map: function(map) { write('map:'); var arr = Array.from(map); return this._array(arr, options.unorderedSets !== false); }, _set: function(set) { write('set:'); var arr = Array.from(set); return this._array(arr, options.unorderedSets !== false); }, _blob: function() { if (options.ignoreUnknown) { return write('[blob]'); } throw Error('Hashing Blob objects is currently not supported\n' + '(see https://github.com/puleos/object-hash/issues/26)\n' + 'Use "options.replacer" or "options.ignoreUnknown"\n'); }, _domwindow: function() { return write('domwindow'); }, /* Node.js standard native objects */ _process: function() { return write('process'); }, _timer: function() { return write('timer'); }, _pipe: function() { return write('pipe'); }, _tcp: function() { return write('tcp'); }, _udp: function() { return write('udp'); }, _tty: function() { return write('tty'); }, _statwatcher: function() { return write('statwatcher'); }, _securecontext: function() { return write('securecontext'); }, _connection: function() { return write('connection'); }, _zlib: function() { return write('zlib'); }, _context: function() { return write('context'); }, _nodescript: function() { return write('nodescript'); }, _httpparser: function() { return write('httpparser'); }, _dataview: function() { return write('dataview'); }, _signal: function() { return write('signal'); }, _fsevent: function() { return write('fsevent'); }, _tlswrap: function() { return write('tlswrap'); } }; } // Mini-implementation of stream.PassThrough // We are far from having need for the full implementation, and we can // make assumptions like "many writes, then only one final read" // and we can ignore encoding specifics function PassThrough() { return { buf: '', write: function(b) { this.buf += b; }, end: function(b) { this.buf += b; }, read: function() { return this.buf; } }; } /***/ }), /***/ 1270: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { strict: assert } = __webpack_require__(42357); const { createHash } = __webpack_require__(33373); const { format } = __webpack_require__(31669); const shake256 = __webpack_require__(19811); const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); const encode = (input) => fromBase64(input.toString('base64')); /** SPECIFICATION * Its (_hash) value is the base64url encoding of the left-most half of the hash of the octets of * the ASCII representation of the token value, where the hash algorithm used is the hash algorithm * used in the alg Header Parameter of the ID Token's JOSE Header. For instance, if the alg is * RS256, hash the token value with SHA-256, then take the left-most 128 bits and base64url encode * them. The _hash value is a case sensitive string. */ /** * @name getHash * @api private * * returns the sha length based off the JOSE alg heade value, defaults to sha256 * * @param token {String} token value to generate the hash from * @param alg {String} ID Token JOSE header alg value (i.e. RS256, HS384, ES512, PS256) * @param [crv] {String} For EdDSA the curve decides what hash algorithm is used. Required for EdDSA */ function getHash(alg, crv) { switch (alg) { case 'HS256': case 'RS256': case 'PS256': case 'ES256': case 'ES256K': return createHash('sha256'); case 'HS384': case 'RS384': case 'PS384': case 'ES384': return createHash('sha384'); case 'HS512': case 'RS512': case 'PS512': case 'ES512': return createHash('sha512'); case 'EdDSA': switch (crv) { case 'Ed25519': return createHash('sha512'); case 'Ed448': if (!shake256) { throw new TypeError('Ed448 *_hash calculation is not supported in your Node.js runtime version'); } return createHash('shake256', { outputLength: 114 }); default: throw new TypeError('unrecognized or invalid EdDSA curve provided'); } default: throw new TypeError('unrecognized or invalid JWS algorithm provided'); } } function generate(token, alg, crv) { const digest = getHash(alg, crv).update(token).digest(); return encode(digest.slice(0, digest.length / 2)); } function validate(names, actual, source, alg, crv) { if (typeof names.claim !== 'string' || !names.claim) { throw new TypeError('names.claim must be a non-empty string'); } if (typeof names.source !== 'string' || !names.source) { throw new TypeError('names.source must be a non-empty string'); } assert(typeof actual === 'string' && actual, `${names.claim} must be a non-empty string`); assert(typeof source === 'string' && source, `${names.source} must be a non-empty string`); let expected; let msg; try { expected = generate(source, alg, crv); } catch (err) { msg = format('%s could not be validated (%s)', names.claim, err.message); } msg = msg || format('%s mismatch, expected %s, got: %s', names.claim, expected, actual); assert.equal(expected, actual, msg); } module.exports = { validate, generate, }; /***/ }), /***/ 19811: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const crypto = __webpack_require__(33373); const [major, minor] = process.version.substr(1).split('.').map((x) => parseInt(x, 10)); const xofOutputLength = major > 12 || (major === 12 && minor >= 8); const shake256 = xofOutputLength && crypto.getHashes().includes('shake256'); module.exports = shake256; /***/ }), /***/ 1223: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var wrappy = __webpack_require__(62940) module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) once.proto = once(function () { Object.defineProperty(Function.prototype, 'once', { value: function () { return once(this) }, configurable: true }) Object.defineProperty(Function.prototype, 'onceStrict', { value: function () { return onceStrict(this) }, configurable: true }) }) function once (fn) { var f = function () { if (f.called) return f.value f.called = true return f.value = fn.apply(this, arguments) } f.called = false return f } function onceStrict (fn) { var f = function () { if (f.called) throw new Error(f.onceError) f.called = true return f.value = fn.apply(this, arguments) } var name = fn.name || 'Function wrapped with `once`' f.onceError = name + " shouldn't be called more than once" f.called = false return f } /***/ }), /***/ 28300: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable max-classes-per-file */ const { inspect, deprecate } = __webpack_require__(31669); const stdhttp = __webpack_require__(98605); const crypto = __webpack_require__(33373); const { strict: assert } = __webpack_require__(42357); const querystring = __webpack_require__(71191); const url = __webpack_require__(78835); const { ParseError } = __webpack_require__(44462); const jose = __webpack_require__(16425); const base64url = __webpack_require__(27291); const tokenHash = __webpack_require__(1270); const defaults = __webpack_require__(26457); const { assertSigningAlgValuesSupport, assertIssuerConfiguration } = __webpack_require__(63217); const pick = __webpack_require__(78857); const isPlainObject = __webpack_require__(39862); const processResponse = __webpack_require__(28576); const TokenSet = __webpack_require__(39029); const { OPError, RPError } = __webpack_require__(45061); const now = __webpack_require__(8542); const { random } = __webpack_require__(75421); const request = __webpack_require__(92946); const { CALLBACK_PROPERTIES, CLIENT_DEFAULTS, JWT_CONTENT, CLOCK_TOLERANCE, } = __webpack_require__(27556); const issuerRegistry = __webpack_require__(30730); const instance = __webpack_require__(36546); const { authenticatedPost, resolveResponseType, resolveRedirectUri } = __webpack_require__(7619); const DeviceFlowHandle = __webpack_require__(23979); const { deep: defaultsDeep } = defaults; 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 } = {}, ) { 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 }); 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 } = {}, ) { 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 }); } 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 validateJARM * @api private */ async validateJARM(response) { const expectedAlg = this.authorization_signed_response_alg; const { payload } = await this.validateJWT(response, expectedAlg, ['iss', 'exp', 'aud']); return pickCb(payload); } /** * @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, }); } 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, }); } const fapi = this.constructor.name === 'FAPIClient'; if (fapi) { if (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 (!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 (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 }); } catch (err) { throw new RPError({ message: 'failed to validate JWT signature', jwt, }); } } /** * @name refresh * @api public */ async refresh(refreshToken, { exchangeBody, clientAssertionPayload } = {}) { 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 }); 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', } = {}, ) { 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, encoding: null, method, url: resourceUrl, }, { mTLS }); } /** * @name userinfo * @api public */ async userinfo(accessToken, { verb = 'GET', via = 'header', tokenType, params, } = {}) { // TODO: in v4.x remove verb in favour of method assertIssuerConfiguration(this.issuer, 'userinfo_endpoint'); const options = { tokenType, method: String(verb).toUpperCase(), }; if (options.method !== 'GET' && options.method !== 'POST') { throw new TypeError('#userinfo() verb 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) { const parseError = new ParseError( error, response.statusCode, response.request.gotOptions, response.body, ); Object.defineProperty(parseError, 'response', { value: response }); throw parseError; } } 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 } = {}) { assertIssuerConfiguration(this.issuer, 'token_endpoint'); const response = await authenticatedPost.call( this, 'token', { form: true, body, json: true, }, { clientAssertionPayload }, ); const responseBody = processResponse(response); return new TokenSet(responseBody); } /** * @name deviceAuthorization * @api public */ async deviceAuthorization(params = {}, { exchangeBody, clientAssertionPayload } = {}) { 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', { form: true, body, json: true, }, { clientAssertionPayload, endpointAuthMethod: 'token' }, ); const responseBody = processResponse(response); return new DeviceFlowHandle({ client: this, exchangeBody, clientAssertionPayload, response: responseBody, maxAge: params.max_age, }); } /** * @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 body = { ...revokeBody, token }; if (hint) { body.token_type_hint = hint; } const response = await authenticatedPost.call( this, 'revocation', { body, form: true, }, { 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 body = { ...introspectBody, token }; if (hint) { body.token_type_hint = hint; } const response = await authenticatedPost.call( this, 'introspection', { body, form: true, json: true }, { 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, json: true, body: 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, json: true, 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 header = { alg: signingAlgorithm, typ: 'JWT' }; const payload = JSON.stringify(defaults({}, requestObject, { iss: this.client_id, aud: this.issuer.issuer, client_id: this.client_id, jti: random(), iat: now(), exp: now() + 300, })); 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: '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, })}`; } }; // TODO: remove in 4.x BaseClient.prototype.resource = deprecate( /* istanbul ignore next */ async function resource(resourceUrl, accessToken, options) { let token = accessToken; const opts = { verb: 'GET', via: 'header', ...options, }; if (token instanceof TokenSet) { if (!token.access_token) { throw new TypeError('access_token not present in TokenSet'); } opts.tokenType = opts.tokenType || token.token_type; token = token.access_token; } const verb = String(opts.verb).toUpperCase(); let requestOpts; switch (opts.via) { case 'query': if (verb !== 'GET') { throw new TypeError('resource servers should only parse query strings for GET requests'); } requestOpts = { query: { access_token: token } }; break; case 'body': if (verb !== 'POST') { throw new TypeError('can only send body on POST'); } requestOpts = { form: true, body: { access_token: token } }; break; default: requestOpts = { headers: { Authorization: authorizationHeaderValue(token, opts.tokenType), }, }; } if (opts.params) { if (verb === 'POST') { defaultsDeep(requestOpts, { body: opts.params }); } else { defaultsDeep(requestOpts, { query: opts.params }); } } if (opts.headers) { defaultsDeep(requestOpts, { headers: opts.headers }); } const mTLS = !!this.tls_client_certificate_bound_access_tokens; return request.call(this, { ...requestOpts, encoding: null, method: verb, url: resourceUrl, }, { mTLS }); }, 'client.resource() is deprecated, use client.requestResource() instead, see docs for API details', ); module.exports.BaseClient = BaseClient; /***/ }), /***/ 23979: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable camelcase */ const { inspect } = __webpack_require__(31669); const { RPError, OPError } = __webpack_require__(45061); const instance = __webpack_require__(36546); const now = __webpack_require__(8542); const { authenticatedPost } = __webpack_require__(7619); const processResponse = __webpack_require__(28576); const TokenSet = __webpack_require__(39029); class DeviceFlowHandle { constructor({ client, exchangeBody, clientAssertionPayload, response, maxAge, }) { ['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).maxAge = maxAge; instance(this).exchangeBody = exchangeBody; instance(this).clientAssertionPayload = clientAssertionPayload; instance(this).response = response; instance(this).interval = response.interval * 1000 || 5000; } async poll() { 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: true, body: { ...instance(this).exchangeBody, grant_type: 'urn:ietf:params:oauth:grant-type:device_code', device_code: this.device_code, }, json: true, }, { clientAssertionPayload: instance(this).clientAssertionPayload }, ); 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(); 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; /***/ }), /***/ 45061: /***/ ((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, }; /***/ }), /***/ 63217: /***/ ((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, }; /***/ }), /***/ 7619: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const jose = __webpack_require__(16425); const { assertIssuerConfiguration } = __webpack_require__(63217); const { random } = __webpack_require__(75421); const now = __webpack_require__(8542); const request = __webpack_require__(92946); const instance = __webpack_require__(36546); const merge = __webpack_require__(2494); 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 { body: { 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 { body: { client_id: this.client_id, client_secret: this.client_secret } }; case 'private_key_jwt': case 'client_secret_jwt': { const timestamp = now(); const assertion = await clientAssertion.call(this, endpoint, { iat: timestamp, exp: timestamp + 60, jti: random(), iss: this.client_id, sub: this.client_id, aud: this.issuer[`${endpoint}_endpoint`], // TODO: in v4.x pass the issuer instead (for now clientAssertionPayload can be used for that) ...clientAssertionPayload, }); return { body: { 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, } = {}) { const auth = await authFor.call(this, endpointAuthMethod, { clientAssertionPayload }); const requestOpts = merge(opts, auth, { form: true }); 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 ('body' in requestOpts) { for (const [key, value] of Object.entries(requestOpts.body)) { // eslint-disable-line no-restricted-syntax, max-len if (typeof value === 'undefined') { delete requestOpts.body[key]; } } } return request.call(this, { ...requestOpts, method: 'POST', url: targetUrl, }, { mTLS }); } module.exports = { resolveResponseType, resolveRedirectUri, authFor, authenticatedPost, }; /***/ }), /***/ 27556: /***/ ((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, }; /***/ }), /***/ 21004: /***/ ((module) => { module.exports = (obj) => JSON.parse(JSON.stringify(obj)); /***/ }), /***/ 26457: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable no-restricted-syntax, no-continue */ const isPlainObject = __webpack_require__(39862); 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); /***/ }), /***/ 75421: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { createHash, randomBytes } = __webpack_require__(33373); const { encode: base64url } = __webpack_require__(27291); const random = (bytes = 32) => base64url(randomBytes(bytes)); module.exports = { random, state: random, nonce: random, codeVerifier: random, codeChallenge: (codeVerifier) => base64url(createHash('sha256').update(codeVerifier).digest()), }; /***/ }), /***/ 61797: /***/ ((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'); } }; /***/ }), /***/ 39862: /***/ ((module) => { module.exports = (a) => !!a && a.constructor === Object; /***/ }), /***/ 2494: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable no-restricted-syntax, no-param-reassign, no-continue */ const isPlainObject = __webpack_require__(39862); 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; /***/ }), /***/ 78857: /***/ ((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; }; /***/ }), /***/ 28576: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { STATUS_CODES } = __webpack_require__(98605); const { format } = __webpack_require__(31669); const { OPError } = __webpack_require__(45061); 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; /***/ }), /***/ 92946: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Got = __webpack_require__(44462); const pkg = __webpack_require__(76710); const { deep: defaultsDeep } = __webpack_require__(26457); const isAbsoluteUrl = __webpack_require__(61797); const { HTTP_OPTIONS } = __webpack_require__(27556); 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: 2500, throwHttpErrors: false, }); module.exports = function request(options, { mTLS = false } = {}) { const { url } = options; isAbsoluteUrl(url); const optsFn = this[HTTP_OPTIONS]; let opts; if (optsFn) { opts = optsFn.call(this, defaultsDeep({}, options, DEFAULT_HTTP_OPTIONS)); } else { opts = options; } if (mTLS && (!opts.key || !opts.cert)) { throw new TypeError('mutual-TLS certificate and key not set'); } return got(opts); }; module.exports.setDefaults = setDefaults; /***/ }), /***/ 8542: /***/ ((module) => { module.exports = () => Math.floor(Date.now() / 1000); /***/ }), /***/ 36546: /***/ ((module) => { const privateProps = new WeakMap(); module.exports = (ctx) => { if (!privateProps.has(ctx)) { privateProps.set(ctx, new Map([['metadata', new Map()]])); } return privateProps.get(ctx); }; /***/ }), /***/ 27416: /***/ ((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; /***/ }), /***/ 53140: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Issuer = __webpack_require__(27213); const { OPError, RPError } = __webpack_require__(45061); const Registry = __webpack_require__(30730); const Strategy = __webpack_require__(22134); const TokenSet = __webpack_require__(39029); const { CLOCK_TOLERANCE, HTTP_OPTIONS } = __webpack_require__(27556); const generators = __webpack_require__(75421); const { setDefaults } = __webpack_require__(92946); module.exports = { Issuer, Registry, Strategy, TokenSet, errors: { OPError, RPError, }, custom: { setHttpOptionsDefaults: setDefaults, http_options: HTTP_OPTIONS, clock_tolerance: CLOCK_TOLERANCE, }, generators, }; /***/ }), /***/ 27213: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable max-classes-per-file */ const { inspect, deprecate } = __webpack_require__(31669); const url = __webpack_require__(78835); const jose = __webpack_require__(16425); const pAny = __webpack_require__(56693); const LRU = __webpack_require__(7129); const objectHash = __webpack_require__(24856); const { RPError } = __webpack_require__(45061); const getClient = __webpack_require__(28300); const registry = __webpack_require__(30730); const processResponse = __webpack_require__(28576); const webfingerNormalize = __webpack_require__(27416); const instance = __webpack_require__(36546); const request = __webpack_require__(92946); const { assertIssuerConfiguration } = __webpack_require__(63217); const { ISSUER_DEFAULTS, OIDC_DISCOVERY, OAUTH2_DISCOVERY, WEBFINGER, REL, AAD_MULTITENANT_DISCOVERY, } = __webpack_require__(27556); 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); Object.defineProperty(this, 'Client', { value: getClient(this, aadIssValidation), }); Object.defineProperty(this, 'FAPIClient', { value: class FAPIClient extends this.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', json: true, 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, json: true, query: { 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', json: true, url: uri, }); const body = processResponse(response); return new Issuer({ ...ISSUER_DEFAULTS, ...body, [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find( (discoveryURL) => uri.startsWith(discoveryURL), ), }); } const uris = []; if (parsed.pathname === '/') { uris.push(`${OAUTH2_DISCOVERY}`); } else { uris.push(`${OAUTH2_DISCOVERY}${parsed.pathname}`); } if (parsed.pathname.endsWith('/')) { uris.push(`${parsed.pathname}${OIDC_DISCOVERY.substring(1)}`); } else { uris.push(`${parsed.pathname}${OIDC_DISCOVERY}`); } return pAny(uris.map(async (pathname) => { const wellKnownUri = url.format({ ...parsed, pathname }); const response = await request.call(this, { method: 'GET', json: true, url: wellKnownUri, }); const body = processResponse(response); return new Issuer({ ...ISSUER_DEFAULTS, ...body, [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find( (discoveryURL) => wellKnownUri.startsWith(discoveryURL), ), }); })); } /* istanbul ignore next */ [inspect.custom]() { return `${this.constructor.name} ${inspect(this.metadata, { depth: Infinity, colors: process.stdout.isTTY, compact: false, sorted: true, })}`; } } /** * @name key * @api private */ Issuer.prototype.key = deprecate(async function key({ 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) { if (keys.length !== 1) { 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 keys[0]; }, 'issuer.key is not only a private API, it is also deprecated'); module.exports = Issuer; /***/ }), /***/ 30730: /***/ ((module) => { const REGISTRY = new Map(); module.exports = REGISTRY; /***/ }), /***/ 22134: /***/ ((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__(21004); const { RPError, OPError } = __webpack_require__(45061); const { BaseClient } = __webpack_require__(28300); const { random, codeChallenge } = __webpack_require__(75421); const pick = __webpack_require__(78857); const { resolveResponseType, resolveRedirectUri } = __webpack_require__(7619); 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 = false, } = {}, 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); if (this._usePKCE === true) { const supportedMethods = this._issuer.code_challenge_methods_supported; if (!Array.isArray(supportedMethods)) { throw new TypeError('code_challenge_methods_supported is not properly set on issuer'); } if (supportedMethods.includes('S256')) { this._usePKCE = 'S256'; } else if (supportedMethods.includes('plain')) { this._usePKCE = 'plain'; } else { throw new TypeError('neither supported code_challenge_method is supported by the issuer'); } } 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; 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'; } 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) { 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); 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; /***/ }), /***/ 39029: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const base64url = __webpack_require__(27291); const now = __webpack_require__(8542); 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; /***/ }), /***/ 56693: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const pSome = __webpack_require__(82822); const PCancelable = __webpack_require__(19072); module.exports = (iterable, options) => { const anyCancelable = pSome(iterable, {...options, count: 1}); return PCancelable.fn(async onCancel => { onCancel(() => { anyCancelable.cancel(); }); const [value] = await anyCancelable; return value; })(); }; module.exports.AggregateError = pSome.AggregateError; /***/ }), /***/ 19072: /***/ ((module) => { "use strict"; class CancelError extends Error { constructor(reason) { super(reason || 'Promise was canceled'); this.name = 'CancelError'; } get isCanceled() { return true; } } class PCancelable { static fn(userFn) { return (...arguments_) => { return new PCancelable((resolve, reject, onCancel) => { arguments_.push(onCancel); // eslint-disable-next-line promise/prefer-await-to-then userFn(...arguments_).then(resolve, reject); }); }; } constructor(executor) { this._cancelHandlers = []; this._isPending = true; this._isCanceled = false; this._rejectOnCancel = true; this._promise = new Promise((resolve, reject) => { this._reject = reject; const onResolve = value => { this._isPending = false; resolve(value); }; const onReject = error => { this._isPending = false; reject(error); }; const onCancel = handler => { if (!this._isPending) { throw new Error('The `onCancel` handler was attached after the promise settled.'); } this._cancelHandlers.push(handler); }; Object.defineProperties(onCancel, { shouldReject: { get: () => this._rejectOnCancel, set: boolean => { this._rejectOnCancel = boolean; } } }); return executor(onResolve, onReject, onCancel); }); } then(onFulfilled, onRejected) { // eslint-disable-next-line promise/prefer-await-to-then return this._promise.then(onFulfilled, onRejected); } catch(onRejected) { return this._promise.catch(onRejected); } finally(onFinally) { return this._promise.finally(onFinally); } cancel(reason) { if (!this._isPending || this._isCanceled) { return; } if (this._cancelHandlers.length > 0) { try { for (const handler of this._cancelHandlers) { handler(); } } catch (error) { this._reject(error); } } this._isCanceled = true; if (this._rejectOnCancel) { this._reject(new CancelError(reason)); } } get isCanceled() { return this._isCanceled; } } Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); module.exports = PCancelable; module.exports.CancelError = CancelError; /***/ }), /***/ 82822: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const AggregateError = __webpack_require__(61231); const PCancelable = __webpack_require__(19072); class FilterError extends Error { } const pSome = (iterable, options) => new PCancelable((resolve, reject, onCancel) => { const { count, filter = () => true } = options; if (!Number.isFinite(count)) { reject(new TypeError(`Expected a finite number, got ${typeof options.count}`)); return; } const values = []; const errors = []; let elementCount = 0; let isSettled = false; const completed = new Set(); const maybeSettle = () => { if (values.length === count) { resolve(values); isSettled = true; } if (elementCount - errors.length < count) { reject(new AggregateError(errors)); isSettled = true; } return isSettled; }; const cancelPending = () => { for (const promise of iterable) { if (!completed.has(promise) && typeof promise.cancel === 'function') { promise.cancel(); } } }; onCancel(cancelPending); for (const element of iterable) { elementCount++; (async () => { try { const value = await element; if (isSettled) { return; } if (!filter(value)) { throw new FilterError('Value does not satisfy filter'); } values.push(value); } catch (error) { errors.push(error); } finally { completed.add(element); if (!isSettled && maybeSettle()) { cancelPending(); } } })(); } if (count > elementCount) { reject(new RangeError(`Expected input to contain at least ${options.count} items, but contains ${elementCount} items`)); cancelPending(); } }); module.exports = pSome; module.exports.AggregateError = AggregateError; module.exports.FilterError = FilterError; /***/ }), /***/ 38714: /***/ ((module) => { "use strict"; function posix(path) { return path.charAt(0) === '/'; } function win32(path) { // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; var result = splitDeviceRe.exec(path); var device = result[1] || ''; var isUnc = Boolean(device && device.charAt(1) !== ':'); // UNC paths are always absolute return Boolean(result[2] || isUnc); } module.exports = process.platform === 'win32' ? win32 : posix; module.exports.posix = posix; module.exports.win32 = win32; /***/ }), /***/ 85644: /***/ (function(module) { // Generated by CoffeeScript 1.12.2 (function() { var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; if ((typeof performance !== "undefined" && performance !== null) && performance.now) { module.exports = function() { return performance.now(); }; } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { module.exports = function() { return (getNanoSeconds() - nodeLoadTime) / 1e6; }; hrtime = process.hrtime; getNanoSeconds = function() { var hr; hr = hrtime(); return hr[0] * 1e9 + hr[1]; }; moduleLoadTime = getNanoSeconds(); upTime = process.uptime() * 1e9; nodeLoadTime = moduleLoadTime - upTime; } else if (Date.now) { module.exports = function() { return Date.now() - loadTime; }; loadTime = Date.now(); } else { module.exports = function() { return new Date().getTime() - loadTime; }; loadTime = new Date().getTime(); } }).call(this); //# sourceMappingURL=performance-now.js.map /***/ }), /***/ 56143: /***/ ((module) => { "use strict"; module.exports = (url, opts) => { if (typeof url !== 'string') { throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof url}\``); } url = url.trim(); opts = Object.assign({https: false}, opts); if (/^\.*\/|^(?!localhost)\w+:/.test(url)) { return url; } return url.replace(/^(?!(?:\w+:)?\/\/)/, opts.https ? 'https://' : 'http://'); }; /***/ }), /***/ 29975: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */ var Punycode = __webpack_require__(94213); var internals = {}; // // Read rules from file. // internals.rules = __webpack_require__(2156).map(function (rule) { return { rule: rule, suffix: rule.replace(/^(\*\.|\!)/, ''), punySuffix: -1, wildcard: rule.charAt(0) === '*', exception: rule.charAt(0) === '!' }; }); // // Check is given string ends with `suffix`. // internals.endsWith = function (str, suffix) { return str.indexOf(suffix, str.length - suffix.length) !== -1; }; // // Find rule for a given domain. // internals.findRule = function (domain) { var punyDomain = Punycode.toASCII(domain); return internals.rules.reduce(function (memo, rule) { if (rule.punySuffix === -1){ rule.punySuffix = Punycode.toASCII(rule.suffix); } if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) { return memo; } // This has been commented out as it never seems to run. This is because // sub tlds always appear after their parents and we never find a shorter // match. //if (memo) { // var memoSuffix = Punycode.toASCII(memo.suffix); // if (memoSuffix.length >= punySuffix.length) { // return memo; // } //} return rule; }, null); }; // // Error codes and messages. // exports.errorCodes = { DOMAIN_TOO_SHORT: 'Domain name too short.', DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' }; // // Validate domain name and throw if not valid. // // From wikipedia: // // Hostnames are composed of series of labels concatenated with dots, as are all // domain names. Each label must be between 1 and 63 characters long, and the // entire hostname (including the delimiting dots) has a maximum of 255 chars. // // Allowed chars: // // * `a-z` // * `0-9` // * `-` but not as a starting or ending character // * `.` as a separator for the textual portions of a domain name // // * http://en.wikipedia.org/wiki/Domain_name // * http://en.wikipedia.org/wiki/Hostname // internals.validate = function (input) { // Before we can validate we need to take care of IDNs with unicode chars. var ascii = Punycode.toASCII(input); if (ascii.length < 1) { return 'DOMAIN_TOO_SHORT'; } if (ascii.length > 255) { return 'DOMAIN_TOO_LONG'; } // Check each part's length and allowed chars. var labels = ascii.split('.'); var label; for (var i = 0; i < labels.length; ++i) { label = labels[i]; if (!label.length) { return 'LABEL_TOO_SHORT'; } if (label.length > 63) { return 'LABEL_TOO_LONG'; } if (label.charAt(0) === '-') { return 'LABEL_STARTS_WITH_DASH'; } if (label.charAt(label.length - 1) === '-') { return 'LABEL_ENDS_WITH_DASH'; } if (!/^[a-z0-9\-]+$/.test(label)) { return 'LABEL_INVALID_CHARS'; } } }; // // Public API // // // Parse domain. // exports.parse = function (input) { if (typeof input !== 'string') { throw new TypeError('Domain name must be a string.'); } // Force domain to lowercase. var domain = input.slice(0).toLowerCase(); // Handle FQDN. // TODO: Simply remove trailing dot? if (domain.charAt(domain.length - 1) === '.') { domain = domain.slice(0, domain.length - 1); } // Validate and sanitise input. var error = internals.validate(domain); if (error) { return { input: input, error: { message: exports.errorCodes[error], code: error } }; } var parsed = { input: input, tld: null, sld: null, domain: null, subdomain: null, listed: false }; var domainParts = domain.split('.'); // Non-Internet TLD if (domainParts[domainParts.length - 1] === 'local') { return parsed; } var handlePunycode = function () { if (!/xn--/.test(domain)) { return parsed; } if (parsed.domain) { parsed.domain = Punycode.toASCII(parsed.domain); } if (parsed.subdomain) { parsed.subdomain = Punycode.toASCII(parsed.subdomain); } return parsed; }; var rule = internals.findRule(domain); // Unlisted tld. if (!rule) { if (domainParts.length < 2) { return parsed; } parsed.tld = domainParts.pop(); parsed.sld = domainParts.pop(); parsed.domain = [parsed.sld, parsed.tld].join('.'); if (domainParts.length) { parsed.subdomain = domainParts.pop(); } return handlePunycode(); } // At this point we know the public suffix is listed. parsed.listed = true; var tldParts = rule.suffix.split('.'); var privateParts = domainParts.slice(0, domainParts.length - tldParts.length); if (rule.exception) { privateParts.push(tldParts.shift()); } parsed.tld = tldParts.join('.'); if (!privateParts.length) { return handlePunycode(); } if (rule.wildcard) { tldParts.unshift(privateParts.pop()); parsed.tld = tldParts.join('.'); } if (!privateParts.length) { return handlePunycode(); } parsed.sld = privateParts.pop(); parsed.domain = [parsed.sld, parsed.tld].join('.'); if (privateParts.length) { parsed.subdomain = privateParts.join('.'); } return handlePunycode(); }; // // Get domain. // exports.get = function (domain) { if (!domain) { return null; } return exports.parse(domain).domain || null; }; // // Check whether domain belongs to a known public suffix. // exports.isValid = function (domain) { var parsed = exports.parse(domain); return Boolean(parsed.domain && parsed.listed); }; /***/ }), /***/ 18341: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var once = __webpack_require__(1223) var eos = __webpack_require__(81205) var fs = __webpack_require__(35747) // we only need fs to get the ReadStream and WriteStream prototypes var noop = function () {} var ancient = /^v?\.0/.test(process.version) var isFn = function (fn) { return typeof fn === 'function' } var isFS = function (stream) { if (!ancient) return false // newer node version do not need to care about fs is a special way if (!fs) return false // browser return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) } var isRequest = function (stream) { return stream.setHeader && isFn(stream.abort) } var destroyer = function (stream, reading, writing, callback) { callback = once(callback) var closed = false stream.on('close', function () { closed = true }) eos(stream, {readable: reading, writable: writing}, function (err) { if (err) return callback(err) closed = true callback() }) var destroyed = false return function (err) { if (closed) return if (destroyed) return destroyed = true if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want if (isFn(stream.destroy)) return stream.destroy() callback(err || new Error('stream was destroyed')) } } var call = function (fn) { fn() } var pipe = function (from, to) { return from.pipe(to) } var pump = function () { var streams = Array.prototype.slice.call(arguments) var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop if (Array.isArray(streams[0])) streams = streams[0] if (streams.length < 2) throw new Error('pump requires two streams per minimum') var error var destroys = streams.map(function (stream, i) { var reading = i < streams.length - 1 var writing = i > 0 return destroyer(stream, reading, writing, function (err) { if (!error) error = err if (err) destroys.forEach(call) if (reading) return destroys.forEach(call) callback(error) }) }) return streams.reduce(pipe) } module.exports = pump /***/ }), /***/ 74907: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; var util = __webpack_require__(72360); var Format = { RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; module.exports = util.assign( { 'default': Format.RFC3986, formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return String(value); } } }, Format ); /***/ }), /***/ 22760: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var stringify = __webpack_require__(79954); var parse = __webpack_require__(33912); var formats = __webpack_require__(74907); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /***/ 33912: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var utils = __webpack_require__(72360); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var defaults = { allowDots: false, allowPrototypes: false, arrayLimit: 20, charset: 'utf-8', charsetSentinel: false, comma: false, decoder: utils.decode, delimiter: '&', depth: 5, ignoreQueryPrefix: false, interpretNumericEntities: false, parameterLimit: 1000, parseArrays: true, plainObjects: false, strictNullHandling: false }; var interpretNumericEntities = function (str) { return str.replace(/&#(\d+);/g, function ($0, numberStr) { return String.fromCharCode(parseInt(numberStr, 10)); }); }; var parseArrayValue = function (val, options) { if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { return val.split(','); } return val; }; // This is what browsers will submit when the ✓ character occurs in an // application/x-www-form-urlencoded body and the encoding of the page containing // the form is iso-8859-1, or when the submitted form has an accept-charset // attribute of iso-8859-1. Presumably also with other charsets that do not contain // the ✓ character, such as us-ascii. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); var skipIndex = -1; // Keep track of where the utf8 sentinel was found var i; var charset = options.charset; if (options.charsetSentinel) { for (i = 0; i < parts.length; ++i) { if (parts[i].indexOf('utf8=') === 0) { if (parts[i] === charsetSentinel) { charset = 'utf-8'; } else if (parts[i] === isoSentinel) { charset = 'iso-8859-1'; } skipIndex = i; i = parts.length; // The eslint settings do not allow break; } } } for (i = 0; i < parts.length; ++i) { if (i === skipIndex) { continue; } var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder, charset, 'key'); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); val = utils.maybeMap( parseArrayValue(part.slice(pos + 1), options), function (encodedVal) { return options.decoder(encodedVal, defaults.decoder, charset, 'value'); } ); } if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { val = interpretNumericEntities(val); } if (part.indexOf('[]=') > -1) { val = isArray(val) ? [val] : val; } if (has.call(obj, key)) { obj[key] = utils.combine(obj[key], val); } else { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options, valuesParsed) { var leaf = valuesParsed ? val : parseArrayValue(val, options); for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]' && options.parseArrays) { obj = [].concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if (!options.parseArrays && cleanRoot === '') { obj = { 0: leaf }; } else if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else { obj[cleanRoot] = leaf; } } leaf = obj; // eslint-disable-line no-param-reassign } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = options.depth > 0 && brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options, valuesParsed); }; var normalizeParseOptions = function normalizeParseOptions(opts) { if (!opts) { return defaults; } if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; return { allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, charset: charset, charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, parseArrays: opts.parseArrays !== false, plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function (str, opts) { var options = normalizeParseOptions(opts); if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; /***/ }), /***/ 79954: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var utils = __webpack_require__(72360); var formats = __webpack_require__(74907); var has = Object.prototype.hasOwnProperty; var arrayPrefixGenerators = { brackets: function brackets(prefix) { return prefix + '[]'; }, comma: 'comma', indices: function indices(prefix, key) { return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { return prefix; } }; var isArray = Array.isArray; var push = Array.prototype.push; var pushToArray = function (arr, valueOrArray) { push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); }; var toISO = Date.prototype.toISOString; var defaultFormat = formats['default']; var defaults = { addQueryPrefix: false, allowDots: false, charset: 'utf-8', charsetSentinel: false, delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var isNonNullishPrimitive = function isNonNullishPrimitive(v) { return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' || typeof v === 'symbol' || typeof v === 'bigint'; }; var stringify = function stringify( object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly, charset ) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (generateArrayPrefix === 'comma' && isArray(obj)) { obj = utils.maybeMap(obj, function (value) { if (value instanceof Date) { return serializeDate(value); } return value; }).join(','); } if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix; } obj = ''; } if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key'); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; var value = obj[key]; if (skipNulls && value === null) { continue; } var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix : prefix + (allowDots ? '.' + key : '[' + key + ']'); pushToArray(values, stringify( value, keyPrefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly, charset )); } return values; }; var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { if (!opts) { return defaults; } if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var charset = opts.charset || defaults.charset; if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var format = formats['default']; if (typeof opts.format !== 'undefined') { if (!has.call(formats.formatters, opts.format)) { throw new TypeError('Unknown format option provided.'); } format = opts.format; } var formatter = formats.formatters[format]; var filter = defaults.filter; if (typeof opts.filter === 'function' || isArray(opts.filter)) { filter = opts.filter; } return { addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, charset: charset, charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, filter: filter, formatter: formatter, serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, sort: typeof opts.sort === 'function' ? opts.sort : null, strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function (object, opts) { var obj = object; var options = normalizeStringifyOptions(opts); var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (opts && opts.arrayFormat in arrayPrefixGenerators) { arrayFormat = opts.arrayFormat; } else if (opts && 'indices' in opts) { arrayFormat = opts.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (options.sort) { objKeys.sort(options.sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (options.skipNulls && obj[key] === null) { continue; } pushToArray(keys, stringify( obj[key], key, generateArrayPrefix, options.strictNullHandling, options.skipNulls, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.formatter, options.encodeValuesOnly, options.charset )); } var joined = keys.join(options.delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; if (options.charsetSentinel) { if (options.charset === 'iso-8859-1') { // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark prefix += 'utf8=%26%2310003%3B&'; } else { // encodeURIComponent('✓') prefix += 'utf8=%E2%9C%93&'; } } return joined.length > 0 ? prefix + joined : ''; }; /***/ }), /***/ 72360: /***/ ((module) => { "use strict"; var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { while (queue.length > 1) { var item = queue.pop(); var obj = item.obj[item.prop]; if (isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; var merge = function merge(target, source, options) { /* eslint no-param-reassign: 0 */ if (!source) { return target; } if (typeof source !== 'object') { if (isArray(target)) { target.push(source); } else if (target && typeof target === 'object') { if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (!target || typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (isArray(target) && !isArray(source)) { mergeTarget = arrayToObject(target, options); } if (isArray(target) && isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { var targetItem = target[i]; if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { target[i] = merge(targetItem, item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function (str, decoder, charset) { var strWithoutPlus = str.replace(/\+/g, ' '); if (charset === 'iso-8859-1') { // unescape never throws, no try...catch needed: return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); } // utf-8 try { return decodeURIComponent(strWithoutPlus); } catch (e) { return strWithoutPlus; } }; var encode = function encode(str, defaultEncoder, charset) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = str; if (typeof str === 'symbol') { string = Symbol.prototype.toString.call(str); } else if (typeof str !== 'string') { string = String(str); } if (charset === 'iso-8859-1') { return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; }); } var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; var compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } compactQueue(queue); return value; }; var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; var isBuffer = function isBuffer(obj) { if (!obj || typeof obj !== 'object') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; var combine = function combine(a, b) { return [].concat(a, b); }; var maybeMap = function maybeMap(val, fn) { if (isArray(val)) { var mapped = []; for (var i = 0; i < val.length; i += 1) { mapped.push(fn(val[i])); } return mapped; } return fn(val); }; module.exports = { arrayToObject: arrayToObject, assign: assign, combine: combine, compact: compact, decode: decode, encode: encode, isBuffer: isBuffer, isRegExp: isRegExp, maybeMap: maybeMap, merge: merge }; /***/ }), /***/ 48699: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // Copyright 2010-2012 Mikeal Rogers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. var extend = __webpack_require__(38171) var cookies = __webpack_require__(50976) var helpers = __webpack_require__(74845) var paramsHaveRequestBody = helpers.paramsHaveRequestBody // organize params for patch, post, put, head, del function initParams (uri, options, callback) { if (typeof options === 'function') { callback = options } var params = {} if (options !== null && typeof options === 'object') { extend(params, options, {uri: uri}) } else if (typeof uri === 'string') { extend(params, {uri: uri}) } else { extend(params, uri) } params.callback = callback || params.callback return params } function request (uri, options, callback) { if (typeof uri === 'undefined') { throw new Error('undefined is not a valid uri or options object.') } var params = initParams(uri, options, callback) if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { throw new Error('HTTP HEAD requests MUST NOT include a request body.') } return new request.Request(params) } function verbFunc (verb) { var method = verb.toUpperCase() return function (uri, options, callback) { var params = initParams(uri, options, callback) params.method = method return request(params, params.callback) } } // define like this to please codeintel/intellisense IDEs request.get = verbFunc('get') request.head = verbFunc('head') request.options = verbFunc('options') request.post = verbFunc('post') request.put = verbFunc('put') request.patch = verbFunc('patch') request.del = verbFunc('delete') request['delete'] = verbFunc('delete') request.jar = function (store) { return cookies.jar(store) } request.cookie = function (str) { return cookies.parse(str) } function wrapRequestMethod (method, options, requester, verb) { return function (uri, opts, callback) { var params = initParams(uri, opts, callback) var target = {} extend(true, target, options, params) target.pool = params.pool || options.pool if (verb) { target.method = verb.toUpperCase() } if (typeof requester === 'function') { method = requester } return method(target, target.callback) } } request.defaults = function (options, requester) { var self = this options = options || {} if (typeof options === 'function') { requester = options options = {} } var defaults = wrapRequestMethod(self, options, requester) var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] verbs.forEach(function (verb) { defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) }) defaults.cookie = wrapRequestMethod(self.cookie, options, requester) defaults.jar = self.jar defaults.defaults = self.defaults return defaults } request.forever = function (agentOptions, optionsArg) { var options = {} if (optionsArg) { extend(options, optionsArg) } if (agentOptions) { options.agentOptions = agentOptions } options.forever = true return request.defaults(options) } // Exports module.exports = request request.Request = __webpack_require__(70304) request.initParams = initParams // Backwards compatibility for request.debug Object.defineProperty(request, 'debug', { enumerable: true, get: function () { return request.Request.debug }, set: function (debug) { request.Request.debug = debug } }) /***/ }), /***/ 76996: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var caseless = __webpack_require__(35684) var uuid = __webpack_require__(80824) var helpers = __webpack_require__(74845) var md5 = helpers.md5 var toBase64 = helpers.toBase64 function Auth (request) { // define all public properties here this.request = request this.hasAuth = false this.sentAuth = false this.bearerToken = null this.user = null this.pass = null } Auth.prototype.basic = function (user, pass, sendImmediately) { var self = this if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { self.request.emit('error', new Error('auth() received invalid user or password')) } self.user = user self.pass = pass self.hasAuth = true var header = user + ':' + (pass || '') if (sendImmediately || typeof sendImmediately === 'undefined') { var authHeader = 'Basic ' + toBase64(header) self.sentAuth = true return authHeader } } Auth.prototype.bearer = function (bearer, sendImmediately) { var self = this self.bearerToken = bearer self.hasAuth = true if (sendImmediately || typeof sendImmediately === 'undefined') { if (typeof bearer === 'function') { bearer = bearer() } var authHeader = 'Bearer ' + (bearer || '') self.sentAuth = true return authHeader } } Auth.prototype.digest = function (method, path, authHeader) { // TODO: More complete implementation of RFC 2617. // - handle challenge.domain // - support qop="auth-int" only // - handle Authentication-Info (not necessarily?) // - check challenge.stale (not necessarily?) // - increase nc (not necessarily?) // For reference: // http://tools.ietf.org/html/rfc2617#section-3 // https://github.com/bagder/curl/blob/master/lib/http_digest.c var self = this var challenge = {} var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi while (true) { var match = re.exec(authHeader) if (!match) { break } challenge[match[1]] = match[2] || match[3] } /** * RFC 2617: handle both MD5 and MD5-sess algorithms. * * If the algorithm directive's value is "MD5" or unspecified, then HA1 is * HA1=MD5(username:realm:password) * If the algorithm directive's value is "MD5-sess", then HA1 is * HA1=MD5(MD5(username:realm:password):nonce:cnonce) */ var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) { var ha1 = md5(user + ':' + realm + ':' + pass) if (algorithm && algorithm.toLowerCase() === 'md5-sess') { return md5(ha1 + ':' + nonce + ':' + cnonce) } else { return ha1 } } var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' var nc = qop && '00000001' var cnonce = qop && uuid().replace(/-/g, '') var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce) var ha2 = md5(method + ':' + path) var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) var authValues = { username: self.user, realm: challenge.realm, nonce: challenge.nonce, uri: path, qop: qop, response: digestResponse, nc: nc, cnonce: cnonce, algorithm: challenge.algorithm, opaque: challenge.opaque } authHeader = [] for (var k in authValues) { if (authValues[k]) { if (k === 'qop' || k === 'nc' || k === 'algorithm') { authHeader.push(k + '=' + authValues[k]) } else { authHeader.push(k + '="' + authValues[k] + '"') } } } authHeader = 'Digest ' + authHeader.join(', ') self.sentAuth = true return authHeader } Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { var self = this var request = self.request var authHeader if (bearer === undefined && user === undefined) { self.request.emit('error', new Error('no auth mechanism defined')) } else if (bearer !== undefined) { authHeader = self.bearer(bearer, sendImmediately) } else { authHeader = self.basic(user, pass, sendImmediately) } if (authHeader) { request.setHeader('authorization', authHeader) } } Auth.prototype.onResponse = function (response) { var self = this var request = self.request if (!self.hasAuth || self.sentAuth) { return null } var c = caseless(response.headers) var authHeader = c.get('www-authenticate') var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() request.debug('reauth', authVerb) switch (authVerb) { case 'basic': return self.basic(self.user, self.pass, true) case 'bearer': return self.bearer(self.bearerToken, true) case 'digest': return self.digest(request.method, request.path, authHeader) } } exports.g = Auth /***/ }), /***/ 50976: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var tough = __webpack_require__(47372) var Cookie = tough.Cookie var CookieJar = tough.CookieJar exports.parse = function (str) { if (str && str.uri) { str = str.uri } if (typeof str !== 'string') { throw new Error('The cookie function only accepts STRING as param') } return Cookie.parse(str, {loose: true}) } // Adapt the sometimes-Async api of tough.CookieJar to our requirements function RequestJar (store) { var self = this self._jar = new CookieJar(store, {looseMode: true}) } RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { var self = this return self._jar.setCookieSync(cookieOrStr, uri, options || {}) } RequestJar.prototype.getCookieString = function (uri) { var self = this return self._jar.getCookieStringSync(uri) } RequestJar.prototype.getCookies = function (uri) { var self = this return self._jar.getCookiesSync(uri) } exports.jar = function (store) { return new RequestJar(store) } /***/ }), /***/ 75654: /***/ ((module) => { "use strict"; function formatHostname (hostname) { // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' return hostname.replace(/^\.*/, '.').toLowerCase() } function parseNoProxyZone (zone) { zone = zone.trim().toLowerCase() var zoneParts = zone.split(':', 2) var zoneHost = formatHostname(zoneParts[0]) var zonePort = zoneParts[1] var hasPort = zone.indexOf(':') > -1 return {hostname: zoneHost, port: zonePort, hasPort: hasPort} } function uriInNoProxy (uri, noProxy) { var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') var hostname = formatHostname(uri.hostname) var noProxyList = noProxy.split(',') // iterate through the noProxyList until it finds a match. return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) { var isMatchedAt = hostname.indexOf(noProxyZone.hostname) var hostnameMatched = ( isMatchedAt > -1 && (isMatchedAt === hostname.length - noProxyZone.hostname.length) ) if (noProxyZone.hasPort) { return (port === noProxyZone.port) && hostnameMatched } return hostnameMatched }) } function getProxyFromURI (uri) { // Decide the proper request proxy to use based on the request URI object and the // environmental variables (NO_PROXY, HTTP_PROXY, etc.) // respect NO_PROXY environment variables (see: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html) var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' // if the noProxy is a wildcard then return null if (noProxy === '*') { return null } // if the noProxy is not empty and the uri is found return null if (noProxy !== '' && uriInNoProxy(uri, noProxy)) { return null } // Check for HTTP or HTTPS Proxy in environment Else default to null if (uri.protocol === 'http:') { return process.env.HTTP_PROXY || process.env.http_proxy || null } if (uri.protocol === 'https:') { return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null } // if none of that works, return null // (What uri protocol are you using then?) return null } module.exports = getProxyFromURI /***/ }), /***/ 3248: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var fs = __webpack_require__(35747) var qs = __webpack_require__(71191) var validate = __webpack_require__(75697) var extend = __webpack_require__(38171) function Har (request) { this.request = request } Har.prototype.reducer = function (obj, pair) { // new property ? if (obj[pair.name] === undefined) { obj[pair.name] = pair.value return obj } // existing? convert to array var arr = [ obj[pair.name], pair.value ] obj[pair.name] = arr return obj } Har.prototype.prep = function (data) { // construct utility properties data.queryObj = {} data.headersObj = {} data.postData.jsonObj = false data.postData.paramsObj = false // construct query objects if (data.queryString && data.queryString.length) { data.queryObj = data.queryString.reduce(this.reducer, {}) } // construct headers objects if (data.headers && data.headers.length) { // loweCase header keys data.headersObj = data.headers.reduceRight(function (headers, header) { headers[header.name] = header.value return headers }, {}) } // construct Cookie header if (data.cookies && data.cookies.length) { var cookies = data.cookies.map(function (cookie) { return cookie.name + '=' + cookie.value }) if (cookies.length) { data.headersObj.cookie = cookies.join('; ') } } // prep body function some (arr) { return arr.some(function (type) { return data.postData.mimeType.indexOf(type) === 0 }) } if (some([ 'multipart/mixed', 'multipart/related', 'multipart/form-data', 'multipart/alternative'])) { // reset values data.postData.mimeType = 'multipart/form-data' } else if (some([ 'application/x-www-form-urlencoded'])) { if (!data.postData.params) { data.postData.text = '' } else { data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) // always overwrite data.postData.text = qs.stringify(data.postData.paramsObj) } } else if (some([ 'text/json', 'text/x-json', 'application/json', 'application/x-json'])) { data.postData.mimeType = 'application/json' if (data.postData.text) { try { data.postData.jsonObj = JSON.parse(data.postData.text) } catch (e) { this.request.debug(e) // force back to text/plain data.postData.mimeType = 'text/plain' } } } return data } Har.prototype.options = function (options) { // skip if no har property defined if (!options.har) { return options } var har = {} extend(har, options.har) // only process the first entry if (har.log && har.log.entries) { har = har.log.entries[0] } // add optional properties to make validation successful har.url = har.url || options.url || options.uri || options.baseUrl || '/' har.httpVersion = har.httpVersion || 'HTTP/1.1' har.queryString = har.queryString || [] har.headers = har.headers || [] har.cookies = har.cookies || [] har.postData = har.postData || {} har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' har.bodySize = 0 har.headersSize = 0 har.postData.size = 0 if (!validate.request(har)) { return options } // clean up and get some utility properties var req = this.prep(har) // construct new options if (req.url) { options.url = req.url } if (req.method) { options.method = req.method } if (Object.keys(req.queryObj).length) { options.qs = req.queryObj } if (Object.keys(req.headersObj).length) { options.headers = req.headersObj } function test (type) { return req.postData.mimeType.indexOf(type) === 0 } if (test('application/x-www-form-urlencoded')) { options.form = req.postData.paramsObj } else if (test('application/json')) { if (req.postData.jsonObj) { options.body = req.postData.jsonObj options.json = true } } else if (test('multipart/form-data')) { options.formData = {} req.postData.params.forEach(function (param) { var attachment = {} if (!param.fileName && !param.contentType) { options.formData[param.name] = param.value return } // attempt to read from disk! if (param.fileName && !param.value) { attachment.value = fs.createReadStream(param.fileName) } else if (param.value) { attachment.value = param.value } if (param.fileName) { attachment.options = { filename: param.fileName, contentType: param.contentType ? param.contentType : null } } options.formData[param.name] = attachment }) } else { if (req.postData.text) { options.body = req.postData.text } } return options } exports.t = Har /***/ }), /***/ 34473: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var crypto = __webpack_require__(33373) function randomString (size) { var bits = (size + 1) * 6 var buffer = crypto.randomBytes(Math.ceil(bits / 8)) var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') return string.slice(0, size) } function calculatePayloadHash (payload, algorithm, contentType) { var hash = crypto.createHash(algorithm) hash.update('hawk.1.payload\n') hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n') hash.update(payload || '') hash.update('\n') return hash.digest('base64') } exports.calculateMac = function (credentials, opts) { var normalized = 'hawk.1.header\n' + opts.ts + '\n' + opts.nonce + '\n' + (opts.method || '').toUpperCase() + '\n' + opts.resource + '\n' + opts.host.toLowerCase() + '\n' + opts.port + '\n' + (opts.hash || '') + '\n' if (opts.ext) { normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n') } normalized = normalized + '\n' if (opts.app) { normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n' } var hmac = crypto.createHmac(credentials.algorithm, credentials.key).update(normalized) var digest = hmac.digest('base64') return digest } exports.header = function (uri, method, opts) { var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1000) var credentials = opts.credentials if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { return '' } if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) { return '' } var artifacts = { ts: timestamp, nonce: opts.nonce || randomString(6), method: method, resource: uri.pathname + (uri.search || ''), host: uri.hostname, port: uri.port || (uri.protocol === 'http:' ? 80 : 443), hash: opts.hash, ext: opts.ext, app: opts.app, dlg: opts.dlg } if (!artifacts.hash && (opts.payload || opts.payload === '')) { artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType) } var mac = exports.calculateMac(credentials, artifacts) var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== '' var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : '') + '", mac="' + mac + '"' if (artifacts.app) { header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"' } return header } /***/ }), /***/ 74845: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var jsonSafeStringify = __webpack_require__(57073) var crypto = __webpack_require__(33373) var Buffer = __webpack_require__(21867).Buffer var defer = typeof setImmediate === 'undefined' ? process.nextTick : setImmediate function paramsHaveRequestBody (params) { return ( params.body || params.requestBodyStream || (params.json && typeof params.json !== 'boolean') || params.multipart ) } function safeStringify (obj, replacer) { var ret try { ret = JSON.stringify(obj, replacer) } catch (e) { ret = jsonSafeStringify(obj, replacer) } return ret } function md5 (str) { return crypto.createHash('md5').update(str).digest('hex') } function isReadStream (rs) { return rs.readable && rs.path && rs.mode } function toBase64 (str) { return Buffer.from(str || '', 'utf8').toString('base64') } function copy (obj) { var o = {} Object.keys(obj).forEach(function (i) { o[i] = obj[i] }) return o } function version () { var numbers = process.version.replace('v', '').split('.') return { major: parseInt(numbers[0], 10), minor: parseInt(numbers[1], 10), patch: parseInt(numbers[2], 10) } } exports.paramsHaveRequestBody = paramsHaveRequestBody exports.safeStringify = safeStringify exports.md5 = md5 exports.isReadStream = isReadStream exports.toBase64 = toBase64 exports.copy = copy exports.version = version exports.defer = defer /***/ }), /***/ 87810: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var uuid = __webpack_require__(80824) var CombinedStream = __webpack_require__(85443) var isstream = __webpack_require__(83362) var Buffer = __webpack_require__(21867).Buffer function Multipart (request) { this.request = request this.boundary = uuid() this.chunked = false this.body = null } Multipart.prototype.isChunked = function (options) { var self = this var chunked = false var parts = options.data || options if (!parts.forEach) { self.request.emit('error', new Error('Argument error, options.multipart.')) } if (options.chunked !== undefined) { chunked = options.chunked } if (self.request.getHeader('transfer-encoding') === 'chunked') { chunked = true } if (!chunked) { parts.forEach(function (part) { if (typeof part.body === 'undefined') { self.request.emit('error', new Error('Body attribute missing in multipart.')) } if (isstream(part.body)) { chunked = true } }) } return chunked } Multipart.prototype.setHeaders = function (chunked) { var self = this if (chunked && !self.request.hasHeader('transfer-encoding')) { self.request.setHeader('transfer-encoding', 'chunked') } var header = self.request.getHeader('content-type') if (!header || header.indexOf('multipart') === -1) { self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) } else { if (header.indexOf('boundary') !== -1) { self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') } else { self.request.setHeader('content-type', header + '; boundary=' + self.boundary) } } } Multipart.prototype.build = function (parts, chunked) { var self = this var body = chunked ? new CombinedStream() : [] function add (part) { if (typeof part === 'number') { part = part.toString() } return chunked ? body.append(part) : body.push(Buffer.from(part)) } if (self.request.preambleCRLF) { add('\r\n') } parts.forEach(function (part) { var preamble = '--' + self.boundary + '\r\n' Object.keys(part).forEach(function (key) { if (key === 'body') { return } preamble += key + ': ' + part[key] + '\r\n' }) preamble += '\r\n' add(preamble) add(part.body) add('\r\n') }) add('--' + self.boundary + '--') if (self.request.postambleCRLF) { add('\r\n') } return body } Multipart.prototype.onRequest = function (options) { var self = this var chunked = self.isChunked(options) var parts = options.data || options self.setHeaders(chunked) self.chunked = chunked self.body = self.build(parts, chunked) } exports.$ = Multipart /***/ }), /***/ 41174: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var url = __webpack_require__(78835) var qs = __webpack_require__(47457) var caseless = __webpack_require__(35684) var uuid = __webpack_require__(80824) var oauth = __webpack_require__(43248) var crypto = __webpack_require__(33373) var Buffer = __webpack_require__(21867).Buffer function OAuth (request) { this.request = request this.params = null } OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) { var oa = {} for (var i in _oauth) { oa['oauth_' + i] = _oauth[i] } if (!oa.oauth_version) { oa.oauth_version = '1.0' } if (!oa.oauth_timestamp) { oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString() } if (!oa.oauth_nonce) { oa.oauth_nonce = uuid().replace(/-/g, '') } if (!oa.oauth_signature_method) { oa.oauth_signature_method = 'HMAC-SHA1' } var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase delete oa.oauth_consumer_secret delete oa.oauth_private_key var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase delete oa.oauth_token_secret var realm = oa.oauth_realm delete oa.oauth_realm delete oa.oauth_transport_method var baseurl = uri.protocol + '//' + uri.host + uri.pathname var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&')) oa.oauth_signature = oauth.sign( oa.oauth_signature_method, method, baseurl, params, consumer_secret_or_private_key, // eslint-disable-line camelcase token_secret // eslint-disable-line camelcase ) if (realm) { oa.realm = realm } return oa } OAuth.prototype.buildBodyHash = function (_oauth, body) { if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + ' signature_method not supported with body_hash signing.')) } var shasum = crypto.createHash('sha1') shasum.update(body || '') var sha1 = shasum.digest('hex') return Buffer.from(sha1, 'hex').toString('base64') } OAuth.prototype.concatParams = function (oa, sep, wrap) { wrap = wrap || '' var params = Object.keys(oa).filter(function (i) { return i !== 'realm' && i !== 'oauth_signature' }).sort() if (oa.realm) { params.splice(0, 0, 'realm') } params.push('oauth_signature') return params.map(function (i) { return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap }).join(sep) } OAuth.prototype.onRequest = function (_oauth) { var self = this self.params = _oauth var uri = self.request.uri || {} var method = self.request.method || '' var headers = caseless(self.request.headers) var body = self.request.body || '' var qsLib = self.request.qsLib || qs var form var query var contentType = headers.get('content-type') || '' var formContentType = 'application/x-www-form-urlencoded' var transport = _oauth.transport_method || 'header' if (contentType.slice(0, formContentType.length) === formContentType) { contentType = formContentType form = body } if (uri.query) { query = uri.query } if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) { self.request.emit('error', new Error('oauth: transport_method of body requires POST ' + 'and content-type ' + formContentType)) } if (!form && typeof _oauth.body_hash === 'boolean') { _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString()) } var oa = self.buildParams(_oauth, uri, method, query, form, qsLib) switch (transport) { case 'header': self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"')) break case 'query': var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&') self.request.uri = url.parse(href) self.request.path = self.request.uri.path break case 'body': self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&') break default: self.request.emit('error', new Error('oauth: transport_method invalid')) } } exports.f = OAuth /***/ }), /***/ 66476: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var qs = __webpack_require__(47457) var querystring = __webpack_require__(71191) function Querystring (request) { this.request = request this.lib = null this.useQuerystring = null this.parseOptions = null this.stringifyOptions = null } Querystring.prototype.init = function (options) { if (this.lib) { return } this.useQuerystring = options.useQuerystring this.lib = (this.useQuerystring ? querystring : qs) this.parseOptions = options.qsParseOptions || {} this.stringifyOptions = options.qsStringifyOptions || {} } Querystring.prototype.stringify = function (obj) { return (this.useQuerystring) ? this.rfc3986(this.lib.stringify(obj, this.stringifyOptions.sep || null, this.stringifyOptions.eq || null, this.stringifyOptions)) : this.lib.stringify(obj, this.stringifyOptions) } Querystring.prototype.parse = function (str) { return (this.useQuerystring) ? this.lib.parse(str, this.parseOptions.sep || null, this.parseOptions.eq || null, this.parseOptions) : this.lib.parse(str, this.parseOptions) } Querystring.prototype.rfc3986 = function (str) { return str.replace(/[!'()*]/g, function (c) { return '%' + c.charCodeAt(0).toString(16).toUpperCase() }) } Querystring.prototype.unescape = querystring.unescape exports.h = Querystring /***/ }), /***/ 3048: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var url = __webpack_require__(78835) var isUrl = /^https?:/ function Redirect (request) { this.request = request this.followRedirect = true this.followRedirects = true this.followAllRedirects = false this.followOriginalHttpMethod = false this.allowRedirect = function () { return true } this.maxRedirects = 10 this.redirects = [] this.redirectsFollowed = 0 this.removeRefererHeader = false } Redirect.prototype.onRequest = function (options) { var self = this if (options.maxRedirects !== undefined) { self.maxRedirects = options.maxRedirects } if (typeof options.followRedirect === 'function') { self.allowRedirect = options.followRedirect } if (options.followRedirect !== undefined) { self.followRedirects = !!options.followRedirect } if (options.followAllRedirects !== undefined) { self.followAllRedirects = options.followAllRedirects } if (self.followRedirects || self.followAllRedirects) { self.redirects = self.redirects || [] } if (options.removeRefererHeader !== undefined) { self.removeRefererHeader = options.removeRefererHeader } if (options.followOriginalHttpMethod !== undefined) { self.followOriginalHttpMethod = options.followOriginalHttpMethod } } Redirect.prototype.redirectTo = function (response) { var self = this var request = self.request var redirectTo = null if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { var location = response.caseless.get('location') request.debug('redirect', location) if (self.followAllRedirects) { redirectTo = location } else if (self.followRedirects) { switch (request.method) { case 'PATCH': case 'PUT': case 'POST': case 'DELETE': // Do not follow redirects break default: redirectTo = location break } } } else if (response.statusCode === 401) { var authHeader = request._auth.onResponse(response) if (authHeader) { request.setHeader('authorization', authHeader) redirectTo = request.uri } } return redirectTo } Redirect.prototype.onResponse = function (response) { var self = this var request = self.request var redirectTo = self.redirectTo(response) if (!redirectTo || !self.allowRedirect.call(request, response)) { return false } request.debug('redirect to', redirectTo) // ignore any potential response body. it cannot possibly be useful // to us at this point. // response.resume should be defined, but check anyway before calling. Workaround for browserify. if (response.resume) { response.resume() } if (self.redirectsFollowed >= self.maxRedirects) { request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href)) return false } self.redirectsFollowed += 1 if (!isUrl.test(redirectTo)) { redirectTo = url.resolve(request.uri.href, redirectTo) } var uriPrev = request.uri request.uri = url.parse(redirectTo) // handle the case where we change protocol from https to http or vice versa if (request.uri.protocol !== uriPrev.protocol) { delete request.agent } self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo }) if (self.followAllRedirects && request.method !== 'HEAD' && response.statusCode !== 401 && response.statusCode !== 307) { request.method = self.followOriginalHttpMethod ? request.method : 'GET' } // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 delete request.src delete request.req delete request._started if (response.statusCode !== 401 && response.statusCode !== 307) { // Remove parameters from the previous response, unless this is the second request // for a server that requires digest authentication. delete request.body delete request._form if (request.headers) { request.removeHeader('host') request.removeHeader('content-type') request.removeHeader('content-length') if (request.uri.hostname !== request.originalHost.split(':')[0]) { // Remove authorization if changing hostnames (but not if just // changing ports or protocols). This matches the behavior of curl: // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710 request.removeHeader('authorization') } } } if (!self.removeRefererHeader) { request.setHeader('referer', uriPrev.href) } request.emit('redirect') request.init() return true } exports.l = Redirect /***/ }), /***/ 17619: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var url = __webpack_require__(78835) var tunnel = __webpack_require__(11137) var defaultProxyHeaderWhiteList = [ 'accept', 'accept-charset', 'accept-encoding', 'accept-language', 'accept-ranges', 'cache-control', 'content-encoding', 'content-language', 'content-location', 'content-md5', 'content-range', 'content-type', 'connection', 'date', 'expect', 'max-forwards', 'pragma', 'referer', 'te', 'user-agent', 'via' ] var defaultProxyHeaderExclusiveList = [ 'proxy-authorization' ] function constructProxyHost (uriObject) { var port = uriObject.port var protocol = uriObject.protocol var proxyHost = uriObject.hostname + ':' if (port) { proxyHost += port } else if (protocol === 'https:') { proxyHost += '443' } else { proxyHost += '80' } return proxyHost } function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) { var whiteList = proxyHeaderWhiteList .reduce(function (set, header) { set[header.toLowerCase()] = true return set }, {}) return Object.keys(headers) .filter(function (header) { return whiteList[header.toLowerCase()] }) .reduce(function (set, header) { set[header] = headers[header] return set }, {}) } function constructTunnelOptions (request, proxyHeaders) { var proxy = request.proxy var tunnelOptions = { proxy: { host: proxy.hostname, port: +proxy.port, proxyAuth: proxy.auth, headers: proxyHeaders }, headers: request.headers, ca: request.ca, cert: request.cert, key: request.key, passphrase: request.passphrase, pfx: request.pfx, ciphers: request.ciphers, rejectUnauthorized: request.rejectUnauthorized, secureOptions: request.secureOptions, secureProtocol: request.secureProtocol } return tunnelOptions } function constructTunnelFnName (uri, proxy) { var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') return [uriProtocol, proxyProtocol].join('Over') } function getTunnelFn (request) { var uri = request.uri var proxy = request.proxy var tunnelFnName = constructTunnelFnName(uri, proxy) return tunnel[tunnelFnName] } function Tunnel (request) { this.request = request this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList this.proxyHeaderExclusiveList = [] if (typeof request.tunnel !== 'undefined') { this.tunnelOverride = request.tunnel } } Tunnel.prototype.isEnabled = function () { var self = this var request = self.request // Tunnel HTTPS by default. Allow the user to override this setting. // If self.tunnelOverride is set (the user specified a value), use it. if (typeof self.tunnelOverride !== 'undefined') { return self.tunnelOverride } // If the destination is HTTPS, tunnel. if (request.uri.protocol === 'https:') { return true } // Otherwise, do not use tunnel. return false } Tunnel.prototype.setup = function (options) { var self = this var request = self.request options = options || {} if (typeof request.proxy === 'string') { request.proxy = url.parse(request.proxy) } if (!request.proxy || !request.tunnel) { return false } // Setup Proxy Header Exclusive List and White List if (options.proxyHeaderWhiteList) { self.proxyHeaderWhiteList = options.proxyHeaderWhiteList } if (options.proxyHeaderExclusiveList) { self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList } var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) // Setup Proxy Headers and Proxy Headers Host // Only send the Proxy White Listed Header names var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) proxyHeaders.host = constructProxyHost(request.uri) proxyHeaderExclusiveList.forEach(request.removeHeader, request) // Set Agent from Tunnel Data var tunnelFn = getTunnelFn(request) var tunnelOptions = constructTunnelOptions(request, proxyHeaders) request.agent = tunnelFn(tunnelOptions) return true } Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList exports.n = Tunnel /***/ }), /***/ 11377: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var CombinedStream = __webpack_require__(85443); var util = __webpack_require__(31669); var path = __webpack_require__(85622); var http = __webpack_require__(98605); var https = __webpack_require__(57211); var parseUrl = __webpack_require__(78835).parse; var fs = __webpack_require__(35747); var mime = __webpack_require__(43583); var asynckit = __webpack_require__(14812); var populate = __webpack_require__(94932); // Public API module.exports = FormData; // make it a Stream util.inherits(FormData, CombinedStream); /** * Create readable "multipart/form-data" streams. * Can be used to submit forms * and file uploads to other web applications. * * @constructor * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream */ function FormData(options) { if (!(this instanceof FormData)) { return new FormData(); } this._overheadLength = 0; this._valueLength = 0; this._valuesToMeasure = []; CombinedStream.call(this); options = options || {}; for (var option in options) { this[option] = options[option]; } } FormData.LINE_BREAK = '\r\n'; FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; FormData.prototype.append = function(field, value, options) { options = options || {}; // allow filename as single option if (typeof options == 'string') { options = {filename: options}; } var append = CombinedStream.prototype.append.bind(this); // all that streamy business can't handle numbers if (typeof value == 'number') { value = '' + value; } // https://github.com/felixge/node-form-data/issues/38 if (util.isArray(value)) { // Please convert your array into string // the way web server expects it this._error(new Error('Arrays are not supported.')); return; } var header = this._multiPartHeader(field, value, options); var footer = this._multiPartFooter(); append(header); append(value); append(footer); // pass along options.knownLength this._trackLength(header, value, options); }; FormData.prototype._trackLength = function(header, value, options) { var valueLength = 0; // used w/ getLengthSync(), when length is known. // e.g. for streaming directly from a remote server, // w/ a known file a size, and not wanting to wait for // incoming file to finish to get its size. if (options.knownLength != null) { valueLength += +options.knownLength; } else if (Buffer.isBuffer(value)) { valueLength = value.length; } else if (typeof value === 'string') { valueLength = Buffer.byteLength(value); } this._valueLength += valueLength; // @check why add CRLF? does this account for custom/multiple CRLFs? this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; // empty or either doesn't have path or not an http response if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { return; } // no need to bother with the length if (!options.knownLength) { this._valuesToMeasure.push(value); } }; FormData.prototype._lengthRetriever = function(value, callback) { if (value.hasOwnProperty('fd')) { // take read range into a account // `end` = Infinity –> read file till the end // // TODO: Looks like there is bug in Node fs.createReadStream // it doesn't respect `end` options without `start` options // Fix it when node fixes it. // https://github.com/joyent/node/issues/7819 if (value.end != undefined && value.end != Infinity && value.start != undefined) { // when end specified // no need to calculate range // inclusive, starts with 0 callback(null, value.end + 1 - (value.start ? value.start : 0)); // not that fast snoopy } else { // still need to fetch file size from fs fs.stat(value.path, function(err, stat) { var fileSize; if (err) { callback(err); return; } // update final size based on the range options fileSize = stat.size - (value.start ? value.start : 0); callback(null, fileSize); }); } // or http response } else if (value.hasOwnProperty('httpVersion')) { callback(null, +value.headers['content-length']); // or request stream http://github.com/mikeal/request } else if (value.hasOwnProperty('httpModule')) { // wait till response come back value.on('response', function(response) { value.pause(); callback(null, +response.headers['content-length']); }); value.resume(); // something else } else { callback('Unknown stream'); } }; FormData.prototype._multiPartHeader = function(field, value, options) { // custom header specified (as string)? // it becomes responsible for boundary // (e.g. to handle extra CRLFs on .NET servers) if (typeof options.header == 'string') { return options.header; } var contentDisposition = this._getContentDisposition(value, options); var contentType = this._getContentType(value, options); var contents = ''; var headers = { // add custom disposition as third element or keep it two elements if not 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), // if no content type. allow it to be empty array 'Content-Type': [].concat(contentType || []) }; // allow custom headers. if (typeof options.header == 'object') { populate(headers, options.header); } var header; for (var prop in headers) { if (!headers.hasOwnProperty(prop)) continue; header = headers[prop]; // skip nullish headers. if (header == null) { continue; } // convert all headers to arrays. if (!Array.isArray(header)) { header = [header]; } // add non-empty headers. if (header.length) { contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; } } return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; }; FormData.prototype._getContentDisposition = function(value, options) { var filename , contentDisposition ; if (typeof options.filepath === 'string') { // custom filepath for relative paths filename = path.normalize(options.filepath).replace(/\\/g, '/'); } else if (options.filename || value.name || value.path) { // custom filename take precedence // formidable and the browser add a name property // fs- and request- streams have path property filename = path.basename(options.filename || value.name || value.path); } else if (value.readable && value.hasOwnProperty('httpVersion')) { // or try http response filename = path.basename(value.client._httpMessage.path); } if (filename) { contentDisposition = 'filename="' + filename + '"'; } return contentDisposition; }; FormData.prototype._getContentType = function(value, options) { // use custom content-type above all var contentType = options.contentType; // or try `name` from formidable, browser if (!contentType && value.name) { contentType = mime.lookup(value.name); } // or try `path` from fs-, request- streams if (!contentType && value.path) { contentType = mime.lookup(value.path); } // or if it's http-reponse if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { contentType = value.headers['content-type']; } // or guess it from the filepath or filename if (!contentType && (options.filepath || options.filename)) { contentType = mime.lookup(options.filepath || options.filename); } // fallback to the default content type if `value` is not simple value if (!contentType && typeof value == 'object') { contentType = FormData.DEFAULT_CONTENT_TYPE; } return contentType; }; FormData.prototype._multiPartFooter = function() { return function(next) { var footer = FormData.LINE_BREAK; var lastPart = (this._streams.length === 0); if (lastPart) { footer += this._lastBoundary(); } next(footer); }.bind(this); }; FormData.prototype._lastBoundary = function() { return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; }; FormData.prototype.getHeaders = function(userHeaders) { var header; var formHeaders = { 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() }; for (header in userHeaders) { if (userHeaders.hasOwnProperty(header)) { formHeaders[header.toLowerCase()] = userHeaders[header]; } } return formHeaders; }; FormData.prototype.getBoundary = function() { if (!this._boundary) { this._generateBoundary(); } return this._boundary; }; FormData.prototype._generateBoundary = function() { // This generates a 50 character boundary similar to those used by Firefox. // They are optimized for boyer-moore parsing. var boundary = '--------------------------'; for (var i = 0; i < 24; i++) { boundary += Math.floor(Math.random() * 10).toString(16); } this._boundary = boundary; }; // Note: getLengthSync DOESN'T calculate streams length // As workaround one can calculate file size manually // and add it as knownLength option FormData.prototype.getLengthSync = function() { var knownLength = this._overheadLength + this._valueLength; // Don't get confused, there are 3 "internal" streams for each keyval pair // so it basically checks if there is any value added to the form if (this._streams.length) { knownLength += this._lastBoundary().length; } // https://github.com/form-data/form-data/issues/40 if (!this.hasKnownLength()) { // Some async length retrievers are present // therefore synchronous length calculation is false. // Please use getLength(callback) to get proper length this._error(new Error('Cannot calculate proper length in synchronous way.')); } return knownLength; }; // Public API to check if length of added values is known // https://github.com/form-data/form-data/issues/196 // https://github.com/form-data/form-data/issues/262 FormData.prototype.hasKnownLength = function() { var hasKnownLength = true; if (this._valuesToMeasure.length) { hasKnownLength = false; } return hasKnownLength; }; FormData.prototype.getLength = function(cb) { var knownLength = this._overheadLength + this._valueLength; if (this._streams.length) { knownLength += this._lastBoundary().length; } if (!this._valuesToMeasure.length) { process.nextTick(cb.bind(this, null, knownLength)); return; } asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { if (err) { cb(err); return; } values.forEach(function(length) { knownLength += length; }); cb(null, knownLength); }); }; FormData.prototype.submit = function(params, cb) { var request , options , defaults = {method: 'post'} ; // parse provided url if it's string // or treat it as options object if (typeof params == 'string') { params = parseUrl(params); options = populate({ port: params.port, path: params.pathname, host: params.hostname, protocol: params.protocol }, defaults); // use custom params } else { options = populate(params, defaults); // if no port provided use default one if (!options.port) { options.port = options.protocol == 'https:' ? 443 : 80; } } // put that good code in getHeaders to some use options.headers = this.getHeaders(params.headers); // https if specified, fallback to http in any other case if (options.protocol == 'https:') { request = https.request(options); } else { request = http.request(options); } // get content length and fire away this.getLength(function(err, length) { if (err) { this._error(err); return; } // add content length request.setHeader('Content-Length', length); this.pipe(request); if (cb) { request.on('error', cb); request.on('response', cb.bind(this, null)); } }.bind(this)); return request; }; FormData.prototype._error = function(err) { if (!this.error) { this.error = err; this.pause(); this.emit('error', err); } }; FormData.prototype.toString = function () { return '[object FormData]'; }; /***/ }), /***/ 94932: /***/ ((module) => { // populates missing values module.exports = function(dst, src) { Object.keys(src).forEach(function(prop) { dst[prop] = dst[prop] || src[prop]; }); return dst; }; /***/ }), /***/ 28321: /***/ ((module) => { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; module.exports = { 'default': 'RFC3986', formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return value; } }, RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; /***/ }), /***/ 47457: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var stringify = __webpack_require__(64021); var parse = __webpack_require__(90693); var formats = __webpack_require__(28321); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /***/ 90693: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var utils = __webpack_require__(17409); var has = Object.prototype.hasOwnProperty; var defaults = { allowDots: false, allowPrototypes: false, arrayLimit: 20, decoder: utils.decode, delimiter: '&', depth: 5, parameterLimit: 1000, plainObjects: false, strictNullHandling: false }; var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder); val = options.decoder(part.slice(pos + 1), defaults.decoder); } if (has.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); } else { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options) { var leaf = val; for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]') { obj = []; obj = obj.concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else { obj[cleanRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options); }; module.exports = function (str, opts) { var options = opts ? utils.assign({}, opts) : {}; if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; options.parseArrays = options.parseArrays !== false; options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; /***/ }), /***/ 64021: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var utils = __webpack_require__(17409); var formats = __webpack_require__(28321); var arrayPrefixGenerators = { brackets: function brackets(prefix) { // eslint-disable-line func-name-matching return prefix + '[]'; }, indices: function indices(prefix, key) { // eslint-disable-line func-name-matching return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { // eslint-disable-line func-name-matching return prefix; } }; var toISO = Date.prototype.toISOString; var defaults = { delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly ) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; } obj = ''; } if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (Array.isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } else { values = values.concat(stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } } return values; }; module.exports = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; var sort = typeof options.sort === 'function' ? options.sort : null; var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; if (typeof options.format === 'undefined') { options.format = formats['default']; } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { throw new TypeError('Unknown format option provided.'); } var formatter = formats.formatters[options.format]; var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (Array.isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in arrayPrefixGenerators) { arrayFormat = options.arrayFormat; } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (sort) { objKeys.sort(sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } keys = keys.concat(stringify( obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode ? encoder : null, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } var joined = keys.join(delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; return joined.length > 0 ? prefix + joined : ''; }; /***/ }), /***/ 17409: /***/ ((module) => { "use strict"; var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { var obj; while (queue.length) { var item = queue.pop(); obj = item.obj[item.prop]; if (Array.isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } return obj; }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; var merge = function merge(target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; var encode = function encode(str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; var compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } return compactQueue(queue); }; var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; var isBuffer = function isBuffer(obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; module.exports = { arrayToObject: arrayToObject, assign: assign, compact: compact, decode: decode, encode: encode, isBuffer: isBuffer, isRegExp: isRegExp, merge: merge }; /***/ }), /***/ 70304: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var http = __webpack_require__(98605) var https = __webpack_require__(57211) var url = __webpack_require__(78835) var util = __webpack_require__(31669) var stream = __webpack_require__(92413) var zlib = __webpack_require__(78761) var aws2 = __webpack_require__(96342) var aws4 = __webpack_require__(16071) var httpSignature = __webpack_require__(42479) var mime = __webpack_require__(43583) var caseless = __webpack_require__(35684) var ForeverAgent = __webpack_require__(47568) var FormData = __webpack_require__(11377) var extend = __webpack_require__(38171) var isstream = __webpack_require__(83362) var isTypedArray = __webpack_require__(10657).strict var helpers = __webpack_require__(74845) var cookies = __webpack_require__(50976) var getProxyFromURI = __webpack_require__(75654) var Querystring = __webpack_require__(66476)/* .Querystring */ .h var Har = __webpack_require__(3248)/* .Har */ .t var Auth = __webpack_require__(76996)/* .Auth */ .g var OAuth = __webpack_require__(41174)/* .OAuth */ .f var hawk = __webpack_require__(34473) var Multipart = __webpack_require__(87810)/* .Multipart */ .$ var Redirect = __webpack_require__(3048)/* .Redirect */ .l var Tunnel = __webpack_require__(17619)/* .Tunnel */ .n var now = __webpack_require__(85644) var Buffer = __webpack_require__(21867).Buffer var safeStringify = helpers.safeStringify var isReadStream = helpers.isReadStream var toBase64 = helpers.toBase64 var defer = helpers.defer var copy = helpers.copy var version = helpers.version var globalCookieJar = cookies.jar() var globalPool = {} function filterForNonReserved (reserved, options) { // Filter out properties that are not reserved. // Reserved values are passed in at call site. var object = {} for (var i in options) { var notReserved = (reserved.indexOf(i) === -1) if (notReserved) { object[i] = options[i] } } return object } function filterOutReservedFunctions (reserved, options) { // Filter out properties that are functions and are reserved. // Reserved values are passed in at call site. var object = {} for (var i in options) { var isReserved = !(reserved.indexOf(i) === -1) var isFunction = (typeof options[i] === 'function') if (!(isReserved && isFunction)) { object[i] = options[i] } } return object } // Return a simpler request object to allow serialization function requestToJSON () { var self = this return { uri: self.uri, method: self.method, headers: self.headers } } // Return a simpler response object to allow serialization function responseToJSON () { var self = this return { statusCode: self.statusCode, body: self.body, headers: self.headers, request: requestToJSON.call(self.request) } } function Request (options) { // if given the method property in options, set property explicitMethod to true // extend the Request instance with any non-reserved properties // remove any reserved functions from the options object // set Request instance to be readable and writable // call init var self = this // start with HAR, then override with additional options if (options.har) { self._har = new Har(self) options = self._har.options(options) } stream.Stream.call(self) var reserved = Object.keys(Request.prototype) var nonReserved = filterForNonReserved(reserved, options) extend(self, nonReserved) options = filterOutReservedFunctions(reserved, options) self.readable = true self.writable = true if (options.method) { self.explicitMethod = true } self._qs = new Querystring(self) self._auth = new Auth(self) self._oauth = new OAuth(self) self._multipart = new Multipart(self) self._redirect = new Redirect(self) self._tunnel = new Tunnel(self) self.init(options) } util.inherits(Request, stream.Stream) // Debugging Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) function debug () { if (Request.debug) { console.error('REQUEST %s', util.format.apply(util, arguments)) } } Request.prototype.debug = debug Request.prototype.init = function (options) { // init() contains all the code to setup the request object. // the actual outgoing request is not started until start() is called // this function is called from both the constructor and on redirect. var self = this if (!options) { options = {} } self.headers = self.headers ? copy(self.headers) : {} // Delete headers with value undefined since they break // ClientRequest.OutgoingMessage.setHeader in node 0.12 for (var headerName in self.headers) { if (typeof self.headers[headerName] === 'undefined') { delete self.headers[headerName] } } caseless.httpify(self, self.headers) if (!self.method) { self.method = options.method || 'GET' } if (!self.localAddress) { self.localAddress = options.localAddress } self._qs.init(options) debug(options) if (!self.pool && self.pool !== false) { self.pool = globalPool } self.dests = self.dests || [] self.__isRequestRequest = true // Protect against double callback if (!self._callback && self.callback) { self._callback = self.callback self.callback = function () { if (self._callbackCalled) { return // Print a warning maybe? } self._callbackCalled = true self._callback.apply(self, arguments) } self.on('error', self.callback.bind()) self.on('complete', self.callback.bind(self, null)) } // People use this property instead all the time, so support it if (!self.uri && self.url) { self.uri = self.url delete self.url } // If there's a baseUrl, then use it as the base URL (i.e. uri must be // specified as a relative path and is appended to baseUrl). if (self.baseUrl) { if (typeof self.baseUrl !== 'string') { return self.emit('error', new Error('options.baseUrl must be a string')) } if (typeof self.uri !== 'string') { return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) } if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) } // Handle all cases to make sure that there's only one slash between // baseUrl and uri. var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 var uriStartsWithSlash = self.uri.indexOf('/') === 0 if (baseUrlEndsWithSlash && uriStartsWithSlash) { self.uri = self.baseUrl + self.uri.slice(1) } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { self.uri = self.baseUrl + self.uri } else if (self.uri === '') { self.uri = self.baseUrl } else { self.uri = self.baseUrl + '/' + self.uri } delete self.baseUrl } // A URI is needed by this point, emit error if we haven't been able to get one if (!self.uri) { return self.emit('error', new Error('options.uri is a required argument')) } // If a string URI/URL was given, parse it into a URL object if (typeof self.uri === 'string') { self.uri = url.parse(self.uri) } // Some URL objects are not from a URL parsed string and need href added if (!self.uri.href) { self.uri.href = url.format(self.uri) } // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme if (self.uri.protocol === 'unix:') { return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) } // Support Unix Sockets if (self.uri.host === 'unix') { self.enableUnixSocket() } if (self.strictSSL === false) { self.rejectUnauthorized = false } if (!self.uri.pathname) { self.uri.pathname = '/' } if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar // Detect and reject it as soon as possible var faultyUri = url.format(self.uri) var message = 'Invalid URI "' + faultyUri + '"' if (Object.keys(options).length === 0) { // No option ? This can be the sign of a redirect // As this is a case where the user cannot do anything (they didn't call request directly with this URL) // they should be warned that it can be caused by a redirection (can save some hair) message += '. This can be caused by a crappy redirection.' } // This error was fatal self.abort() return self.emit('error', new Error(message)) } if (!self.hasOwnProperty('proxy')) { self.proxy = getProxyFromURI(self.uri) } self.tunnel = self._tunnel.isEnabled() if (self.proxy) { self._tunnel.setup(options) } self._redirect.onRequest(options) self.setHost = false if (!self.hasHeader('host')) { var hostHeaderName = self.originalHostHeaderName || 'host' self.setHeader(hostHeaderName, self.uri.host) // Drop :port suffix from Host header if known protocol. if (self.uri.port) { if ((self.uri.port === '80' && self.uri.protocol === 'http:') || (self.uri.port === '443' && self.uri.protocol === 'https:')) { self.setHeader(hostHeaderName, self.uri.hostname) } } self.setHost = true } self.jar(self._jar || options.jar) if (!self.uri.port) { if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 } } if (self.proxy && !self.tunnel) { self.port = self.proxy.port self.host = self.proxy.hostname } else { self.port = self.uri.port self.host = self.uri.hostname } if (options.form) { self.form(options.form) } if (options.formData) { var formData = options.formData var requestForm = self.form() var appendFormValue = function (key, value) { if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { requestForm.append(key, value.value, value.options) } else { requestForm.append(key, value) } } for (var formKey in formData) { if (formData.hasOwnProperty(formKey)) { var formValue = formData[formKey] if (formValue instanceof Array) { for (var j = 0; j < formValue.length; j++) { appendFormValue(formKey, formValue[j]) } } else { appendFormValue(formKey, formValue) } } } } if (options.qs) { self.qs(options.qs) } if (self.uri.path) { self.path = self.uri.path } else { self.path = self.uri.pathname + (self.uri.search || '') } if (self.path.length === 0) { self.path = '/' } // Auth must happen last in case signing is dependent on other headers if (options.aws) { self.aws(options.aws) } if (options.hawk) { self.hawk(options.hawk) } if (options.httpSignature) { self.httpSignature(options.httpSignature) } if (options.auth) { if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { options.auth.user = options.auth.username } if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { options.auth.pass = options.auth.password } self.auth( options.auth.user, options.auth.pass, options.auth.sendImmediately, options.auth.bearer ) } if (self.gzip && !self.hasHeader('accept-encoding')) { self.setHeader('accept-encoding', 'gzip, deflate') } if (self.uri.auth && !self.hasHeader('authorization')) { var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) }) self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) } if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) }) var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) self.setHeader('proxy-authorization', authHeader) } if (self.proxy && !self.tunnel) { self.path = (self.uri.protocol + '//' + self.uri.host + self.path) } if (options.json) { self.json(options.json) } if (options.multipart) { self.multipart(options.multipart) } if (options.time) { self.timing = true // NOTE: elapsedTime is deprecated in favor of .timings self.elapsedTime = self.elapsedTime || 0 } function setContentLength () { if (isTypedArray(self.body)) { self.body = Buffer.from(self.body) } if (!self.hasHeader('content-length')) { var length if (typeof self.body === 'string') { length = Buffer.byteLength(self.body) } else if (Array.isArray(self.body)) { length = self.body.reduce(function (a, b) { return a + b.length }, 0) } else { length = self.body.length } if (length) { self.setHeader('content-length', length) } else { self.emit('error', new Error('Argument error, options.body.')) } } } if (self.body && !isstream(self.body)) { setContentLength() } if (options.oauth) { self.oauth(options.oauth) } else if (self._oauth.params && self.hasHeader('authorization')) { self.oauth(self._oauth.params) } var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol var defaultModules = {'http:': http, 'https:': https} var httpModules = self.httpModules || {} self.httpModule = httpModules[protocol] || defaultModules[protocol] if (!self.httpModule) { return self.emit('error', new Error('Invalid protocol: ' + protocol)) } if (options.ca) { self.ca = options.ca } if (!self.agent) { if (options.agentOptions) { self.agentOptions = options.agentOptions } if (options.agentClass) { self.agentClass = options.agentClass } else if (options.forever) { var v = version() // use ForeverAgent in node 0.10- only if (v.major === 0 && v.minor <= 10) { self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL } else { self.agentClass = self.httpModule.Agent self.agentOptions = self.agentOptions || {} self.agentOptions.keepAlive = true } } else { self.agentClass = self.httpModule.Agent } } if (self.pool === false) { self.agent = false } else { self.agent = self.agent || self.getNewAgent() } self.on('pipe', function (src) { if (self.ntick && self._started) { self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) } self.src = src if (isReadStream(src)) { if (!self.hasHeader('content-type')) { self.setHeader('content-type', mime.lookup(src.path)) } } else { if (src.headers) { for (var i in src.headers) { if (!self.hasHeader(i)) { self.setHeader(i, src.headers[i]) } } } if (self._json && !self.hasHeader('content-type')) { self.setHeader('content-type', 'application/json') } if (src.method && !self.explicitMethod) { self.method = src.method } } // self.on('pipe', function () { // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') // }) }) defer(function () { if (self._aborted) { return } var end = function () { if (self._form) { if (!self._auth.hasAuth) { self._form.pipe(self) } else if (self._auth.hasAuth && self._auth.sentAuth) { self._form.pipe(self) } } if (self._multipart && self._multipart.chunked) { self._multipart.body.pipe(self) } if (self.body) { if (isstream(self.body)) { self.body.pipe(self) } else { setContentLength() if (Array.isArray(self.body)) { self.body.forEach(function (part) { self.write(part) }) } else { self.write(self.body) } self.end() } } else if (self.requestBodyStream) { console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') self.requestBodyStream.pipe(self) } else if (!self.src) { if (self._auth.hasAuth && !self._auth.sentAuth) { self.end() return } if (self.method !== 'GET' && typeof self.method !== 'undefined') { self.setHeader('content-length', 0) } self.end() } } if (self._form && !self.hasHeader('content-length')) { // Before ending the request, we had to compute the length of the whole form, asyncly self.setHeader(self._form.getHeaders(), true) self._form.getLength(function (err, length) { if (!err && !isNaN(length)) { self.setHeader('content-length', length) } end() }) } else { end() } self.ntick = true }) } Request.prototype.getNewAgent = function () { var self = this var Agent = self.agentClass var options = {} if (self.agentOptions) { for (var i in self.agentOptions) { options[i] = self.agentOptions[i] } } if (self.ca) { options.ca = self.ca } if (self.ciphers) { options.ciphers = self.ciphers } if (self.secureProtocol) { options.secureProtocol = self.secureProtocol } if (self.secureOptions) { options.secureOptions = self.secureOptions } if (typeof self.rejectUnauthorized !== 'undefined') { options.rejectUnauthorized = self.rejectUnauthorized } if (self.cert && self.key) { options.key = self.key options.cert = self.cert } if (self.pfx) { options.pfx = self.pfx } if (self.passphrase) { options.passphrase = self.passphrase } var poolKey = '' // different types of agents are in different pools if (Agent !== self.httpModule.Agent) { poolKey += Agent.name } // ca option is only relevant if proxy or destination are https var proxy = self.proxy if (typeof proxy === 'string') { proxy = url.parse(proxy) } var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' if (isHttps) { if (options.ca) { if (poolKey) { poolKey += ':' } poolKey += options.ca } if (typeof options.rejectUnauthorized !== 'undefined') { if (poolKey) { poolKey += ':' } poolKey += options.rejectUnauthorized } if (options.cert) { if (poolKey) { poolKey += ':' } poolKey += options.cert.toString('ascii') + options.key.toString('ascii') } if (options.pfx) { if (poolKey) { poolKey += ':' } poolKey += options.pfx.toString('ascii') } if (options.ciphers) { if (poolKey) { poolKey += ':' } poolKey += options.ciphers } if (options.secureProtocol) { if (poolKey) { poolKey += ':' } poolKey += options.secureProtocol } if (options.secureOptions) { if (poolKey) { poolKey += ':' } poolKey += options.secureOptions } } if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { // not doing anything special. Use the globalAgent return self.httpModule.globalAgent } // we're using a stored agent. Make sure it's protocol-specific poolKey = self.uri.protocol + poolKey // generate a new agent for this setting if none yet exists if (!self.pool[poolKey]) { self.pool[poolKey] = new Agent(options) // properly set maxSockets on new agents if (self.pool.maxSockets) { self.pool[poolKey].maxSockets = self.pool.maxSockets } } return self.pool[poolKey] } Request.prototype.start = function () { // start() is called once we are ready to send the outgoing HTTP request. // this is usually called on the first write(), end() or on nextTick() var self = this if (self.timing) { // All timings will be relative to this request's startTime. In order to do this, // we need to capture the wall-clock start time (via Date), immediately followed // by the high-resolution timer (via now()). While these two won't be set // at the _exact_ same time, they should be close enough to be able to calculate // high-resolution, monotonically non-decreasing timestamps relative to startTime. var startTime = new Date().getTime() var startTimeNow = now() } if (self._aborted) { return } self._started = true self.method = self.method || 'GET' self.href = self.uri.href if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { self.setHeader('content-length', self.src.stat.size) } if (self._aws) { self.aws(self._aws, true) } // We have a method named auth, which is completely different from the http.request // auth option. If we don't remove it, we're gonna have a bad time. var reqOptions = copy(self) delete reqOptions.auth debug('make request', self.uri.href) // node v6.8.0 now supports a `timeout` value in `http.request()`, but we // should delete it for now since we handle timeouts manually for better // consistency with node versions before v6.8.0 delete reqOptions.timeout try { self.req = self.httpModule.request(reqOptions) } catch (err) { self.emit('error', err) return } if (self.timing) { self.startTime = startTime self.startTimeNow = startTimeNow // Timing values will all be relative to startTime (by comparing to startTimeNow // so we have an accurate clock) self.timings = {} } var timeout if (self.timeout && !self.timeoutTimer) { if (self.timeout < 0) { timeout = 0 } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) { timeout = self.timeout } } self.req.on('response', self.onRequestResponse.bind(self)) self.req.on('error', self.onRequestError.bind(self)) self.req.on('drain', function () { self.emit('drain') }) self.req.on('socket', function (socket) { // `._connecting` was the old property which was made public in node v6.1.0 var isConnecting = socket._connecting || socket.connecting if (self.timing) { self.timings.socket = now() - self.startTimeNow if (isConnecting) { var onLookupTiming = function () { self.timings.lookup = now() - self.startTimeNow } var onConnectTiming = function () { self.timings.connect = now() - self.startTimeNow } socket.once('lookup', onLookupTiming) socket.once('connect', onConnectTiming) // clean up timing event listeners if needed on error self.req.once('error', function () { socket.removeListener('lookup', onLookupTiming) socket.removeListener('connect', onConnectTiming) }) } } var setReqTimeout = function () { // This timeout sets the amount of time to wait *between* bytes sent // from the server once connected. // // In particular, it's useful for erroring if the server fails to send // data halfway through streaming a response. self.req.setTimeout(timeout, function () { if (self.req) { self.abort() var e = new Error('ESOCKETTIMEDOUT') e.code = 'ESOCKETTIMEDOUT' e.connect = false self.emit('error', e) } }) } if (timeout !== undefined) { // Only start the connection timer if we're actually connecting a new // socket, otherwise if we're already connected (because this is a // keep-alive connection) do not bother. This is important since we won't // get a 'connect' event for an already connected socket. if (isConnecting) { var onReqSockConnect = function () { socket.removeListener('connect', onReqSockConnect) self.clearTimeout() setReqTimeout() } socket.on('connect', onReqSockConnect) self.req.on('error', function (err) { // eslint-disable-line handle-callback-err socket.removeListener('connect', onReqSockConnect) }) // Set a timeout in memory - this block will throw if the server takes more // than `timeout` to write the HTTP status and headers (corresponding to // the on('response') event on the client). NB: this measures wall-clock // time, not the time between bytes sent by the server. self.timeoutTimer = setTimeout(function () { socket.removeListener('connect', onReqSockConnect) self.abort() var e = new Error('ETIMEDOUT') e.code = 'ETIMEDOUT' e.connect = true self.emit('error', e) }, timeout) } else { // We're already connected setReqTimeout() } } self.emit('socket', socket) }) self.emit('request', self.req) } Request.prototype.onRequestError = function (error) { var self = this if (self._aborted) { return } if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' && self.agent.addRequestNoreuse) { self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } self.start() self.req.end() return } self.clearTimeout() self.emit('error', error) } Request.prototype.onRequestResponse = function (response) { var self = this if (self.timing) { self.timings.response = now() - self.startTimeNow } debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) response.on('end', function () { if (self.timing) { self.timings.end = now() - self.startTimeNow response.timingStart = self.startTime // fill in the blanks for any periods that didn't trigger, such as // no lookup or connect due to keep alive if (!self.timings.socket) { self.timings.socket = 0 } if (!self.timings.lookup) { self.timings.lookup = self.timings.socket } if (!self.timings.connect) { self.timings.connect = self.timings.lookup } if (!self.timings.response) { self.timings.response = self.timings.connect } debug('elapsed time', self.timings.end) // elapsedTime includes all redirects self.elapsedTime += Math.round(self.timings.end) // NOTE: elapsedTime is deprecated in favor of .timings response.elapsedTime = self.elapsedTime // timings is just for the final fetch response.timings = self.timings // pre-calculate phase timings as well response.timingPhases = { wait: self.timings.socket, dns: self.timings.lookup - self.timings.socket, tcp: self.timings.connect - self.timings.lookup, firstByte: self.timings.response - self.timings.connect, download: self.timings.end - self.timings.response, total: self.timings.end } } debug('response end', self.uri.href, response.statusCode, response.headers) }) if (self._aborted) { debug('aborted', self.uri.href) response.resume() return } self.response = response response.request = self response.toJSON = responseToJSON // XXX This is different on 0.10, because SSL is strict by default if (self.httpModule === https && self.strictSSL && (!response.hasOwnProperty('socket') || !response.socket.authorized)) { debug('strict ssl error', self.uri.href) var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' self.emit('error', new Error('SSL Error: ' + sslErr)) return } // Save the original host before any redirect (if it changes, we need to // remove any authorization headers). Also remember the case of the header // name because lots of broken servers expect Host instead of host and we // want the caller to be able to specify this. self.originalHost = self.getHeader('host') if (!self.originalHostHeaderName) { self.originalHostHeaderName = self.hasHeader('host') } if (self.setHost) { self.removeHeader('host') } self.clearTimeout() var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar var addCookie = function (cookie) { // set the cookie if it's domain in the href's domain. try { targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) } catch (e) { self.emit('error', e) } } response.caseless = caseless(response.headers) if (response.caseless.has('set-cookie') && (!self._disableCookies)) { var headerName = response.caseless.has('set-cookie') if (Array.isArray(response.headers[headerName])) { response.headers[headerName].forEach(addCookie) } else { addCookie(response.headers[headerName]) } } if (self._redirect.onResponse(response)) { return // Ignore the rest of the response } else { // Be a good stream and emit end when the response is finished. // Hack to emit end on close because of a core bug that never fires end response.on('close', function () { if (!self._ended) { self.response.emit('end') } }) response.once('end', function () { self._ended = true }) var noBody = function (code) { return ( self.method === 'HEAD' || // Informational (code >= 100 && code < 200) || // No Content code === 204 || // Not Modified code === 304 ) } var responseContent if (self.gzip && !noBody(response.statusCode)) { var contentEncoding = response.headers['content-encoding'] || 'identity' contentEncoding = contentEncoding.trim().toLowerCase() // Be more lenient with decoding compressed responses, since (very rarely) // servers send slightly invalid gzip responses that are still accepted // by common browsers. // Always using Z_SYNC_FLUSH is what cURL does. var zlibOptions = { flush: zlib.Z_SYNC_FLUSH, finishFlush: zlib.Z_SYNC_FLUSH } if (contentEncoding === 'gzip') { responseContent = zlib.createGunzip(zlibOptions) response.pipe(responseContent) } else if (contentEncoding === 'deflate') { responseContent = zlib.createInflate(zlibOptions) response.pipe(responseContent) } else { // Since previous versions didn't check for Content-Encoding header, // ignore any invalid values to preserve backwards-compatibility if (contentEncoding !== 'identity') { debug('ignoring unrecognized Content-Encoding ' + contentEncoding) } responseContent = response } } else { responseContent = response } if (self.encoding) { if (self.dests.length !== 0) { console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') } else { responseContent.setEncoding(self.encoding) } } if (self._paused) { responseContent.pause() } self.responseContent = responseContent self.emit('response', response) self.dests.forEach(function (dest) { self.pipeDest(dest) }) responseContent.on('data', function (chunk) { if (self.timing && !self.responseStarted) { self.responseStartTime = (new Date()).getTime() // NOTE: responseStartTime is deprecated in favor of .timings response.responseStartTime = self.responseStartTime } self._destdata = true self.emit('data', chunk) }) responseContent.once('end', function (chunk) { self.emit('end', chunk) }) responseContent.on('error', function (error) { self.emit('error', error) }) responseContent.on('close', function () { self.emit('close') }) if (self.callback) { self.readResponseBody(response) } else { // if no callback self.on('end', function () { if (self._aborted) { debug('aborted', self.uri.href) return } self.emit('complete', response) }) } } debug('finish init function', self.uri.href) } Request.prototype.readResponseBody = function (response) { var self = this debug("reading response's body") var buffers = [] var bufferLength = 0 var strings = [] self.on('data', function (chunk) { if (!Buffer.isBuffer(chunk)) { strings.push(chunk) } else if (chunk.length) { bufferLength += chunk.length buffers.push(chunk) } }) self.on('end', function () { debug('end event', self.uri.href) if (self._aborted) { debug('aborted', self.uri.href) // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. // This can lead to leaky behavior if the user retains a reference to the request object. buffers = [] bufferLength = 0 return } if (bufferLength) { debug('has body', self.uri.href, bufferLength) response.body = Buffer.concat(buffers, bufferLength) if (self.encoding !== null) { response.body = response.body.toString(self.encoding) } // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. // This can lead to leaky behavior if the user retains a reference to the request object. buffers = [] bufferLength = 0 } else if (strings.length) { // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { strings[0] = strings[0].substring(1) } response.body = strings.join('') } if (self._json) { try { response.body = JSON.parse(response.body, self._jsonReviver) } catch (e) { debug('invalid JSON received', self.uri.href) } } debug('emitting complete', self.uri.href) if (typeof response.body === 'undefined' && !self._json) { response.body = self.encoding === null ? Buffer.alloc(0) : '' } self.emit('complete', response, response.body) }) } Request.prototype.abort = function () { var self = this self._aborted = true if (self.req) { self.req.abort() } else if (self.response) { self.response.destroy() } self.clearTimeout() self.emit('abort') } Request.prototype.pipeDest = function (dest) { var self = this var response = self.response // Called after the response is received if (dest.headers && !dest.headersSent) { if (response.caseless.has('content-type')) { var ctname = response.caseless.has('content-type') if (dest.setHeader) { dest.setHeader(ctname, response.headers[ctname]) } else { dest.headers[ctname] = response.headers[ctname] } } if (response.caseless.has('content-length')) { var clname = response.caseless.has('content-length') if (dest.setHeader) { dest.setHeader(clname, response.headers[clname]) } else { dest.headers[clname] = response.headers[clname] } } } if (dest.setHeader && !dest.headersSent) { for (var i in response.headers) { // If the response content is being decoded, the Content-Encoding header // of the response doesn't represent the piped content, so don't pass it. if (!self.gzip || i !== 'content-encoding') { dest.setHeader(i, response.headers[i]) } } dest.statusCode = response.statusCode } if (self.pipefilter) { self.pipefilter(response, dest) } } Request.prototype.qs = function (q, clobber) { var self = this var base if (!clobber && self.uri.query) { base = self._qs.parse(self.uri.query) } else { base = {} } for (var i in q) { base[i] = q[i] } var qs = self._qs.stringify(base) if (qs === '') { return self } self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) self.url = self.uri self.path = self.uri.path if (self.uri.host === 'unix') { self.enableUnixSocket() } return self } Request.prototype.form = function (form) { var self = this if (form) { if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { self.setHeader('content-type', 'application/x-www-form-urlencoded') } self.body = (typeof form === 'string') ? self._qs.rfc3986(form.toString('utf8')) : self._qs.stringify(form).toString('utf8') return self } // create form-data object self._form = new FormData() self._form.on('error', function (err) { err.message = 'form-data: ' + err.message self.emit('error', err) self.abort() }) return self._form } Request.prototype.multipart = function (multipart) { var self = this self._multipart.onRequest(multipart) if (!self._multipart.chunked) { self.body = self._multipart.body } return self } Request.prototype.json = function (val) { var self = this if (!self.hasHeader('accept')) { self.setHeader('accept', 'application/json') } if (typeof self.jsonReplacer === 'function') { self._jsonReplacer = self.jsonReplacer } self._json = true if (typeof val === 'boolean') { if (self.body !== undefined) { if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { self.body = safeStringify(self.body, self._jsonReplacer) } else { self.body = self._qs.rfc3986(self.body) } if (!self.hasHeader('content-type')) { self.setHeader('content-type', 'application/json') } } } else { self.body = safeStringify(val, self._jsonReplacer) if (!self.hasHeader('content-type')) { self.setHeader('content-type', 'application/json') } } if (typeof self.jsonReviver === 'function') { self._jsonReviver = self.jsonReviver } return self } Request.prototype.getHeader = function (name, headers) { var self = this var result, re, match if (!headers) { headers = self.headers } Object.keys(headers).forEach(function (key) { if (key.length !== name.length) { return } re = new RegExp(name, 'i') match = key.match(re) if (match) { result = headers[key] } }) return result } Request.prototype.enableUnixSocket = function () { // Get the socket & request paths from the URL var unixParts = this.uri.path.split(':') var host = unixParts[0] var path = unixParts[1] // Apply unix properties to request this.socketPath = host this.uri.pathname = path this.uri.path = path this.uri.host = host this.uri.hostname = host this.uri.isUnix = true } Request.prototype.auth = function (user, pass, sendImmediately, bearer) { var self = this self._auth.onRequest(user, pass, sendImmediately, bearer) return self } Request.prototype.aws = function (opts, now) { var self = this if (!now) { self._aws = opts return self } if (opts.sign_version === 4 || opts.sign_version === '4') { // use aws4 var options = { host: self.uri.host, path: self.uri.path, method: self.method, headers: self.headers, body: self.body } if (opts.service) { options.service = opts.service } var signRes = aws4.sign(options, { accessKeyId: opts.key, secretAccessKey: opts.secret, sessionToken: opts.session }) self.setHeader('authorization', signRes.headers.Authorization) self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) if (signRes.headers['X-Amz-Security-Token']) { self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token']) } } else { // default: use aws-sign2 var date = new Date() self.setHeader('date', date.toUTCString()) var auth = { key: opts.key, secret: opts.secret, verb: self.method.toUpperCase(), date: date, contentType: self.getHeader('content-type') || '', md5: self.getHeader('content-md5') || '', amazonHeaders: aws2.canonicalizeHeaders(self.headers) } var path = self.uri.path if (opts.bucket && path) { auth.resource = '/' + opts.bucket + path } else if (opts.bucket && !path) { auth.resource = '/' + opts.bucket } else if (!opts.bucket && path) { auth.resource = path } else if (!opts.bucket && !path) { auth.resource = '/' } auth.resource = aws2.canonicalizeResource(auth.resource) self.setHeader('authorization', aws2.authorization(auth)) } return self } Request.prototype.httpSignature = function (opts) { var self = this httpSignature.signRequest({ getHeader: function (header) { return self.getHeader(header, self.headers) }, setHeader: function (header, value) { self.setHeader(header, value) }, method: self.method, path: self.path }, opts) debug('httpSignature authorization', self.getHeader('authorization')) return self } Request.prototype.hawk = function (opts) { var self = this self.setHeader('Authorization', hawk.header(self.uri, self.method, opts)) } Request.prototype.oauth = function (_oauth) { var self = this self._oauth.onRequest(_oauth) return self } Request.prototype.jar = function (jar) { var self = this var cookies if (self._redirect.redirectsFollowed === 0) { self.originalCookieHeader = self.getHeader('cookie') } if (!jar) { // disable cookies cookies = false self._disableCookies = true } else { var targetCookieJar = jar.getCookieString ? jar : globalCookieJar var urihref = self.uri.href // fetch cookie in the Specified host if (targetCookieJar) { cookies = targetCookieJar.getCookieString(urihref) } } // if need cookie and cookie is not empty if (cookies && cookies.length) { if (self.originalCookieHeader) { // Don't overwrite existing Cookie header self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) } else { self.setHeader('cookie', cookies) } } self._jar = jar return self } // Stream API Request.prototype.pipe = function (dest, opts) { var self = this if (self.response) { if (self._destdata) { self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) } else if (self._ended) { self.emit('error', new Error('You cannot pipe after the response has been ended.')) } else { stream.Stream.prototype.pipe.call(self, dest, opts) self.pipeDest(dest) return dest } } else { self.dests.push(dest) stream.Stream.prototype.pipe.call(self, dest, opts) return dest } } Request.prototype.write = function () { var self = this if (self._aborted) { return } if (!self._started) { self.start() } if (self.req) { return self.req.write.apply(self.req, arguments) } } Request.prototype.end = function (chunk) { var self = this if (self._aborted) { return } if (chunk) { self.write(chunk) } if (!self._started) { self.start() } if (self.req) { self.req.end() } } Request.prototype.pause = function () { var self = this if (!self.responseContent) { self._paused = true } else { self.responseContent.pause.apply(self.responseContent, arguments) } } Request.prototype.resume = function () { var self = this if (!self.responseContent) { self._paused = false } else { self.responseContent.resume.apply(self.responseContent, arguments) } } Request.prototype.destroy = function () { var self = this this.clearTimeout() if (!self._ended) { self.end() } else if (self.response) { self.response.destroy() } } Request.prototype.clearTimeout = function () { if (this.timeoutTimer) { clearTimeout(this.timeoutTimer) this.timeoutTimer = null } } Request.defaultProxyHeaderWhiteList = Tunnel.defaultProxyHeaderWhiteList.slice() Request.defaultProxyHeaderExclusiveList = Tunnel.defaultProxyHeaderExclusiveList.slice() // Exports Request.prototype.toJSON = requestToJSON module.exports = Request /***/ }), /***/ 9004: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const Readable = __webpack_require__(92413).Readable; const lowercaseKeys = __webpack_require__(9662); class Response extends Readable { constructor(statusCode, headers, body, url) { if (typeof statusCode !== 'number') { throw new TypeError('Argument `statusCode` should be a number'); } if (typeof headers !== 'object') { throw new TypeError('Argument `headers` should be an object'); } if (!(body instanceof Buffer)) { throw new TypeError('Argument `body` should be a buffer'); } if (typeof url !== 'string') { throw new TypeError('Argument `url` should be a string'); } super(); this.statusCode = statusCode; this.headers = lowercaseKeys(headers); this.body = body; this.url = url; } _read() { this.push(this.body); this.push(null); } } module.exports = Response; /***/ }), /***/ 21867: /***/ ((module, exports, __webpack_require__) => { /*! safe-buffer. MIT License. Feross Aboukhadijeh */ /* eslint-disable node/no-deprecated-api */ var buffer = __webpack_require__(64293) var Buffer = buffer.Buffer // alternative to using Object.keys for old browsers function copyProps (src, dst) { for (var key in src) { dst[key] = src[key] } } if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { module.exports = buffer } else { // Copy properties from require('buffer') copyProps(buffer, exports) exports.Buffer = SafeBuffer } function SafeBuffer (arg, encodingOrOffset, length) { return Buffer(arg, encodingOrOffset, length) } SafeBuffer.prototype = Object.create(Buffer.prototype) // Copy static methods from Buffer copyProps(Buffer, SafeBuffer) SafeBuffer.from = function (arg, encodingOrOffset, length) { if (typeof arg === 'number') { throw new TypeError('Argument must not be a number') } return Buffer(arg, encodingOrOffset, length) } SafeBuffer.alloc = function (size, fill, encoding) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number') } var buf = Buffer(size) if (fill !== undefined) { if (typeof encoding === 'string') { buf.fill(fill, encoding) } else { buf.fill(fill) } } else { buf.fill(0) } return buf } SafeBuffer.allocUnsafe = function (size) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number') } return Buffer(size) } SafeBuffer.allocUnsafeSlow = function (size) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number') } return buffer.SlowBuffer(size) } /***/ }), /***/ 15118: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable node/no-deprecated-api */ var buffer = __webpack_require__(64293) var Buffer = buffer.Buffer var safer = {} var key for (key in buffer) { if (!buffer.hasOwnProperty(key)) continue if (key === 'SlowBuffer' || key === 'Buffer') continue safer[key] = buffer[key] } var Safer = safer.Buffer = {} for (key in Buffer) { if (!Buffer.hasOwnProperty(key)) continue if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue Safer[key] = Buffer[key] } safer.Buffer.prototype = Buffer.prototype if (!Safer.from || Safer.from === Uint8Array.from) { Safer.from = function (value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) } if (value && typeof value.length === 'undefined') { throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) } return Buffer(value, encodingOrOffset, length) } } if (!Safer.alloc) { Safer.alloc = function (size, fill, encoding) { if (typeof size !== 'number') { throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) } if (size < 0 || size >= 2 * (1 << 30)) { throw new RangeError('The value "' + size + '" is invalid for option "size"') } var buf = Buffer(size) if (!fill || fill.length === 0) { buf.fill(0) } else if (typeof encoding === 'string') { buf.fill(fill, encoding) } else { buf.fill(fill) } return buf } } if (!safer.kStringMaxLength) { try { safer.kStringMaxLength = process.binding('buffer').kStringMaxLength } catch (e) { // we can't determine kStringMaxLength in environments where process.binding // is unsupported, so let's not set it } } if (!safer.constants) { safer.constants = { MAX_LENGTH: safer.kMaxLength } if (safer.kStringMaxLength) { safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength } } module.exports = safer /***/ }), /***/ 91532: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const ANY = Symbol('SemVer ANY') // hoisted class for cyclic dependency class Comparator { static get ANY () { return ANY } constructor (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 } } 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) } parse (comp) { const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] const m = comp.match(r) if (!m) { throw new TypeError(`Invalid comparator: ${comp}`) } this.operator = m[1] !== undefined ? 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) } } toString () { return this.value } test (version) { debug('Comparator.test', version, this.options.loose) if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { try { version = new SemVer(version, this.options) } catch (er) { return false } } return cmp(version, this.operator, this.semver, this.options) } intersects (comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError('a Comparator is required') } if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (this.operator === '') { if (this.value === '') { return true } return new Range(comp.value, options).test(this.value) } else if (comp.operator === '') { if (comp.value === '') { return true } return new Range(this.value, options).test(comp.semver) } const sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>') const sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<') const sameSemVer = this.semver.version === comp.semver.version const differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=') const oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<') const oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>') return ( sameDirectionIncreasing || sameDirectionDecreasing || (sameSemVer && differentDirectionsInclusive) || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan ) } } module.exports = Comparator const {re, t} = __webpack_require__(9523) const cmp = __webpack_require__(75098) const debug = __webpack_require__(50427) const SemVer = __webpack_require__(48088) const Range = __webpack_require__(9828) /***/ }), /***/ 9828: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // hoisted class for cyclic dependency class Range { constructor (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) { // just put it in the set and return this.raw = range.value this.set = [[range]] this.format() return this } 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 the range to a 2d array of comparators .map(range => this.parseRange(range.trim())) // throw out any comparator lists that are empty // this generally means that it was not a valid range, which is allowed // in loose mode, but will still throw if the WHOLE range is invalid. .filter(c => c.length) if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${range}`) } this.format() } format () { this.range = this.set .map((comps) => { return comps.join(' ').trim() }) .join('||') .trim() return this.range } toString () { return this.range } parseRange (range) { const loose = this.options.loose range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) debug('comparator trim', range, re[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` range = range.replace(re[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` range = range.replace(re[t.CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') // At this point, the range is completely trimmed and // ready to be split into comparators. const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] return range .split(' ') .map(comp => parseComparator(comp, this.options)) .join(' ') .split(/\s+/) .map(comp => replaceGTE0(comp, this.options)) // in loose mode, throw out any that are not valid comparators .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) .map(comp => new Comparator(comp, this.options)) } intersects (range, options) { if (!(range instanceof Range)) { throw new TypeError('a Range is required') } return this.set.some((thisComparators) => { return ( isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return ( isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options) }) }) ) }) ) }) } // if ANY of the sets match ALL of its comparators, then pass test (version) { if (!version) { return false } if (typeof version === 'string') { try { version = new SemVer(version, this.options) } catch (er) { return false } } for (let i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true } } return false } } module.exports = Range const Comparator = __webpack_require__(91532) const debug = __webpack_require__(50427) const SemVer = __webpack_require__(48088) const { re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = __webpack_require__(9523) // take a set of comparators and determine whether there // exists a version which can satisfy it const isSatisfiable = (comparators, options) => { let result = true const remainingComparators = comparators.slice() let testComparator = remainingComparators.pop() while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options) }) testComparator = remainingComparators.pop() } return result } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. const 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 } const isX = id => !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-0 // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((comp) => { return replaceTilde(comp, options) }).join(' ') const replaceTilde = (comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] return comp.replace(r, (_, M, m, p, pr) => { debug('tilde', comp, _, M, m, p, pr) let ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = `>=${M}.0.0 <${+M + 1}.0.0-0` } else if (isX(p)) { // ~1.2 == >=1.2.0 <1.3.0-0 ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` } else if (pr) { debug('replaceTilde pr', pr) ret = `>=${M}.${m}.${p}-${pr } <${M}.${+m + 1}.0-0` } else { // ~1.2.3 == >=1.2.3 <1.3.0-0 ret = `>=${M}.${m}.${p } <${M}.${+m + 1}.0-0` } debug('tilde return', ret) return ret }) } // ^ --> * (any, kinda silly) // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 // ^1.2.3 --> >=1.2.3 <2.0.0-0 // ^1.2.0 --> >=1.2.0 <2.0.0-0 const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((comp) => { return replaceCaret(comp, options) }).join(' ') const replaceCaret = (comp, options) => { debug('caret', comp, options) const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] const z = options.includePrerelease ? '-0' : '' return comp.replace(r, (_, M, m, p, pr) => { debug('caret', comp, _, M, m, p, pr) let ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` } else if (isX(p)) { if (M === '0') { ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` } else { ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` } } else if (pr) { debug('replaceCaret pr', pr) if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p}-${pr } <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p}-${pr } <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p}-${pr } <${+M + 1}.0.0-0` } } else { debug('no pr') if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p }${z} <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p }${z} <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p } <${+M + 1}.0.0-0` } } debug('caret return', ret) return ret }) } const replaceXRanges = (comp, options) => { debug('replaceXRanges', comp, options) return comp.split(/\s+/).map((comp) => { return replaceXRange(comp, options) }).join(' ') } const replaceXRange = (comp, options) => { comp = comp.trim() const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug('xRange', comp, ret, gtlt, M, m, p, pr) const xM = isX(M) const xm = xM || isX(m) const xp = xm || isX(p) const anyX = xp if (gtlt === '=' && anyX) { gtlt = '' } // if we're including prereleases in the match, then we need // to fix this to -0, the lowest possible prerelease value pr = options.includePrerelease ? '-0' : '' if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed ret = '<0.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 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 } } if (gtlt === '<') pr = '-0' ret = `${gtlt + M}.${m}.${p}${pr}` } else if (xm) { ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` } else if (xp) { ret = `>=${M}.${m}.0${pr } <${M}.${+m + 1}.0-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. const replaceStars = (comp, options) => { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! return comp.trim().replace(re[t.STAR], '') } const replaceGTE0 = (comp, options) => { debug('replaceGTE0', comp, options) return comp.trim() .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') } // This function is passed to string.replace(re[t.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-0 Any 3.4.x will do // 1.2 - 3.4 => >=1.2.0 <3.5.0-0 const hyphenReplace = incPr => ($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${incPr ? '-0' : ''}` } else if (isX(fp)) { from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` } else if (fpr) { from = `>=${from}` } else { from = `>=${from}${incPr ? '-0' : ''}` } if (isX(tM)) { to = '' } else if (isX(tm)) { to = `<${+tM + 1}.0.0-0` } else if (isX(tp)) { to = `<${tM}.${+tm + 1}.0-0` } else if (tpr) { to = `<=${tM}.${tm}.${tp}-${tpr}` } else if (incPr) { to = `<${tM}.${tm}.${+tp + 1}-0` } else { to = `<=${to}` } return (`${from} ${to}`).trim() } const testSet = (set, version, options) => { for (let 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 (let i = 0; i < set.length; i++) { debug(set[i].semver) if (set[i].semver === Comparator.ANY) { continue } if (set[i].semver.prerelease.length > 0) { const 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 } /***/ }), /***/ 48088: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const debug = __webpack_require__(50427) const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(42293) const { re, t } = __webpack_require__(9523) const { compareIdentifiers } = __webpack_require__(92463) class SemVer { constructor (version, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (version instanceof SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { 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` ) } debug('SemVer', version, options) this.options = options this.loose = !!options.loose // this isn't actually relevant for versions, but keep it so that we // don't run into trouble passing this.options around. this.includePrerelease = !!options.includePrerelease const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.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((id) => { if (/^[0-9]+$/.test(id)) { const num = +id if (num >= 0 && num < MAX_SAFE_INTEGER) { return num } } return id }) } this.build = m[5] ? m[5].split('.') : [] this.format() } format () { this.version = `${this.major}.${this.minor}.${this.patch}` if (this.prerelease.length) { this.version += `-${this.prerelease.join('.')}` } return this.version } toString () { return this.version } compare (other) { debug('SemVer.compare', this.version, this.options, other) if (!(other instanceof SemVer)) { if (typeof other === 'string' && other === this.version) { return 0 } other = new SemVer(other, this.options) } if (other.version === this.version) { return 0 } return this.compareMain(other) || this.comparePre(other) } compareMain (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) ) } comparePre (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 } let i = 0 do { const a = this.prerelease[i] const 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) } compareBuild (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } let i = 0 do { const a = this.build[i] const b = other.build[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. inc (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 { let 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 } } module.exports = SemVer /***/ }), /***/ 48848: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(75925) const clean = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ''), options) return s ? s.version : null } module.exports = clean /***/ }), /***/ 75098: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const eq = __webpack_require__(91898) const neq = __webpack_require__(6017) const gt = __webpack_require__(84123) const gte = __webpack_require__(15522) const lt = __webpack_require__(80194) const lte = __webpack_require__(77520) const 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}`) } } module.exports = cmp /***/ }), /***/ 13466: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const parse = __webpack_require__(75925) const {re, t} = __webpack_require__(9523) const coerce = (version, options) => { if (version instanceof SemVer) { return version } if (typeof version === 'number') { version = String(version) } if (typeof version !== 'string') { return null } options = options || {} let match = null if (!options.rtl) { match = version.match(re[t.COERCE]) } else { // Find the right-most coercible string that does not share // a terminus with a more left-ward coercible string. // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' // // Walk through the string checking with a /g regexp // Manually set the index so as to pick up overlapping matches. // Stop when we get a match that ends at the string end, since no // coercible string can be more right-ward without the same terminus. let next while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length) ) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length } // leave it in a clean state re[t.COERCERTL].lastIndex = -1 } if (match === null) return null return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) } module.exports = coerce /***/ }), /***/ 92156: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const compareBuild = (a, b, loose) => { const versionA = new SemVer(a, loose) const versionB = new SemVer(b, loose) return versionA.compare(versionB) || versionA.compareBuild(versionB) } module.exports = compareBuild /***/ }), /***/ 62804: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const compareLoose = (a, b) => compare(a, b, true) module.exports = compareLoose /***/ }), /***/ 44309: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)) module.exports = compare /***/ }), /***/ 64297: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(75925) const eq = __webpack_require__(91898) const diff = (version1, version2) => { if (eq(version1, version2)) { return null } else { const v1 = parse(version1) const v2 = parse(version2) const hasPre = v1.prerelease.length || v2.prerelease.length const prefix = hasPre ? 'pre' : '' const defaultResult = hasPre ? 'prerelease' : '' for (const key in v1) { if (key === 'major' || key === 'minor' || key === 'patch') { if (v1[key] !== v2[key]) { return prefix + key } } } return defaultResult // may be undefined } } module.exports = diff /***/ }), /***/ 91898: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const eq = (a, b, loose) => compare(a, b, loose) === 0 module.exports = eq /***/ }), /***/ 84123: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const gt = (a, b, loose) => compare(a, b, loose) > 0 module.exports = gt /***/ }), /***/ 15522: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const gte = (a, b, loose) => compare(a, b, loose) >= 0 module.exports = gte /***/ }), /***/ 30900: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const inc = (version, release, options, identifier) => { if (typeof (options) === 'string') { identifier = options options = undefined } try { return new SemVer(version, options).inc(release, identifier).version } catch (er) { return null } } module.exports = inc /***/ }), /***/ 80194: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const lt = (a, b, loose) => compare(a, b, loose) < 0 module.exports = lt /***/ }), /***/ 77520: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const lte = (a, b, loose) => compare(a, b, loose) <= 0 module.exports = lte /***/ }), /***/ 76688: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const major = (a, loose) => new SemVer(a, loose).major module.exports = major /***/ }), /***/ 38447: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const minor = (a, loose) => new SemVer(a, loose).minor module.exports = minor /***/ }), /***/ 6017: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const neq = (a, b, loose) => compare(a, b, loose) !== 0 module.exports = neq /***/ }), /***/ 75925: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const {MAX_LENGTH} = __webpack_require__(42293) const { re, t } = __webpack_require__(9523) const SemVer = __webpack_require__(48088) const 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 } const r = options.loose ? re[t.LOOSE] : re[t.FULL] if (!r.test(version)) { return null } try { return new SemVer(version, options) } catch (er) { return null } } module.exports = parse /***/ }), /***/ 42866: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const patch = (a, loose) => new SemVer(a, loose).patch module.exports = patch /***/ }), /***/ 24016: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(75925) const prerelease = (version, options) => { const parsed = parse(version, options) return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } module.exports = prerelease /***/ }), /***/ 76417: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(44309) const rcompare = (a, b, loose) => compare(b, a, loose) module.exports = rcompare /***/ }), /***/ 8701: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compareBuild = __webpack_require__(92156) const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) module.exports = rsort /***/ }), /***/ 6055: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(9828) const satisfies = (version, range, options) => { try { range = new Range(range, options) } catch (er) { return false } return range.test(version) } module.exports = satisfies /***/ }), /***/ 61426: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compareBuild = __webpack_require__(92156) const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) module.exports = sort /***/ }), /***/ 19601: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(75925) const valid = (version, options) => { const v = parse(version, options) return v ? v.version : null } module.exports = valid /***/ }), /***/ 11383: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // just pre-load all the stuff that index.js lazily exports const internalRe = __webpack_require__(9523) module.exports = { re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: __webpack_require__(42293).SEMVER_SPEC_VERSION, SemVer: __webpack_require__(48088), compareIdentifiers: __webpack_require__(92463).compareIdentifiers, rcompareIdentifiers: __webpack_require__(92463).rcompareIdentifiers, parse: __webpack_require__(75925), valid: __webpack_require__(19601), clean: __webpack_require__(48848), inc: __webpack_require__(30900), diff: __webpack_require__(64297), major: __webpack_require__(76688), minor: __webpack_require__(38447), patch: __webpack_require__(42866), prerelease: __webpack_require__(24016), compare: __webpack_require__(44309), rcompare: __webpack_require__(76417), compareLoose: __webpack_require__(62804), compareBuild: __webpack_require__(92156), sort: __webpack_require__(61426), rsort: __webpack_require__(8701), gt: __webpack_require__(84123), lt: __webpack_require__(80194), eq: __webpack_require__(91898), neq: __webpack_require__(6017), gte: __webpack_require__(15522), lte: __webpack_require__(77520), cmp: __webpack_require__(75098), coerce: __webpack_require__(13466), Comparator: __webpack_require__(91532), Range: __webpack_require__(9828), satisfies: __webpack_require__(6055), toComparators: __webpack_require__(52706), maxSatisfying: __webpack_require__(20579), minSatisfying: __webpack_require__(10832), minVersion: __webpack_require__(34179), validRange: __webpack_require__(2098), outside: __webpack_require__(60420), gtr: __webpack_require__(9380), ltr: __webpack_require__(33323), intersects: __webpack_require__(27008), simplifyRange: __webpack_require__(75297), subset: __webpack_require__(7863), } /***/ }), /***/ 42293: /***/ ((module) => { // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. const SEMVER_SPEC_VERSION = '2.0.0' const MAX_LENGTH = 256 const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. const MAX_SAFE_COMPONENT_LENGTH = 16 module.exports = { SEMVER_SPEC_VERSION, MAX_LENGTH, MAX_SAFE_INTEGER, MAX_SAFE_COMPONENT_LENGTH } /***/ }), /***/ 50427: /***/ ((module) => { const debug = ( typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ) ? (...args) => console.error('SEMVER', ...args) : () => {} module.exports = debug /***/ }), /***/ 92463: /***/ ((module) => { const numeric = /^[0-9]+$/ const compareIdentifiers = (a, b) => { const anum = numeric.test(a) const 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 } const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) module.exports = { compareIdentifiers, rcompareIdentifiers } /***/ }), /***/ 9523: /***/ ((module, exports, __webpack_require__) => { const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(42293) const debug = __webpack_require__(50427) exports = module.exports = {} // The actual regexps go on exports.re const re = exports.re = [] const src = exports.src = [] const t = exports.t = {} let R = 0 const createToken = (name, value, isGlobal) => { const index = R++ debug(index, value) t[name] = index src[index] = value re[index] = new RegExp(value, isGlobal ? 'g' : undefined) } // 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. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') createToken('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. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') // ## Main Version // Three dot-separated numeric identifiers. createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`) createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] }|${src[t.NONNUMERICIDENTIFIER]})`) createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] }|${src[t.NONNUMERICIDENTIFIER]})`) // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] }(?:\\.${src[t.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. createToken('FULLPLAIN', `v?${src[t.MAINVERSION] }${src[t.PRERELEASE]}?${ src[t.BUILD]}?`) createToken('FULL', `^${src[t.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. createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] }${src[t.PRERELEASELOOSE]}?${ src[t.BUILD]}?`) createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) createToken('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. createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${ src[t.BUILD]}?` + `)?)?`) createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${ src[t.BUILD]}?` + `)?)?`) createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) // Coercion. // Extract anything that could conceivably be a part of a valid semver createToken('COERCE', `${'(^|[^\\d])' + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:$|[^\\d])`) createToken('COERCERTL', src[t.COERCE], true) // Tilde ranges. // Meaning is "reasonably at or greater than" createToken('LONETILDE', '(?:~>?)') createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) exports.tildeTrimReplace = '$1~' createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) // Caret ranges. // Meaning is "at least and backwards compatible with" createToken('LONECARET', '(?:\\^)') createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) exports.caretTrimReplace = '$1^' createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) // A simple gt/lt/eq thing, or just "" to indicate "any version" createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) exports.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. createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`) createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`) // Star ranges basically just allow anything at all. createToken('STAR', '(<|>)?=?\\s*\\*') // >=0.0.0 is like a star createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') /***/ }), /***/ 9380: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Determine if version is greater than all the versions possible in the range. const outside = __webpack_require__(60420) const gtr = (version, range, options) => outside(version, range, '>', options) module.exports = gtr /***/ }), /***/ 27008: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(9828) const intersects = (r1, r2, options) => { r1 = new Range(r1, options) r2 = new Range(r2, options) return r1.intersects(r2) } module.exports = intersects /***/ }), /***/ 33323: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const outside = __webpack_require__(60420) // Determine if version is less than all the versions possible in the range const ltr = (version, range, options) => outside(version, range, '<', options) module.exports = ltr /***/ }), /***/ 20579: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const Range = __webpack_require__(9828) const maxSatisfying = (versions, range, options) => { let max = null let maxSV = null let rangeObj = null try { rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach((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 } module.exports = maxSatisfying /***/ }), /***/ 10832: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const Range = __webpack_require__(9828) const minSatisfying = (versions, range, options) => { let min = null let minSV = null let rangeObj = null try { rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach((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 } module.exports = minSatisfying /***/ }), /***/ 34179: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const Range = __webpack_require__(9828) const gt = __webpack_require__(84123) const minVersion = (range, loose) => { range = new Range(range, loose) let 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 (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] comparators.forEach((comparator) => { // Clone to avoid manipulating the comparator's semver object. const 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 } module.exports = minVersion /***/ }), /***/ 60420: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(48088) const Comparator = __webpack_require__(91532) const {ANY} = Comparator const Range = __webpack_require__(9828) const satisfies = __webpack_require__(6055) const gt = __webpack_require__(84123) const lt = __webpack_require__(80194) const lte = __webpack_require__(77520) const gte = __webpack_require__(15522) const outside = (version, range, hilo, options) => { version = new SemVer(version, options) range = new Range(range, options) let 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 (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] let high = null let low = null comparators.forEach((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 } module.exports = outside /***/ }), /***/ 75297: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // given a set of versions and a range, create a "simplified" range // that includes the same versions that the original range does // If the original range is shorter than the simplified one, return that. const satisfies = __webpack_require__(6055) const compare = __webpack_require__(44309) module.exports = (versions, range, options) => { const set = [] let min = null let prev = null const v = versions.sort((a, b) => compare(a, b, options)) for (const version of v) { const included = satisfies(version, range, options) if (included) { prev = version if (!min) min = version } else { if (prev) { set.push([min, prev]) } prev = null min = null } } if (min) set.push([min, null]) const ranges = [] for (const [min, max] of set) { if (min === max) ranges.push(min) else if (!max && min === v[0]) ranges.push('*') else if (!max) ranges.push(`>=${min}`) else if (min === v[0]) ranges.push(`<=${max}`) else ranges.push(`${min} - ${max}`) } const simplified = ranges.join(' || ') const original = typeof range.raw === 'string' ? range.raw : String(range) return simplified.length < original.length ? simplified : range } /***/ }), /***/ 7863: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(9828) const { ANY } = __webpack_require__(91532) const satisfies = __webpack_require__(6055) const compare = __webpack_require__(44309) // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: // - Every simple range `r1, r2, ...` is a subset of some `R1, R2, ...` // // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: // - If c is only the ANY comparator // - If C is only the ANY comparator, return true // - Else return false // - Let EQ be the set of = comparators in c // - If EQ is more than one, return true (null set) // - Let GT be the highest > or >= comparator in c // - Let LT be the lowest < or <= comparator in c // - If GT and LT, and GT.semver > LT.semver, return true (null set) // - If EQ // - If GT, and EQ does not satisfy GT, return true (null set) // - If LT, and EQ does not satisfy LT, return true (null set) // - If EQ satisfies every C, return true // - Else return false // - If GT // - If GT is lower than any > or >= comp in C, return false // - If GT is >=, and GT.semver does not satisfy every C, return false // - If LT // - If LT.semver is greater than that of any > comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false // - If any C is a = range, and GT or LT are set, return false // - Else return true const subset = (sub, dom, options) => { sub = new Range(sub, options) dom = new Range(dom, options) let sawNonNull = false OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options) sawNonNull = sawNonNull || isSub !== null if (isSub) continue OUTER } // the null set is a subset of everything, but null simple ranges in // a complex range should be ignored. so if we saw a non-null range, // then we know this isn't a subset, but if EVERY simple range was null, // then it is a subset. if (sawNonNull) return false } return true } const simpleSubset = (sub, dom, options) => { if (sub.length === 1 && sub[0].semver === ANY) return dom.length === 1 && dom[0].semver === ANY const eqSet = new Set() let gt, lt for (const c of sub) { if (c.operator === '>' || c.operator === '>=') gt = higherGT(gt, c, options) else if (c.operator === '<' || c.operator === '<=') lt = lowerLT(lt, c, options) else eqSet.add(c.semver) } if (eqSet.size > 1) return null let gtltComp if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options) if (gtltComp > 0) return null else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null } // will iterate one or zero times for (const eq of eqSet) { if (gt && !satisfies(eq, String(gt), options)) return null if (lt && !satisfies(eq, String(lt), options)) return null for (const c of dom) { if (!satisfies(eq, String(c), options)) return false } return true } let higher, lower let hasDomLT, hasDomGT for (const c of dom) { hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' if (gt) { if (c.operator === '>' || c.operator === '>=') { higher = higherGT(gt, c, options) if (higher === c) return false } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) return false } if (lt) { if (c.operator === '<' || c.operator === '<=') { lower = lowerLT(lt, c, options) if (lower === c) return false } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) return false } if (!c.operator && (lt || gt) && gtltComp !== 0) return false } // if there was a < or >, and nothing in the dom, then must be false // UNLESS it was limited by another range in the other direction. // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 if (gt && hasDomLT && !lt && gtltComp !== 0) return false if (lt && hasDomGT && !gt && gtltComp !== 0) return false return true } // >=1.2.3 is lower than >1.2.3 const higherGT = (a, b, options) => { if (!a) return b const comp = compare(a.semver, b.semver, options) return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a } // <=1.2.3 is higher than <1.2.3 const lowerLT = (a, b, options) => { if (!a) return b const comp = compare(a.semver, b.semver, options) return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a } module.exports = subset /***/ }), /***/ 52706: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(9828) // Mostly just for testing and legacy API reasons const toComparators = (range, options) => new Range(range, options).set .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) module.exports = toComparators /***/ }), /***/ 2098: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(9828) const 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 } } module.exports = validRange /***/ }), /***/ 45123: /***/ ((module) => { module.exports = [ 'cat', 'cd', 'chmod', 'cp', 'dirs', 'echo', 'exec', 'find', 'grep', 'head', 'ln', 'ls', 'mkdir', 'mv', 'pwd', 'rm', 'sed', 'set', 'sort', 'tail', 'tempdir', 'test', 'to', 'toEnd', 'touch', 'uniq', 'which', ]; /***/ }), /***/ 33516: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { // // ShellJS // Unix shell commands on top of Node's API // // Copyright (c) 2012 Artur Adib // http://github.com/shelljs/shelljs // function __ncc_wildcard$0 (arg) { if (arg === "cat.js" || arg === "cat") return __webpack_require__(30271); else if (arg === "cd.js" || arg === "cd") return __webpack_require__(42051); else if (arg === "chmod.js" || arg === "chmod") return __webpack_require__(24975); else if (arg === "common.js" || arg === "common") return __webpack_require__(53687); else if (arg === "cp.js" || arg === "cp") return __webpack_require__(34932); else if (arg === "dirs.js" || arg === "dirs") return __webpack_require__(41178); else if (arg === "echo.js" || arg === "echo") return __webpack_require__(10243); else if (arg === "error.js" || arg === "error") return __webpack_require__(10232); else if (arg === "exec-child.js" || arg === "exec-child") return __webpack_require__(69607); else if (arg === "exec.js" || arg === "exec") return __webpack_require__(10896); else if (arg === "find.js" || arg === "find") return __webpack_require__(47838); else if (arg === "grep.js" || arg === "grep") return __webpack_require__(17417); else if (arg === "head.js" || arg === "head") return __webpack_require__(6613); else if (arg === "ln.js" || arg === "ln") return __webpack_require__(15787); else if (arg === "ls.js" || arg === "ls") return __webpack_require__(35561); else if (arg === "mkdir.js" || arg === "mkdir") return __webpack_require__(72695); else if (arg === "mv.js" || arg === "mv") return __webpack_require__(39849); else if (arg === "popd.js" || arg === "popd") return __webpack_require__(50227); else if (arg === "pushd.js" || arg === "pushd") return __webpack_require__(44177); else if (arg === "pwd.js" || arg === "pwd") return __webpack_require__(58553); else if (arg === "rm.js" || arg === "rm") return __webpack_require__(22830); else if (arg === "sed.js" || arg === "sed") return __webpack_require__(25899); else if (arg === "set.js" || arg === "set") return __webpack_require__(11411); else if (arg === "sort.js" || arg === "sort") return __webpack_require__(72116); else if (arg === "tail.js" || arg === "tail") return __webpack_require__(42284); else if (arg === "tempdir.js" || arg === "tempdir") return __webpack_require__(76150); else if (arg === "test.js" || arg === "test") return __webpack_require__(79723); else if (arg === "to.js" || arg === "to") return __webpack_require__(71961); else if (arg === "toEnd.js" || arg === "toEnd") return __webpack_require__(33736); else if (arg === "touch.js" || arg === "touch") return __webpack_require__(28358); else if (arg === "uniq.js" || arg === "uniq") return __webpack_require__(77286); else if (arg === "which.js" || arg === "which") return __webpack_require__(64766); } var common = __webpack_require__(53687); //@ //@ All commands run synchronously, unless otherwise stated. //@ All commands accept standard bash globbing characters (`*`, `?`, etc.), //@ compatible with the [node `glob` module](https://github.com/isaacs/node-glob). //@ //@ For less-commonly used commands and features, please check out our [wiki //@ page](https://github.com/shelljs/shelljs/wiki). //@ // Include the docs for all the default commands //@commands // Load all default commands __webpack_require__(45123).forEach(function (command) { __ncc_wildcard$0(command); }); //@ //@ ### exit(code) //@ //@ Exits the current process with the given exit `code`. exports.exit = process.exit; //@include ./src/error exports.error = __webpack_require__(10232); //@include ./src/common exports.ShellString = common.ShellString; //@ //@ ### env['VAR_NAME'] //@ //@ Object containing environment variables (both getter and setter). Shortcut //@ to `process.env`. exports.env = process.env; //@ //@ ### Pipes //@ //@ Examples: //@ //@ ```javascript //@ grep('foo', 'file1.txt', 'file2.txt').sed(/o/g, 'a').to('output.txt'); //@ echo('files with o\'s in the name:\n' + ls().grep('o')); //@ cat('test.js').exec('node'); // pipe to exec() call //@ ``` //@ //@ Commands can send their output to another command in a pipe-like fashion. //@ `sed`, `grep`, `cat`, `exec`, `to`, and `toEnd` can appear on the right-hand //@ side of a pipe. Pipes can be chained. //@ //@ ## Configuration //@ exports.config = common.config; //@ //@ ### config.silent //@ //@ Example: //@ //@ ```javascript //@ var sh = require('shelljs'); //@ var silentState = sh.config.silent; // save old silent state //@ sh.config.silent = true; //@ /* ... */ //@ sh.config.silent = silentState; // restore old silent state //@ ``` //@ //@ Suppresses all command output if `true`, except for `echo()` calls. //@ Default is `false`. //@ //@ ### config.fatal //@ //@ Example: //@ //@ ```javascript //@ require('shelljs/global'); //@ config.fatal = true; // or set('-e'); //@ cp('this_file_does_not_exist', '/dev/null'); // throws Error here //@ /* more commands... */ //@ ``` //@ //@ If `true`, the script will throw a Javascript error when any shell.js //@ command encounters an error. Default is `false`. This is analogous to //@ Bash's `set -e`. //@ //@ ### config.verbose //@ //@ Example: //@ //@ ```javascript //@ config.verbose = true; // or set('-v'); //@ cd('dir/'); //@ rm('-rf', 'foo.txt', 'bar.txt'); //@ exec('echo hello'); //@ ``` //@ //@ Will print each command as follows: //@ //@ ``` //@ cd dir/ //@ rm -rf foo.txt bar.txt //@ exec echo hello //@ ``` //@ //@ ### config.globOptions //@ //@ Example: //@ //@ ```javascript //@ config.globOptions = {nodir: true}; //@ ``` //@ //@ Use this value for calls to `glob.sync()` instead of the default options. //@ //@ ### config.reset() //@ //@ Example: //@ //@ ```javascript //@ var shell = require('shelljs'); //@ // Make changes to shell.config, and do stuff... //@ /* ... */ //@ shell.config.reset(); // reset to original state //@ // Do more stuff, but with original settings //@ /* ... */ //@ ``` //@ //@ Reset `shell.config` to the defaults: //@ //@ ```javascript //@ { //@ fatal: false, //@ globOptions: {}, //@ maxdepth: 255, //@ noglob: false, //@ silent: false, //@ verbose: false, //@ } //@ ``` /***/ }), /***/ 30271: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('cat', _cat, { canReceivePipe: true, cmdOptions: { 'n': 'number', }, }); //@ //@ ### cat([options,] file [, file ...]) //@ ### cat([options,] file_array) //@ //@ Available options: //@ //@ + `-n`: number all output lines //@ //@ Examples: //@ //@ ```javascript //@ var str = cat('file*.txt'); //@ var str = cat('file1', 'file2'); //@ var str = cat(['file1', 'file2']); // same as above //@ ``` //@ //@ Returns a string containing the given file, or a concatenated string //@ containing the files if more than one file is given (a new line character is //@ introduced between each file). function _cat(options, files) { var cat = common.readFromPipe(); if (!files && !cat) common.error('no paths given'); files = [].slice.call(arguments, 1); files.forEach(function (file) { if (!fs.existsSync(file)) { common.error('no such file or directory: ' + file); } else if (common.statFollowLinks(file).isDirectory()) { common.error(file + ': Is a directory'); } cat += fs.readFileSync(file, 'utf8'); }); if (options.number) { cat = addNumbers(cat); } return cat; } module.exports = _cat; function addNumbers(cat) { var lines = cat.split('\n'); var lastLine = lines.pop(); lines = lines.map(function (line, i) { return numberedLine(i + 1, line); }); if (lastLine.length) { lastLine = numberedLine(lines.length + 1, lastLine); } lines.push(lastLine); return lines.join('\n'); } function numberedLine(n, line) { // GNU cat use six pad start number + tab. See http://lingrok.org/xref/coreutils/src/cat.c#57 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart var number = (' ' + n).slice(-6) + '\t'; return number + line; } /***/ }), /***/ 42051: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var os = __webpack_require__(12087); var common = __webpack_require__(53687); common.register('cd', _cd, {}); //@ //@ ### cd([dir]) //@ //@ Changes to directory `dir` for the duration of the script. Changes to home //@ directory if no argument is supplied. function _cd(options, dir) { if (!dir) dir = os.homedir(); if (dir === '-') { if (!process.env.OLDPWD) { common.error('could not find previous directory'); } else { dir = process.env.OLDPWD; } } try { var curDir = process.cwd(); process.chdir(dir); process.env.OLDPWD = curDir; } catch (e) { // something went wrong, let's figure out the error var err; try { common.statFollowLinks(dir); // if this succeeds, it must be some sort of file err = 'not a directory: ' + dir; } catch (e2) { err = 'no such file or directory: ' + dir; } if (err) common.error(err); } return ''; } module.exports = _cd; /***/ }), /***/ 24975: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); var path = __webpack_require__(85622); var PERMS = (function (base) { return { OTHER_EXEC: base.EXEC, OTHER_WRITE: base.WRITE, OTHER_READ: base.READ, GROUP_EXEC: base.EXEC << 3, GROUP_WRITE: base.WRITE << 3, GROUP_READ: base.READ << 3, OWNER_EXEC: base.EXEC << 6, OWNER_WRITE: base.WRITE << 6, OWNER_READ: base.READ << 6, // Literal octal numbers are apparently not allowed in "strict" javascript. STICKY: parseInt('01000', 8), SETGID: parseInt('02000', 8), SETUID: parseInt('04000', 8), TYPE_MASK: parseInt('0770000', 8), }; }({ EXEC: 1, WRITE: 2, READ: 4, })); common.register('chmod', _chmod, { }); //@ //@ ### chmod([options,] octal_mode || octal_string, file) //@ ### chmod([options,] symbolic_mode, file) //@ //@ Available options: //@ //@ + `-v`: output a diagnostic for every file processed//@ //@ + `-c`: like verbose, but report only when a change is made//@ //@ + `-R`: change files and directories recursively//@ //@ //@ Examples: //@ //@ ```javascript //@ chmod(755, '/Users/brandon'); //@ chmod('755', '/Users/brandon'); // same as above //@ chmod('u+x', '/Users/brandon'); //@ chmod('-R', 'a-w', '/Users/brandon'); //@ ``` //@ //@ Alters the permissions of a file or directory by either specifying the //@ absolute permissions in octal form or expressing the changes in symbols. //@ This command tries to mimic the POSIX behavior as much as possible. //@ Notable exceptions: //@ //@ + In symbolic modes, `a-r` and `-r` are identical. No consideration is //@ given to the `umask`. //@ + There is no "quiet" option, since default behavior is to run silent. function _chmod(options, mode, filePattern) { if (!filePattern) { if (options.length > 0 && options.charAt(0) === '-') { // Special case where the specified file permissions started with - to subtract perms, which // get picked up by the option parser as command flags. // If we are down by one argument and options starts with -, shift everything over. [].unshift.call(arguments, ''); } else { common.error('You must specify a file.'); } } options = common.parseOptions(options, { 'R': 'recursive', 'c': 'changes', 'v': 'verbose', }); filePattern = [].slice.call(arguments, 2); var files; // TODO: replace this with a call to common.expand() if (options.recursive) { files = []; filePattern.forEach(function addFile(expandedFile) { var stat = common.statNoFollowLinks(expandedFile); if (!stat.isSymbolicLink()) { files.push(expandedFile); if (stat.isDirectory()) { // intentionally does not follow symlinks. fs.readdirSync(expandedFile).forEach(function (child) { addFile(expandedFile + '/' + child); }); } } }); } else { files = filePattern; } files.forEach(function innerChmod(file) { file = path.resolve(file); if (!fs.existsSync(file)) { common.error('File not found: ' + file); } // When recursing, don't follow symlinks. if (options.recursive && common.statNoFollowLinks(file).isSymbolicLink()) { return; } var stat = common.statFollowLinks(file); var isDir = stat.isDirectory(); var perms = stat.mode; var type = perms & PERMS.TYPE_MASK; var newPerms = perms; if (isNaN(parseInt(mode, 8))) { // parse options mode.split(',').forEach(function (symbolicMode) { var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; var matches = pattern.exec(symbolicMode); if (matches) { var applyTo = matches[1]; var operator = matches[2]; var change = matches[3]; var changeOwner = applyTo.indexOf('u') !== -1 || applyTo === 'a' || applyTo === ''; var changeGroup = applyTo.indexOf('g') !== -1 || applyTo === 'a' || applyTo === ''; var changeOther = applyTo.indexOf('o') !== -1 || applyTo === 'a' || applyTo === ''; var changeRead = change.indexOf('r') !== -1; var changeWrite = change.indexOf('w') !== -1; var changeExec = change.indexOf('x') !== -1; var changeExecDir = change.indexOf('X') !== -1; var changeSticky = change.indexOf('t') !== -1; var changeSetuid = change.indexOf('s') !== -1; if (changeExecDir && isDir) { changeExec = true; } var mask = 0; if (changeOwner) { mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); } if (changeGroup) { mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); } if (changeOther) { mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); } // Sticky bit is special - it's not tied to user, group or other. if (changeSticky) { mask |= PERMS.STICKY; } switch (operator) { case '+': newPerms |= mask; break; case '-': newPerms &= ~mask; break; case '=': newPerms = type + mask; // According to POSIX, when using = to explicitly set the // permissions, setuid and setgid can never be cleared. if (common.statFollowLinks(file).isDirectory()) { newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; } break; default: common.error('Could not recognize operator: `' + operator + '`'); } if (options.verbose) { console.log(file + ' -> ' + newPerms.toString(8)); } if (perms !== newPerms) { if (!options.verbose && options.changes) { console.log(file + ' -> ' + newPerms.toString(8)); } fs.chmodSync(file, newPerms); perms = newPerms; // for the next round of changes! } } else { common.error('Invalid symbolic mode change: ' + symbolicMode); } }); } else { // they gave us a full number newPerms = type + parseInt(mode, 8); // POSIX rules are that setuid and setgid can only be added using numeric // form, but not cleared. if (common.statFollowLinks(file).isDirectory()) { newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; } fs.chmodSync(file, newPerms); } }); return ''; } module.exports = _chmod; /***/ }), /***/ 53687: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; // Ignore warning about 'new String()' /* eslint no-new-wrappers: 0 */ var os = __webpack_require__(12087); var fs = __webpack_require__(35747); var glob = __webpack_require__(91957); var shell = __webpack_require__(33516); var shellMethods = Object.create(shell); exports.extend = Object.assign; // Check if we're running under electron var isElectron = Boolean(process.versions.electron); // Module globals (assume no execPath by default) var DEFAULT_CONFIG = { fatal: false, globOptions: {}, maxdepth: 255, noglob: false, silent: false, verbose: false, execPath: null, bufLength: 64 * 1024, // 64KB }; var config = { reset: function () { Object.assign(this, DEFAULT_CONFIG); if (!isElectron) { this.execPath = process.execPath; } }, resetForTesting: function () { this.reset(); this.silent = true; }, }; config.reset(); exports.config = config; // Note: commands should generally consider these as read-only values. var state = { error: null, errorCode: 0, currentCmd: 'shell.js', }; exports.state = state; delete process.env.OLDPWD; // initially, there's no previous directory // Reliably test if something is any sort of javascript object function isObject(a) { return typeof a === 'object' && a !== null; } exports.isObject = isObject; function log() { /* istanbul ignore next */ if (!config.silent) { console.error.apply(console, arguments); } } exports.log = log; // Converts strings to be equivalent across all platforms. Primarily responsible // for making sure we use '/' instead of '\' as path separators, but this may be // expanded in the future if necessary function convertErrorOutput(msg) { if (typeof msg !== 'string') { throw new TypeError('input must be a string'); } return msg.replace(/\\/g, '/'); } exports.convertErrorOutput = convertErrorOutput; // Shows error message. Throws if config.fatal is true function error(msg, _code, options) { // Validate input if (typeof msg !== 'string') throw new Error('msg must be a string'); var DEFAULT_OPTIONS = { continue: false, code: 1, prefix: state.currentCmd + ': ', silent: false, }; if (typeof _code === 'number' && isObject(options)) { options.code = _code; } else if (isObject(_code)) { // no 'code' options = _code; } else if (typeof _code === 'number') { // no 'options' options = { code: _code }; } else if (typeof _code !== 'number') { // only 'msg' options = {}; } options = Object.assign({}, DEFAULT_OPTIONS, options); if (!state.errorCode) state.errorCode = options.code; var logEntry = convertErrorOutput(options.prefix + msg); state.error = state.error ? state.error + '\n' : ''; state.error += logEntry; // Throw an error, or log the entry if (config.fatal) throw new Error(logEntry); if (msg.length > 0 && !options.silent) log(logEntry); if (!options.continue) { throw { msg: 'earlyExit', retValue: (new ShellString('', state.error, state.errorCode)), }; } } exports.error = error; //@ //@ ### ShellString(str) //@ //@ Examples: //@ //@ ```javascript //@ var foo = ShellString('hello world'); //@ ``` //@ //@ Turns a regular string into a string-like object similar to what each //@ command returns. This has special methods, like `.to()` and `.toEnd()`. function ShellString(stdout, stderr, code) { var that; if (stdout instanceof Array) { that = stdout; that.stdout = stdout.join('\n'); if (stdout.length > 0) that.stdout += '\n'; } else { that = new String(stdout); that.stdout = stdout; } that.stderr = stderr; that.code = code; // A list of all commands that can appear on the right-hand side of a pipe // (populated by calls to common.wrap()) pipeMethods.forEach(function (cmd) { that[cmd] = shellMethods[cmd].bind(that); }); return that; } exports.ShellString = ShellString; // Returns {'alice': true, 'bob': false} when passed a string and dictionary as follows: // parseOptions('-a', {'a':'alice', 'b':'bob'}); // Returns {'reference': 'string-value', 'bob': false} when passed two dictionaries of the form: // parseOptions({'-r': 'string-value'}, {'r':'reference', 'b':'bob'}); // Throws an error when passed a string that does not start with '-': // parseOptions('a', {'a':'alice'}); // throws function parseOptions(opt, map, errorOptions) { // Validate input if (typeof opt !== 'string' && !isObject(opt)) { throw new Error('options must be strings or key-value pairs'); } else if (!isObject(map)) { throw new Error('parseOptions() internal error: map must be an object'); } else if (errorOptions && !isObject(errorOptions)) { throw new Error('parseOptions() internal error: errorOptions must be object'); } if (opt === '--') { // This means there are no options. return {}; } // All options are false by default var options = {}; Object.keys(map).forEach(function (letter) { var optName = map[letter]; if (optName[0] !== '!') { options[optName] = false; } }); if (opt === '') return options; // defaults if (typeof opt === 'string') { if (opt[0] !== '-') { throw new Error("Options string must start with a '-'"); } // e.g. chars = ['R', 'f'] var chars = opt.slice(1).split(''); chars.forEach(function (c) { if (c in map) { var optionName = map[c]; if (optionName[0] === '!') { options[optionName.slice(1)] = false; } else { options[optionName] = true; } } else { error('option not recognized: ' + c, errorOptions || {}); } }); } else { // opt is an Object Object.keys(opt).forEach(function (key) { // key is a string of the form '-r', '-d', etc. var c = key[1]; if (c in map) { var optionName = map[c]; options[optionName] = opt[key]; // assign the given value } else { error('option not recognized: ' + c, errorOptions || {}); } }); } return options; } exports.parseOptions = parseOptions; // Expands wildcards with matching (ie. existing) file names. // For example: // expand(['file*.js']) = ['file1.js', 'file2.js', ...] // (if the files 'file1.js', 'file2.js', etc, exist in the current dir) function expand(list) { if (!Array.isArray(list)) { throw new TypeError('must be an array'); } var expanded = []; list.forEach(function (listEl) { // Don't expand non-strings if (typeof listEl !== 'string') { expanded.push(listEl); } else { var ret; try { ret = glob.sync(listEl, config.globOptions); // if nothing matched, interpret the string literally ret = ret.length > 0 ? ret : [listEl]; } catch (e) { // if glob fails, interpret the string literally ret = [listEl]; } expanded = expanded.concat(ret); } }); return expanded; } exports.expand = expand; // Normalizes Buffer creation, using Buffer.alloc if possible. // Also provides a good default buffer length for most use cases. var buffer = typeof Buffer.alloc === 'function' ? function (len) { return Buffer.alloc(len || config.bufLength); } : function (len) { return new Buffer(len || config.bufLength); }; exports.buffer = buffer; // Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. // file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 function unlinkSync(file) { try { fs.unlinkSync(file); } catch (e) { // Try to override file permission /* istanbul ignore next */ if (e.code === 'EPERM') { fs.chmodSync(file, '0666'); fs.unlinkSync(file); } else { throw e; } } } exports.unlinkSync = unlinkSync; // wrappers around common.statFollowLinks and common.statNoFollowLinks that clarify intent // and improve readability function statFollowLinks() { return fs.statSync.apply(fs, arguments); } exports.statFollowLinks = statFollowLinks; function statNoFollowLinks() { return fs.lstatSync.apply(fs, arguments); } exports.statNoFollowLinks = statNoFollowLinks; // e.g. 'shelljs_a5f185d0443ca...' function randomFileName() { function randomHash(count) { if (count === 1) { return parseInt(16 * Math.random(), 10).toString(16); } var hash = ''; for (var i = 0; i < count; i++) { hash += randomHash(1); } return hash; } return 'shelljs_' + randomHash(20); } exports.randomFileName = randomFileName; // Common wrapper for all Unix-like commands that performs glob expansion, // command-logging, and other nice things function wrap(cmd, fn, options) { options = options || {}; return function () { var retValue = null; state.currentCmd = cmd; state.error = null; state.errorCode = 0; try { var args = [].slice.call(arguments, 0); // Log the command to stderr, if appropriate if (config.verbose) { console.error.apply(console, [cmd].concat(args)); } // If this is coming from a pipe, let's set the pipedValue (otherwise, set // it to the empty string) state.pipedValue = (this && typeof this.stdout === 'string') ? this.stdout : ''; if (options.unix === false) { // this branch is for exec() retValue = fn.apply(this, args); } else { // and this branch is for everything else if (isObject(args[0]) && args[0].constructor.name === 'Object') { // a no-op, allowing the syntax `touch({'-r': file}, ...)` } else if (args.length === 0 || typeof args[0] !== 'string' || args[0].length <= 1 || args[0][0] !== '-') { args.unshift(''); // only add dummy option if '-option' not already present } // flatten out arrays that are arguments, to make the syntax: // `cp([file1, file2, file3], dest);` // equivalent to: // `cp(file1, file2, file3, dest);` args = args.reduce(function (accum, cur) { if (Array.isArray(cur)) { return accum.concat(cur); } accum.push(cur); return accum; }, []); // Convert ShellStrings (basically just String objects) to regular strings args = args.map(function (arg) { if (isObject(arg) && arg.constructor.name === 'String') { return arg.toString(); } return arg; }); // Expand the '~' if appropriate var homeDir = os.homedir(); args = args.map(function (arg) { if (typeof arg === 'string' && arg.slice(0, 2) === '~/' || arg === '~') { return arg.replace(/^~/, homeDir); } return arg; }); // Perform glob-expansion on all arguments after globStart, but preserve // the arguments before it (like regexes for sed and grep) if (!config.noglob && options.allowGlobbing === true) { args = args.slice(0, options.globStart).concat(expand(args.slice(options.globStart))); } try { // parse options if options are provided if (isObject(options.cmdOptions)) { args[0] = parseOptions(args[0], options.cmdOptions); } retValue = fn.apply(this, args); } catch (e) { /* istanbul ignore else */ if (e.msg === 'earlyExit') { retValue = e.retValue; } else { throw e; // this is probably a bug that should be thrown up the call stack } } } } catch (e) { /* istanbul ignore next */ if (!state.error) { // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug... e.name = 'ShellJSInternalError'; throw e; } if (config.fatal) throw e; } if (options.wrapOutput && (typeof retValue === 'string' || Array.isArray(retValue))) { retValue = new ShellString(retValue, state.error, state.errorCode); } state.currentCmd = 'shell.js'; return retValue; }; } // wrap exports.wrap = wrap; // This returns all the input that is piped into the current command (or the // empty string, if this isn't on the right-hand side of a pipe function _readFromPipe() { return state.pipedValue; } exports.readFromPipe = _readFromPipe; var DEFAULT_WRAP_OPTIONS = { allowGlobbing: true, canReceivePipe: false, cmdOptions: null, globStart: 1, pipeOnly: false, wrapOutput: true, unix: true, }; // This is populated during plugin registration var pipeMethods = []; // Register a new ShellJS command function _register(name, implementation, wrapOptions) { wrapOptions = wrapOptions || {}; // Validate options Object.keys(wrapOptions).forEach(function (option) { if (!DEFAULT_WRAP_OPTIONS.hasOwnProperty(option)) { throw new Error("Unknown option '" + option + "'"); } if (typeof wrapOptions[option] !== typeof DEFAULT_WRAP_OPTIONS[option]) { throw new TypeError("Unsupported type '" + typeof wrapOptions[option] + "' for option '" + option + "'"); } }); // If an option isn't specified, use the default wrapOptions = Object.assign({}, DEFAULT_WRAP_OPTIONS, wrapOptions); if (shell.hasOwnProperty(name)) { throw new Error('Command `' + name + '` already exists'); } if (wrapOptions.pipeOnly) { wrapOptions.canReceivePipe = true; shellMethods[name] = wrap(name, implementation, wrapOptions); } else { shell[name] = wrap(name, implementation, wrapOptions); } if (wrapOptions.canReceivePipe) { pipeMethods.push(name); } } exports.register = _register; /***/ }), /***/ 34932: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var fs = __webpack_require__(35747); var path = __webpack_require__(85622); var common = __webpack_require__(53687); common.register('cp', _cp, { cmdOptions: { 'f': '!no_force', 'n': 'no_force', 'u': 'update', 'R': 'recursive', 'r': 'recursive', 'L': 'followsymlink', 'P': 'noFollowsymlink', }, wrapOutput: false, }); // Buffered file copy, synchronous // (Using readFileSync() + writeFileSync() could easily cause a memory overflow // with large files) function copyFileSync(srcFile, destFile, options) { if (!fs.existsSync(srcFile)) { common.error('copyFileSync: no such file or directory: ' + srcFile); } var isWindows = process.platform === 'win32'; // Check the mtimes of the files if the '-u' flag is provided try { if (options.update && common.statFollowLinks(srcFile).mtime < fs.statSync(destFile).mtime) { return; } } catch (e) { // If we're here, destFile probably doesn't exist, so just do a normal copy } if (common.statNoFollowLinks(srcFile).isSymbolicLink() && !options.followsymlink) { try { common.statNoFollowLinks(destFile); common.unlinkSync(destFile); // re-link it } catch (e) { // it doesn't exist, so no work needs to be done } var symlinkFull = fs.readlinkSync(srcFile); fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); } else { var buf = common.buffer(); var bufLength = buf.length; var bytesRead = bufLength; var pos = 0; var fdr = null; var fdw = null; try { fdr = fs.openSync(srcFile, 'r'); } catch (e) { /* istanbul ignore next */ common.error('copyFileSync: could not read src file (' + srcFile + ')'); } try { fdw = fs.openSync(destFile, 'w'); } catch (e) { /* istanbul ignore next */ common.error('copyFileSync: could not write to dest file (code=' + e.code + '):' + destFile); } while (bytesRead === bufLength) { bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos); fs.writeSync(fdw, buf, 0, bytesRead); pos += bytesRead; } fs.closeSync(fdr); fs.closeSync(fdw); fs.chmodSync(destFile, common.statFollowLinks(srcFile).mode); } } // Recursively copies 'sourceDir' into 'destDir' // Adapted from https://github.com/ryanmcgrath/wrench-js // // Copyright (c) 2010 Ryan McGrath // Copyright (c) 2012 Artur Adib // // Licensed under the MIT License // http://www.opensource.org/licenses/mit-license.php function cpdirSyncRecursive(sourceDir, destDir, currentDepth, opts) { if (!opts) opts = {}; // Ensure there is not a run away recursive copy if (currentDepth >= common.config.maxdepth) return; currentDepth++; var isWindows = process.platform === 'win32'; // Create the directory where all our junk is moving to; read the mode of the // source directory and mirror it try { fs.mkdirSync(destDir); } catch (e) { // if the directory already exists, that's okay if (e.code !== 'EEXIST') throw e; } var files = fs.readdirSync(sourceDir); for (var i = 0; i < files.length; i++) { var srcFile = sourceDir + '/' + files[i]; var destFile = destDir + '/' + files[i]; var srcFileStat = common.statNoFollowLinks(srcFile); var symlinkFull; if (opts.followsymlink) { if (cpcheckcycle(sourceDir, srcFile)) { // Cycle link found. console.error('Cycle link found.'); symlinkFull = fs.readlinkSync(srcFile); fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); continue; } } if (srcFileStat.isDirectory()) { /* recursion this thing right on back. */ cpdirSyncRecursive(srcFile, destFile, currentDepth, opts); } else if (srcFileStat.isSymbolicLink() && !opts.followsymlink) { symlinkFull = fs.readlinkSync(srcFile); try { common.statNoFollowLinks(destFile); common.unlinkSync(destFile); // re-link it } catch (e) { // it doesn't exist, so no work needs to be done } fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); } else if (srcFileStat.isSymbolicLink() && opts.followsymlink) { srcFileStat = common.statFollowLinks(srcFile); if (srcFileStat.isDirectory()) { cpdirSyncRecursive(srcFile, destFile, currentDepth, opts); } else { copyFileSync(srcFile, destFile, opts); } } else { /* At this point, we've hit a file actually worth copying... so copy it on over. */ if (fs.existsSync(destFile) && opts.no_force) { common.log('skipping existing file: ' + files[i]); } else { copyFileSync(srcFile, destFile, opts); } } } // for files // finally change the mode for the newly created directory (otherwise, we // couldn't add files to a read-only directory). var checkDir = common.statFollowLinks(sourceDir); fs.chmodSync(destDir, checkDir.mode); } // cpdirSyncRecursive // Checks if cureent file was created recently function checkRecentCreated(sources, index) { var lookedSource = sources[index]; return sources.slice(0, index).some(function (src) { return path.basename(src) === path.basename(lookedSource); }); } function cpcheckcycle(sourceDir, srcFile) { var srcFileStat = common.statNoFollowLinks(srcFile); if (srcFileStat.isSymbolicLink()) { // Do cycle check. For example: // $ mkdir -p 1/2/3/4 // $ cd 1/2/3/4 // $ ln -s ../../3 link // $ cd ../../../.. // $ cp -RL 1 copy var cyclecheck = common.statFollowLinks(srcFile); if (cyclecheck.isDirectory()) { var sourcerealpath = fs.realpathSync(sourceDir); var symlinkrealpath = fs.realpathSync(srcFile); var re = new RegExp(symlinkrealpath); if (re.test(sourcerealpath)) { return true; } } } return false; } //@ //@ ### cp([options,] source [, source ...], dest) //@ ### cp([options,] source_array, dest) //@ //@ Available options: //@ //@ + `-f`: force (default behavior) //@ + `-n`: no-clobber //@ + `-u`: only copy if `source` is newer than `dest` //@ + `-r`, `-R`: recursive //@ + `-L`: follow symlinks //@ + `-P`: don't follow symlinks //@ //@ Examples: //@ //@ ```javascript //@ cp('file1', 'dir1'); //@ cp('-R', 'path/to/dir/', '~/newCopy/'); //@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); //@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above //@ ``` //@ //@ Copies files. function _cp(options, sources, dest) { // If we're missing -R, it actually implies -L (unless -P is explicit) if (options.followsymlink) { options.noFollowsymlink = false; } if (!options.recursive && !options.noFollowsymlink) { options.followsymlink = true; } // Get sources, dest if (arguments.length < 3) { common.error('missing and/or '); } else { sources = [].slice.call(arguments, 1, arguments.length - 1); dest = arguments[arguments.length - 1]; } var destExists = fs.existsSync(dest); var destStat = destExists && common.statFollowLinks(dest); // Dest is not existing dir, but multiple sources given if ((!destExists || !destStat.isDirectory()) && sources.length > 1) { common.error('dest is not a directory (too many sources)'); } // Dest is an existing file, but -n is given if (destExists && destStat.isFile() && options.no_force) { return new common.ShellString('', '', 0); } sources.forEach(function (src, srcIndex) { if (!fs.existsSync(src)) { if (src === '') src = "''"; // if src was empty string, display empty string common.error('no such file or directory: ' + src, { continue: true }); return; // skip file } var srcStat = common.statFollowLinks(src); if (!options.noFollowsymlink && srcStat.isDirectory()) { if (!options.recursive) { // Non-Recursive common.error("omitting directory '" + src + "'", { continue: true }); } else { // Recursive // 'cp /a/source dest' should create 'source' in 'dest' var newDest = (destStat && destStat.isDirectory()) ? path.join(dest, path.basename(src)) : dest; try { common.statFollowLinks(path.dirname(dest)); cpdirSyncRecursive(src, newDest, 0, { no_force: options.no_force, followsymlink: options.followsymlink }); } catch (e) { /* istanbul ignore next */ common.error("cannot create directory '" + dest + "': No such file or directory"); } } } else { // If here, src is a file // When copying to '/path/dir': // thisDest = '/path/dir/file1' var thisDest = dest; if (destStat && destStat.isDirectory()) { thisDest = path.normalize(dest + '/' + path.basename(src)); } var thisDestExists = fs.existsSync(thisDest); if (thisDestExists && checkRecentCreated(sources, srcIndex)) { // cannot overwrite file created recently in current execution, but we want to continue copying other files if (!options.no_force) { common.error("will not overwrite just-created '" + thisDest + "' with '" + src + "'", { continue: true }); } return; } if (thisDestExists && options.no_force) { return; // skip file } if (path.relative(src, thisDest) === '') { // a file cannot be copied to itself, but we want to continue copying other files common.error("'" + thisDest + "' and '" + src + "' are the same file", { continue: true }); return; } copyFileSync(src, thisDest, options); } }); // forEach(src) return new common.ShellString('', common.state.error, common.state.errorCode); } module.exports = _cp; /***/ }), /***/ 41178: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var common = __webpack_require__(53687); var _cd = __webpack_require__(42051); var path = __webpack_require__(85622); common.register('dirs', _dirs, { wrapOutput: false, }); common.register('pushd', _pushd, { wrapOutput: false, }); common.register('popd', _popd, { wrapOutput: false, }); // Pushd/popd/dirs internals var _dirStack = []; function _isStackIndex(index) { return (/^[\-+]\d+$/).test(index); } function _parseStackIndex(index) { if (_isStackIndex(index)) { if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd return (/^-/).test(index) ? Number(index) - 1 : Number(index); } common.error(index + ': directory stack index out of range'); } else { common.error(index + ': invalid number'); } } function _actualDirStack() { return [process.cwd()].concat(_dirStack); } //@ //@ ### pushd([options,] [dir | '-N' | '+N']) //@ //@ Available options: //@ //@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. //@ + `-q`: Supresses output to the console. //@ //@ Arguments: //@ //@ + `dir`: Sets the current working directory to the top of the stack, then executes the equivalent of `cd dir`. //@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. //@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. //@ //@ Examples: //@ //@ ```javascript //@ // process.cwd() === '/usr' //@ pushd('/etc'); // Returns /etc /usr //@ pushd('+1'); // Returns /usr /etc //@ ``` //@ //@ Save the current directory on the top of the directory stack and then `cd` to `dir`. With no arguments, `pushd` exchanges the top two directories. Returns an array of paths in the stack. function _pushd(options, dir) { if (_isStackIndex(options)) { dir = options; options = ''; } options = common.parseOptions(options, { 'n': 'no-cd', 'q': 'quiet', }); var dirs = _actualDirStack(); if (dir === '+0') { return dirs; // +0 is a noop } else if (!dir) { if (dirs.length > 1) { dirs = dirs.splice(1, 1).concat(dirs); } else { return common.error('no other directory'); } } else if (_isStackIndex(dir)) { var n = _parseStackIndex(dir); dirs = dirs.slice(n).concat(dirs.slice(0, n)); } else { if (options['no-cd']) { dirs.splice(1, 0, dir); } else { dirs.unshift(dir); } } if (options['no-cd']) { dirs = dirs.slice(1); } else { dir = path.resolve(dirs.shift()); _cd('', dir); } _dirStack = dirs; return _dirs(options.quiet ? '-q' : ''); } exports.pushd = _pushd; //@ //@ //@ ### popd([options,] ['-N' | '+N']) //@ //@ Available options: //@ //@ + `-n`: Suppress the normal directory change when removing directories from the stack, so that only the stack is manipulated. //@ + `-q`: Supresses output to the console. //@ //@ Arguments: //@ //@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. //@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. //@ //@ Examples: //@ //@ ```javascript //@ echo(process.cwd()); // '/usr' //@ pushd('/etc'); // '/etc /usr' //@ echo(process.cwd()); // '/etc' //@ popd(); // '/usr' //@ echo(process.cwd()); // '/usr' //@ ``` //@ //@ When no arguments are given, `popd` removes the top directory from the stack and performs a `cd` to the new top directory. The elements are numbered from 0, starting at the first directory listed with dirs (i.e., `popd` is equivalent to `popd +0`). Returns an array of paths in the stack. function _popd(options, index) { if (_isStackIndex(options)) { index = options; options = ''; } options = common.parseOptions(options, { 'n': 'no-cd', 'q': 'quiet', }); if (!_dirStack.length) { return common.error('directory stack empty'); } index = _parseStackIndex(index || '+0'); if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { index = index > 0 ? index - 1 : index; _dirStack.splice(index, 1); } else { var dir = path.resolve(_dirStack.shift()); _cd('', dir); } return _dirs(options.quiet ? '-q' : ''); } exports.popd = _popd; //@ //@ //@ ### dirs([options | '+N' | '-N']) //@ //@ Available options: //@ //@ + `-c`: Clears the directory stack by deleting all of the elements. //@ + `-q`: Supresses output to the console. //@ //@ Arguments: //@ //@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. //@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. //@ //@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if `+N` or `-N` was specified. //@ //@ See also: `pushd`, `popd` function _dirs(options, index) { if (_isStackIndex(options)) { index = options; options = ''; } options = common.parseOptions(options, { 'c': 'clear', 'q': 'quiet', }); if (options.clear) { _dirStack = []; return _dirStack; } var stack = _actualDirStack(); if (index) { index = _parseStackIndex(index); if (index < 0) { index = stack.length + index; } if (!options.quiet) { common.log(stack[index]); } return stack[index]; } if (!options.quiet) { common.log(stack.join(' ')); } return stack; } exports.dirs = _dirs; /***/ }), /***/ 10243: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var format = __webpack_require__(31669).format; var common = __webpack_require__(53687); common.register('echo', _echo, { allowGlobbing: false, }); //@ //@ ### echo([options,] string [, string ...]) //@ //@ Available options: //@ //@ + `-e`: interpret backslash escapes (default) //@ + `-n`: remove trailing newline from output //@ //@ Examples: //@ //@ ```javascript //@ echo('hello world'); //@ var str = echo('hello world'); //@ echo('-n', 'no newline at end'); //@ ``` //@ //@ Prints `string` to stdout, and returns string with additional utility methods //@ like `.to()`. function _echo(opts) { // allow strings starting with '-', see issue #20 var messages = [].slice.call(arguments, opts ? 0 : 1); var options = {}; // If the first argument starts with '-', parse it as options string. // If parseOptions throws, it wasn't an options string. try { options = common.parseOptions(messages[0], { 'e': 'escapes', 'n': 'no_newline', }, { silent: true, }); // Allow null to be echoed if (messages[0]) { messages.shift(); } } catch (_) { // Clear out error if an error occurred common.state.error = null; } var output = format.apply(null, messages); // Add newline if -n is not passed. if (!options.no_newline) { output += '\n'; } process.stdout.write(output); return output; } module.exports = _echo; /***/ }), /***/ 10232: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); //@ //@ ### error() //@ //@ Tests if error occurred in the last command. Returns a truthy value if an //@ error returned, or a falsy value otherwise. //@ //@ **Note**: do not rely on the //@ return value to be an error message. If you need the last error message, use //@ the `.stderr` attribute from the last command's return value instead. function error() { return common.state.error; } module.exports = error; /***/ }), /***/ 69607: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* module decorator */ module = __webpack_require__.nmd(module); if (require.main !== module) { throw new Error('This file should not be required'); } var childProcess = __webpack_require__(63129); var fs = __webpack_require__(35747); var paramFilePath = process.argv[2]; var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); var params = JSON.parse(serializedParams); var cmd = params.command; var execOptions = params.execOptions; var pipe = params.pipe; var stdoutFile = params.stdoutFile; var stderrFile = params.stderrFile; var c = childProcess.exec(cmd, execOptions, function (err) { if (!err) { process.exitCode = 0; } else if (err.code === undefined) { process.exitCode = 1; } else { process.exitCode = err.code; } }); var stdoutStream = fs.createWriteStream(stdoutFile); var stderrStream = fs.createWriteStream(stderrFile); c.stdout.pipe(stdoutStream); c.stderr.pipe(stderrStream); c.stdout.pipe(process.stdout); c.stderr.pipe(process.stderr); if (pipe) { c.stdin.end(pipe); } /***/ }), /***/ 10896: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var _tempDir = __webpack_require__(76150).tempDir; var _pwd = __webpack_require__(58553); var path = __webpack_require__(85622); var fs = __webpack_require__(35747); var child = __webpack_require__(63129); var DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024; var DEFAULT_ERROR_CODE = 1; common.register('exec', _exec, { unix: false, canReceivePipe: true, wrapOutput: false, }); // We use this function to run `exec` synchronously while also providing realtime // output. function execSync(cmd, opts, pipe) { if (!common.config.execPath) { common.error('Unable to find a path to the node binary. Please manually set config.execPath'); } var tempDir = _tempDir(); var paramsFile = path.resolve(tempDir + '/' + common.randomFileName()); var stderrFile = path.resolve(tempDir + '/' + common.randomFileName()); var stdoutFile = path.resolve(tempDir + '/' + common.randomFileName()); opts = common.extend({ silent: common.config.silent, cwd: _pwd().toString(), env: process.env, maxBuffer: DEFAULT_MAXBUFFER_SIZE, encoding: 'utf8', }, opts); if (fs.existsSync(paramsFile)) common.unlinkSync(paramsFile); if (fs.existsSync(stderrFile)) common.unlinkSync(stderrFile); if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); opts.cwd = path.resolve(opts.cwd); var paramsToSerialize = { command: cmd, execOptions: opts, pipe: pipe, stdoutFile: stdoutFile, stderrFile: stderrFile, }; fs.writeFileSync(paramsFile, JSON.stringify(paramsToSerialize), 'utf8'); var execArgs = [ __webpack_require__.ab + "exec-child.js", paramsFile, ]; /* istanbul ignore else */ if (opts.silent) { opts.stdio = 'ignore'; } else { opts.stdio = [0, 1, 2]; } var code = 0; // Welcome to the future try { // Bad things if we pass in a `shell` option to child_process.execFileSync, // so we need to explicitly remove it here. delete opts.shell; child.execFileSync(common.config.execPath, execArgs, opts); } catch (e) { // Commands with non-zero exit code raise an exception. code = e.status || DEFAULT_ERROR_CODE; } // fs.readFileSync uses buffer encoding by default, so call // it without the encoding option if the encoding is 'buffer'. // Also, if the exec timeout is too short for node to start up, // the files will not be created, so these calls will throw. var stdout = ''; var stderr = ''; if (opts.encoding === 'buffer') { stdout = fs.readFileSync(stdoutFile); stderr = fs.readFileSync(stderrFile); } else { stdout = fs.readFileSync(stdoutFile, opts.encoding); stderr = fs.readFileSync(stderrFile, opts.encoding); } // No biggie if we can't erase the files now -- they're in a temp dir anyway try { common.unlinkSync(paramsFile); } catch (e) {} try { common.unlinkSync(stderrFile); } catch (e) {} try { common.unlinkSync(stdoutFile); } catch (e) {} if (code !== 0) { // Note: `silent` should be unconditionally true to avoid double-printing // the command's stderr, and to avoid printing any stderr when the user has // set `shell.config.silent`. common.error(stderr, code, { continue: true, silent: true }); } var obj = common.ShellString(stdout, stderr, code); return obj; } // execSync() // Wrapper around exec() to enable echoing output to console in real time function execAsync(cmd, opts, pipe, callback) { opts = common.extend({ silent: common.config.silent, cwd: _pwd().toString(), env: process.env, maxBuffer: DEFAULT_MAXBUFFER_SIZE, encoding: 'utf8', }, opts); var c = child.exec(cmd, opts, function (err, stdout, stderr) { if (callback) { if (!err) { callback(0, stdout, stderr); } else if (err.code === undefined) { // See issue #536 /* istanbul ignore next */ callback(1, stdout, stderr); } else { callback(err.code, stdout, stderr); } } }); if (pipe) c.stdin.end(pipe); if (!opts.silent) { c.stdout.pipe(process.stdout); c.stderr.pipe(process.stderr); } return c; } //@ //@ ### exec(command [, options] [, callback]) //@ //@ Available options: //@ //@ + `async`: Asynchronous execution. If a callback is provided, it will be set to //@ `true`, regardless of the passed value (default: `false`). //@ + `silent`: Do not echo program output to console (default: `false`). //@ + `encoding`: Character encoding to use. Affects the values returned to stdout and stderr, and //@ what is written to stdout and stderr when not in silent mode (default: `'utf8'`). //@ + and any option available to Node.js's //@ [`child_process.exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) //@ //@ Examples: //@ //@ ```javascript //@ var version = exec('node --version', {silent:true}).stdout; //@ //@ var child = exec('some_long_running_process', {async:true}); //@ child.stdout.on('data', function(data) { //@ /* ... do something with data ... */ //@ }); //@ //@ exec('some_long_running_process', function(code, stdout, stderr) { //@ console.log('Exit code:', code); //@ console.log('Program output:', stdout); //@ console.log('Program stderr:', stderr); //@ }); //@ ``` //@ //@ Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous //@ mode, this returns a `ShellString` (compatible with ShellJS v0.6.x, which returns an object //@ of the form `{ code:..., stdout:... , stderr:... }`). Otherwise, this returns the child process //@ object, and the `callback` receives the arguments `(code, stdout, stderr)`. //@ //@ Not seeing the behavior you want? `exec()` runs everything through `sh` //@ by default (or `cmd.exe` on Windows), which differs from `bash`. If you //@ need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option. function _exec(command, options, callback) { options = options || {}; if (!command) common.error('must specify command'); var pipe = common.readFromPipe(); // Callback is defined instead of options. if (typeof options === 'function') { callback = options; options = { async: true }; } // Callback is defined with options. if (typeof options === 'object' && typeof callback === 'function') { options.async = true; } options = common.extend({ silent: common.config.silent, async: false, }, options); if (options.async) { return execAsync(command, options, pipe, callback); } else { return execSync(command, options, pipe); } } module.exports = _exec; /***/ }), /***/ 47838: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var path = __webpack_require__(85622); var common = __webpack_require__(53687); var _ls = __webpack_require__(35561); common.register('find', _find, {}); //@ //@ ### find(path [, path ...]) //@ ### find(path_array) //@ //@ Examples: //@ //@ ```javascript //@ find('src', 'lib'); //@ find(['src', 'lib']); // same as above //@ find('.').filter(function(file) { return file.match(/\.js$/); }); //@ ``` //@ //@ Returns array of all files (however deep) in the given paths. //@ //@ The main difference from `ls('-R', path)` is that the resulting file names //@ include the base directories (e.g., `lib/resources/file1` instead of just `file1`). function _find(options, paths) { if (!paths) { common.error('no path specified'); } else if (typeof paths === 'string') { paths = [].slice.call(arguments, 1); } var list = []; function pushFile(file) { if (process.platform === 'win32') { file = file.replace(/\\/g, '/'); } list.push(file); } // why not simply do `ls('-R', paths)`? because the output wouldn't give the base dirs // to get the base dir in the output, we need instead `ls('-R', 'dir/*')` for every directory paths.forEach(function (file) { var stat; try { stat = common.statFollowLinks(file); } catch (e) { common.error('no such file or directory: ' + file); } pushFile(file); if (stat.isDirectory()) { _ls({ recursive: true, all: true }, file).forEach(function (subfile) { pushFile(path.join(file, subfile)); }); } }); return list; } module.exports = _find; /***/ }), /***/ 17417: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('grep', _grep, { globStart: 2, // don't glob-expand the regex canReceivePipe: true, cmdOptions: { 'v': 'inverse', 'l': 'nameOnly', 'i': 'ignoreCase', }, }); //@ //@ ### grep([options,] regex_filter, file [, file ...]) //@ ### grep([options,] regex_filter, file_array) //@ //@ Available options: //@ //@ + `-v`: Invert `regex_filter` (only print non-matching lines). //@ + `-l`: Print only filenames of matching files. //@ + `-i`: Ignore case. //@ //@ Examples: //@ //@ ```javascript //@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); //@ grep('GLOBAL_VARIABLE', '*.js'); //@ ``` //@ //@ Reads input string from given files and returns a string containing all lines of the //@ file that match the given `regex_filter`. function _grep(options, regex, files) { // Check if this is coming from a pipe var pipe = common.readFromPipe(); if (!files && !pipe) common.error('no paths given', 2); files = [].slice.call(arguments, 2); if (pipe) { files.unshift('-'); } var grep = []; if (options.ignoreCase) { regex = new RegExp(regex, 'i'); } files.forEach(function (file) { if (!fs.existsSync(file) && file !== '-') { common.error('no such file or directory: ' + file, 2, { continue: true }); return; } var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); if (options.nameOnly) { if (contents.match(regex)) { grep.push(file); } } else { var lines = contents.split('\n'); lines.forEach(function (line) { var matched = line.match(regex); if ((options.inverse && !matched) || (!options.inverse && matched)) { grep.push(line); } }); } }); return grep.join('\n') + '\n'; } module.exports = _grep; /***/ }), /***/ 6613: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('head', _head, { canReceivePipe: true, cmdOptions: { 'n': 'numLines', }, }); // Reads |numLines| lines or the entire file, whichever is less. function readSomeLines(file, numLines) { var buf = common.buffer(); var bufLength = buf.length; var bytesRead = bufLength; var pos = 0; var fdr = fs.openSync(file, 'r'); var numLinesRead = 0; var ret = ''; while (bytesRead === bufLength && numLinesRead < numLines) { bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos); var bufStr = buf.toString('utf8', 0, bytesRead); numLinesRead += bufStr.split('\n').length - 1; ret += bufStr; pos += bytesRead; } fs.closeSync(fdr); return ret; } //@ //@ ### head([{'-n': \},] file [, file ...]) //@ ### head([{'-n': \},] file_array) //@ //@ Available options: //@ //@ + `-n `: Show the first `` lines of the files //@ //@ Examples: //@ //@ ```javascript //@ var str = head({'-n': 1}, 'file*.txt'); //@ var str = head('file1', 'file2'); //@ var str = head(['file1', 'file2']); // same as above //@ ``` //@ //@ Read the start of a file. function _head(options, files) { var head = []; var pipe = common.readFromPipe(); if (!files && !pipe) common.error('no paths given'); var idx = 1; if (options.numLines === true) { idx = 2; options.numLines = Number(arguments[1]); } else if (options.numLines === false) { options.numLines = 10; } files = [].slice.call(arguments, idx); if (pipe) { files.unshift('-'); } var shouldAppendNewline = false; files.forEach(function (file) { if (file !== '-') { if (!fs.existsSync(file)) { common.error('no such file or directory: ' + file, { continue: true }); return; } else if (common.statFollowLinks(file).isDirectory()) { common.error("error reading '" + file + "': Is a directory", { continue: true, }); return; } } var contents; if (file === '-') { contents = pipe; } else if (options.numLines < 0) { contents = fs.readFileSync(file, 'utf8'); } else { contents = readSomeLines(file, options.numLines); } var lines = contents.split('\n'); var hasTrailingNewline = (lines[lines.length - 1] === ''); if (hasTrailingNewline) { lines.pop(); } shouldAppendNewline = (hasTrailingNewline || options.numLines < lines.length); head = head.concat(lines.slice(0, options.numLines)); }); if (shouldAppendNewline) { head.push(''); // to add a trailing newline once we join } return head.join('\n'); } module.exports = _head; /***/ }), /***/ 15787: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var fs = __webpack_require__(35747); var path = __webpack_require__(85622); var common = __webpack_require__(53687); common.register('ln', _ln, { cmdOptions: { 's': 'symlink', 'f': 'force', }, }); //@ //@ ### ln([options,] source, dest) //@ //@ Available options: //@ //@ + `-s`: symlink //@ + `-f`: force //@ //@ Examples: //@ //@ ```javascript //@ ln('file', 'newlink'); //@ ln('-sf', 'file', 'existing'); //@ ``` //@ //@ Links `source` to `dest`. Use `-f` to force the link, should `dest` already exist. function _ln(options, source, dest) { if (!source || !dest) { common.error('Missing and/or '); } source = String(source); var sourcePath = path.normalize(source).replace(RegExp(path.sep + '$'), ''); var isAbsolute = (path.resolve(source) === sourcePath); dest = path.resolve(process.cwd(), String(dest)); if (fs.existsSync(dest)) { if (!options.force) { common.error('Destination file exists', { continue: true }); } fs.unlinkSync(dest); } if (options.symlink) { var isWindows = process.platform === 'win32'; var linkType = isWindows ? 'file' : null; var resolvedSourcePath = isAbsolute ? sourcePath : path.resolve(process.cwd(), path.dirname(dest), source); if (!fs.existsSync(resolvedSourcePath)) { common.error('Source file does not exist', { continue: true }); } else if (isWindows && common.statFollowLinks(resolvedSourcePath).isDirectory()) { linkType = 'junction'; } try { fs.symlinkSync(linkType === 'junction' ? resolvedSourcePath : source, dest, linkType); } catch (err) { common.error(err.message); } } else { if (!fs.existsSync(source)) { common.error('Source file does not exist', { continue: true }); } try { fs.linkSync(source, dest); } catch (err) { common.error(err.message); } } return ''; } module.exports = _ln; /***/ }), /***/ 35561: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var path = __webpack_require__(85622); var fs = __webpack_require__(35747); var common = __webpack_require__(53687); var glob = __webpack_require__(91957); var globPatternRecursive = path.sep + '**'; common.register('ls', _ls, { cmdOptions: { 'R': 'recursive', 'A': 'all', 'L': 'link', 'a': 'all_deprecated', 'd': 'directory', 'l': 'long', }, }); //@ //@ ### ls([options,] [path, ...]) //@ ### ls([options,] path_array) //@ //@ Available options: //@ //@ + `-R`: recursive //@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) //@ + `-L`: follow symlinks //@ + `-d`: list directories themselves, not their contents //@ + `-l`: list objects representing each file, each with fields containing `ls //@ -l` output fields. See //@ [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) //@ for more info //@ //@ Examples: //@ //@ ```javascript //@ ls('projs/*.js'); //@ ls('-R', '/users/me', '/tmp'); //@ ls('-R', ['/users/me', '/tmp']); // same as above //@ ls('-l', 'file.txt'); // { name: 'file.txt', mode: 33188, nlink: 1, ...} //@ ``` //@ //@ Returns array of files in the given `path`, or files in //@ the current directory if no `path` is provided. function _ls(options, paths) { if (options.all_deprecated) { // We won't support the -a option as it's hard to image why it's useful // (it includes '.' and '..' in addition to '.*' files) // For backwards compatibility we'll dump a deprecated message and proceed as before common.log('ls: Option -a is deprecated. Use -A instead'); options.all = true; } if (!paths) { paths = ['.']; } else { paths = [].slice.call(arguments, 1); } var list = []; function pushFile(abs, relName, stat) { if (process.platform === 'win32') { relName = relName.replace(/\\/g, '/'); } if (options.long) { stat = stat || (options.link ? common.statFollowLinks(abs) : common.statNoFollowLinks(abs)); list.push(addLsAttributes(relName, stat)); } else { // list.push(path.relative(rel || '.', file)); list.push(relName); } } paths.forEach(function (p) { var stat; try { stat = options.link ? common.statFollowLinks(p) : common.statNoFollowLinks(p); // follow links to directories by default if (stat.isSymbolicLink()) { /* istanbul ignore next */ // workaround for https://github.com/shelljs/shelljs/issues/795 // codecov seems to have a bug that miscalculate this block as uncovered. // but according to nyc report this block does get covered. try { var _stat = common.statFollowLinks(p); if (_stat.isDirectory()) { stat = _stat; } } catch (_) {} // bad symlink, treat it like a file } } catch (e) { common.error('no such file or directory: ' + p, 2, { continue: true }); return; } // If the stat succeeded if (stat.isDirectory() && !options.directory) { if (options.recursive) { // use glob, because it's simple glob.sync(p + globPatternRecursive, { dot: options.all, follow: options.link }) .forEach(function (item) { // Glob pattern returns the directory itself and needs to be filtered out. if (path.relative(p, item)) { pushFile(item, path.relative(p, item)); } }); } else if (options.all) { // use fs.readdirSync, because it's fast fs.readdirSync(p).forEach(function (item) { pushFile(path.join(p, item), item); }); } else { // use fs.readdirSync and then filter out secret files fs.readdirSync(p).forEach(function (item) { if (item[0] !== '.') { pushFile(path.join(p, item), item); } }); } } else { pushFile(p, p, stat); } }); // Add methods, to make this more compatible with ShellStrings return list; } function addLsAttributes(pathName, stats) { // Note: this object will contain more information than .toString() returns stats.name = pathName; stats.toString = function () { // Return a string resembling unix's `ls -l` format return [this.mode, this.nlink, this.uid, this.gid, this.size, this.mtime, this.name].join(' '); }; return stats; } module.exports = _ls; /***/ }), /***/ 72695: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); var path = __webpack_require__(85622); common.register('mkdir', _mkdir, { cmdOptions: { 'p': 'fullpath', }, }); // Recursively creates `dir` function mkdirSyncRecursive(dir) { var baseDir = path.dirname(dir); // Prevents some potential problems arising from malformed UNCs or // insufficient permissions. /* istanbul ignore next */ if (baseDir === dir) { common.error('dirname() failed: [' + dir + ']'); } // Base dir exists, no recursion necessary if (fs.existsSync(baseDir)) { fs.mkdirSync(dir, parseInt('0777', 8)); return; } // Base dir does not exist, go recursive mkdirSyncRecursive(baseDir); // Base dir created, can create dir fs.mkdirSync(dir, parseInt('0777', 8)); } //@ //@ ### mkdir([options,] dir [, dir ...]) //@ ### mkdir([options,] dir_array) //@ //@ Available options: //@ //@ + `-p`: full path (and create intermediate directories, if necessary) //@ //@ Examples: //@ //@ ```javascript //@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); //@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above //@ ``` //@ //@ Creates directories. function _mkdir(options, dirs) { if (!dirs) common.error('no paths given'); if (typeof dirs === 'string') { dirs = [].slice.call(arguments, 1); } // if it's array leave it as it is dirs.forEach(function (dir) { try { var stat = common.statNoFollowLinks(dir); if (!options.fullpath) { common.error('path already exists: ' + dir, { continue: true }); } else if (stat.isFile()) { common.error('cannot create directory ' + dir + ': File exists', { continue: true }); } return; // skip dir } catch (e) { // do nothing } // Base dir does not exist, and no -p option given var baseDir = path.dirname(dir); if (!fs.existsSync(baseDir) && !options.fullpath) { common.error('no such file or directory: ' + baseDir, { continue: true }); return; // skip dir } try { if (options.fullpath) { mkdirSyncRecursive(path.resolve(dir)); } else { fs.mkdirSync(dir, parseInt('0777', 8)); } } catch (e) { var reason; if (e.code === 'EACCES') { reason = 'Permission denied'; } else if (e.code === 'ENOTDIR' || e.code === 'ENOENT') { reason = 'Not a directory'; } else { /* istanbul ignore next */ throw e; } common.error('cannot create directory ' + dir + ': ' + reason, { continue: true }); } }); return ''; } // mkdir module.exports = _mkdir; /***/ }), /***/ 39849: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var fs = __webpack_require__(35747); var path = __webpack_require__(85622); var common = __webpack_require__(53687); var cp = __webpack_require__(34932); var rm = __webpack_require__(22830); common.register('mv', _mv, { cmdOptions: { 'f': '!no_force', 'n': 'no_force', }, }); // Checks if cureent file was created recently function checkRecentCreated(sources, index) { var lookedSource = sources[index]; return sources.slice(0, index).some(function (src) { return path.basename(src) === path.basename(lookedSource); }); } //@ //@ ### mv([options ,] source [, source ...], dest') //@ ### mv([options ,] source_array, dest') //@ //@ Available options: //@ //@ + `-f`: force (default behavior) //@ + `-n`: no-clobber //@ //@ Examples: //@ //@ ```javascript //@ mv('-n', 'file', 'dir/'); //@ mv('file1', 'file2', 'dir/'); //@ mv(['file1', 'file2'], 'dir/'); // same as above //@ ``` //@ //@ Moves `source` file(s) to `dest`. function _mv(options, sources, dest) { // Get sources, dest if (arguments.length < 3) { common.error('missing and/or '); } else if (arguments.length > 3) { sources = [].slice.call(arguments, 1, arguments.length - 1); dest = arguments[arguments.length - 1]; } else if (typeof sources === 'string') { sources = [sources]; } else { // TODO(nate): figure out if we actually need this line common.error('invalid arguments'); } var exists = fs.existsSync(dest); var stats = exists && common.statFollowLinks(dest); // Dest is not existing dir, but multiple sources given if ((!exists || !stats.isDirectory()) && sources.length > 1) { common.error('dest is not a directory (too many sources)'); } // Dest is an existing file, but no -f given if (exists && stats.isFile() && options.no_force) { common.error('dest file already exists: ' + dest); } sources.forEach(function (src, srcIndex) { if (!fs.existsSync(src)) { common.error('no such file or directory: ' + src, { continue: true }); return; // skip file } // If here, src exists // When copying to '/path/dir': // thisDest = '/path/dir/file1' var thisDest = dest; if (fs.existsSync(dest) && common.statFollowLinks(dest).isDirectory()) { thisDest = path.normalize(dest + '/' + path.basename(src)); } var thisDestExists = fs.existsSync(thisDest); if (thisDestExists && checkRecentCreated(sources, srcIndex)) { // cannot overwrite file created recently in current execution, but we want to continue copying other files if (!options.no_force) { common.error("will not overwrite just-created '" + thisDest + "' with '" + src + "'", { continue: true }); } return; } if (fs.existsSync(thisDest) && options.no_force) { common.error('dest file already exists: ' + thisDest, { continue: true }); return; // skip file } if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { common.error('cannot move to self: ' + src, { continue: true }); return; // skip file } try { fs.renameSync(src, thisDest); } catch (e) { /* istanbul ignore next */ if (e.code === 'EXDEV') { // If we're trying to `mv` to an external partition, we'll actually need // to perform a copy and then clean up the original file. If either the // copy or the rm fails with an exception, we should allow this // exception to pass up to the top level. cp('-r', src, thisDest); rm('-rf', src); } } }); // forEach(src) return ''; } // mv module.exports = _mv; /***/ }), /***/ 50227: /***/ (() => { // see dirs.js /***/ }), /***/ 44177: /***/ (() => { // see dirs.js /***/ }), /***/ 58553: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var path = __webpack_require__(85622); var common = __webpack_require__(53687); common.register('pwd', _pwd, { allowGlobbing: false, }); //@ //@ ### pwd() //@ //@ Returns the current directory. function _pwd() { var pwd = path.resolve(process.cwd()); return pwd; } module.exports = _pwd; /***/ }), /***/ 22830: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('rm', _rm, { cmdOptions: { 'f': 'force', 'r': 'recursive', 'R': 'recursive', }, }); // Recursively removes 'dir' // Adapted from https://github.com/ryanmcgrath/wrench-js // // Copyright (c) 2010 Ryan McGrath // Copyright (c) 2012 Artur Adib // // Licensed under the MIT License // http://www.opensource.org/licenses/mit-license.php function rmdirSyncRecursive(dir, force, fromSymlink) { var files; files = fs.readdirSync(dir); // Loop through and delete everything in the sub-tree after checking it for (var i = 0; i < files.length; i++) { var file = dir + '/' + files[i]; var currFile = common.statNoFollowLinks(file); if (currFile.isDirectory()) { // Recursive function back to the beginning rmdirSyncRecursive(file, force); } else { // Assume it's a file - perhaps a try/catch belongs here? if (force || isWriteable(file)) { try { common.unlinkSync(file); } catch (e) { /* istanbul ignore next */ common.error('could not remove file (code ' + e.code + '): ' + file, { continue: true, }); } } } } // if was directory was referenced through a symbolic link, // the contents should be removed, but not the directory itself if (fromSymlink) return; // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. // Huzzah for the shopkeep. var result; try { // Retry on windows, sometimes it takes a little time before all the files in the directory are gone var start = Date.now(); // TODO: replace this with a finite loop for (;;) { try { result = fs.rmdirSync(dir); if (fs.existsSync(dir)) throw { code: 'EAGAIN' }; break; } catch (er) { /* istanbul ignore next */ // In addition to error codes, also check if the directory still exists and loop again if true if (process.platform === 'win32' && (er.code === 'ENOTEMPTY' || er.code === 'EBUSY' || er.code === 'EPERM' || er.code === 'EAGAIN')) { if (Date.now() - start > 1000) throw er; } else if (er.code === 'ENOENT') { // Directory did not exist, deletion was successful break; } else { throw er; } } } } catch (e) { common.error('could not remove directory (code ' + e.code + '): ' + dir, { continue: true }); } return result; } // rmdirSyncRecursive // Hack to determine if file has write permissions for current user // Avoids having to check user, group, etc, but it's probably slow function isWriteable(file) { var writePermission = true; try { var __fd = fs.openSync(file, 'a'); fs.closeSync(__fd); } catch (e) { writePermission = false; } return writePermission; } function handleFile(file, options) { if (options.force || isWriteable(file)) { // -f was passed, or file is writable, so it can be removed common.unlinkSync(file); } else { common.error('permission denied: ' + file, { continue: true }); } } function handleDirectory(file, options) { if (options.recursive) { // -r was passed, so directory can be removed rmdirSyncRecursive(file, options.force); } else { common.error('path is a directory', { continue: true }); } } function handleSymbolicLink(file, options) { var stats; try { stats = common.statFollowLinks(file); } catch (e) { // symlink is broken, so remove the symlink itself common.unlinkSync(file); return; } if (stats.isFile()) { common.unlinkSync(file); } else if (stats.isDirectory()) { if (file[file.length - 1] === '/') { // trailing separator, so remove the contents, not the link if (options.recursive) { // -r was passed, so directory can be removed var fromSymlink = true; rmdirSyncRecursive(file, options.force, fromSymlink); } else { common.error('path is a directory', { continue: true }); } } else { // no trailing separator, so remove the link common.unlinkSync(file); } } } function handleFIFO(file) { common.unlinkSync(file); } //@ //@ ### rm([options,] file [, file ...]) //@ ### rm([options,] file_array) //@ //@ Available options: //@ //@ + `-f`: force //@ + `-r, -R`: recursive //@ //@ Examples: //@ //@ ```javascript //@ rm('-rf', '/tmp/*'); //@ rm('some_file.txt', 'another_file.txt'); //@ rm(['some_file.txt', 'another_file.txt']); // same as above //@ ``` //@ //@ Removes files. function _rm(options, files) { if (!files) common.error('no paths given'); // Convert to array files = [].slice.call(arguments, 1); files.forEach(function (file) { var lstats; try { var filepath = (file[file.length - 1] === '/') ? file.slice(0, -1) // remove the '/' so lstatSync can detect symlinks : file; lstats = common.statNoFollowLinks(filepath); // test for existence } catch (e) { // Path does not exist, no force flag given if (!options.force) { common.error('no such file or directory: ' + file, { continue: true }); } return; // skip file } // If here, path exists if (lstats.isFile()) { handleFile(file, options); } else if (lstats.isDirectory()) { handleDirectory(file, options); } else if (lstats.isSymbolicLink()) { handleSymbolicLink(file, options); } else if (lstats.isFIFO()) { handleFIFO(file); } }); // forEach(file) return ''; } // rm module.exports = _rm; /***/ }), /***/ 25899: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('sed', _sed, { globStart: 3, // don't glob-expand regexes canReceivePipe: true, cmdOptions: { 'i': 'inplace', }, }); //@ //@ ### sed([options,] search_regex, replacement, file [, file ...]) //@ ### sed([options,] search_regex, replacement, file_array) //@ //@ Available options: //@ //@ + `-i`: Replace contents of `file` in-place. _Note that no backups will be created!_ //@ //@ Examples: //@ //@ ```javascript //@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); //@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); //@ ``` //@ //@ Reads an input string from `file`s, and performs a JavaScript `replace()` on the input //@ using the given `search_regex` and `replacement` string or function. Returns the new string after replacement. //@ //@ Note: //@ //@ Like unix `sed`, ShellJS `sed` supports capture groups. Capture groups are specified //@ using the `$n` syntax: //@ //@ ```javascript //@ sed(/(\w+)\s(\w+)/, '$2, $1', 'file.txt'); //@ ``` function _sed(options, regex, replacement, files) { // Check if this is coming from a pipe var pipe = common.readFromPipe(); if (typeof replacement !== 'string' && typeof replacement !== 'function') { if (typeof replacement === 'number') { replacement = replacement.toString(); // fallback } else { common.error('invalid replacement string'); } } // Convert all search strings to RegExp if (typeof regex === 'string') { regex = RegExp(regex); } if (!files && !pipe) { common.error('no files given'); } files = [].slice.call(arguments, 3); if (pipe) { files.unshift('-'); } var sed = []; files.forEach(function (file) { if (!fs.existsSync(file) && file !== '-') { common.error('no such file or directory: ' + file, 2, { continue: true }); return; } var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); var lines = contents.split('\n'); var result = lines.map(function (line) { return line.replace(regex, replacement); }).join('\n'); sed.push(result); if (options.inplace) { fs.writeFileSync(file, result, 'utf8'); } }); return sed.join('\n'); } module.exports = _sed; /***/ }), /***/ 11411: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); common.register('set', _set, { allowGlobbing: false, wrapOutput: false, }); //@ //@ ### set(options) //@ //@ Available options: //@ //@ + `+/-e`: exit upon error (`config.fatal`) //@ + `+/-v`: verbose: show all commands (`config.verbose`) //@ + `+/-f`: disable filename expansion (globbing) //@ //@ Examples: //@ //@ ```javascript //@ set('-e'); // exit upon first error //@ set('+e'); // this undoes a "set('-e')" //@ ``` //@ //@ Sets global configuration variables. function _set(options) { if (!options) { var args = [].slice.call(arguments, 0); if (args.length < 2) common.error('must provide an argument'); options = args[1]; } var negate = (options[0] === '+'); if (negate) { options = '-' + options.slice(1); // parseOptions needs a '-' prefix } options = common.parseOptions(options, { 'e': 'fatal', 'v': 'verbose', 'f': 'noglob', }); if (negate) { Object.keys(options).forEach(function (key) { options[key] = !options[key]; }); } Object.keys(options).forEach(function (key) { // Only change the global config if `negate` is false and the option is true // or if `negate` is true and the option is false (aka negate !== option) if (negate !== options[key]) { common.config[key] = options[key]; } }); return; } module.exports = _set; /***/ }), /***/ 72116: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('sort', _sort, { canReceivePipe: true, cmdOptions: { 'r': 'reverse', 'n': 'numerical', }, }); // parse out the number prefix of a line function parseNumber(str) { var match = str.match(/^\s*(\d*)\s*(.*)$/); return { num: Number(match[1]), value: match[2] }; } // compare two strings case-insensitively, but examine case for strings that are // case-insensitive equivalent function unixCmp(a, b) { var aLower = a.toLowerCase(); var bLower = b.toLowerCase(); return (aLower === bLower ? -1 * a.localeCompare(b) : // unix sort treats case opposite how javascript does aLower.localeCompare(bLower)); } // compare two strings in the fashion that unix sort's -n option works function numericalCmp(a, b) { var objA = parseNumber(a); var objB = parseNumber(b); if (objA.hasOwnProperty('num') && objB.hasOwnProperty('num')) { return ((objA.num !== objB.num) ? (objA.num - objB.num) : unixCmp(objA.value, objB.value)); } else { return unixCmp(objA.value, objB.value); } } //@ //@ ### sort([options,] file [, file ...]) //@ ### sort([options,] file_array) //@ //@ Available options: //@ //@ + `-r`: Reverse the results //@ + `-n`: Compare according to numerical value //@ //@ Examples: //@ //@ ```javascript //@ sort('foo.txt', 'bar.txt'); //@ sort('-r', 'foo.txt'); //@ ``` //@ //@ Return the contents of the `file`s, sorted line-by-line. Sorting multiple //@ files mixes their content (just as unix `sort` does). function _sort(options, files) { // Check if this is coming from a pipe var pipe = common.readFromPipe(); if (!files && !pipe) common.error('no files given'); files = [].slice.call(arguments, 1); if (pipe) { files.unshift('-'); } var lines = files.reduce(function (accum, file) { if (file !== '-') { if (!fs.existsSync(file)) { common.error('no such file or directory: ' + file, { continue: true }); return accum; } else if (common.statFollowLinks(file).isDirectory()) { common.error('read failed: ' + file + ': Is a directory', { continue: true, }); return accum; } } var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); return accum.concat(contents.trimRight().split('\n')); }, []); var sorted = lines.sort(options.numerical ? numericalCmp : unixCmp); if (options.reverse) { sorted = sorted.reverse(); } return sorted.join('\n') + '\n'; } module.exports = _sort; /***/ }), /***/ 42284: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('tail', _tail, { canReceivePipe: true, cmdOptions: { 'n': 'numLines', }, }); //@ //@ ### tail([{'-n': \},] file [, file ...]) //@ ### tail([{'-n': \},] file_array) //@ //@ Available options: //@ //@ + `-n `: Show the last `` lines of `file`s //@ //@ Examples: //@ //@ ```javascript //@ var str = tail({'-n': 1}, 'file*.txt'); //@ var str = tail('file1', 'file2'); //@ var str = tail(['file1', 'file2']); // same as above //@ ``` //@ //@ Read the end of a `file`. function _tail(options, files) { var tail = []; var pipe = common.readFromPipe(); if (!files && !pipe) common.error('no paths given'); var idx = 1; if (options.numLines === true) { idx = 2; options.numLines = Number(arguments[1]); } else if (options.numLines === false) { options.numLines = 10; } options.numLines = -1 * Math.abs(options.numLines); files = [].slice.call(arguments, idx); if (pipe) { files.unshift('-'); } var shouldAppendNewline = false; files.forEach(function (file) { if (file !== '-') { if (!fs.existsSync(file)) { common.error('no such file or directory: ' + file, { continue: true }); return; } else if (common.statFollowLinks(file).isDirectory()) { common.error("error reading '" + file + "': Is a directory", { continue: true, }); return; } } var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); var lines = contents.split('\n'); if (lines[lines.length - 1] === '') { lines.pop(); shouldAppendNewline = true; } else { shouldAppendNewline = false; } tail = tail.concat(lines.slice(options.numLines)); }); if (shouldAppendNewline) { tail.push(''); // to add a trailing newline once we join } return tail.join('\n'); } module.exports = _tail; /***/ }), /***/ 76150: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var os = __webpack_require__(12087); var fs = __webpack_require__(35747); common.register('tempdir', _tempDir, { allowGlobbing: false, wrapOutput: false, }); // Returns false if 'dir' is not a writeable directory, 'dir' otherwise function writeableDir(dir) { if (!dir || !fs.existsSync(dir)) return false; if (!common.statFollowLinks(dir).isDirectory()) return false; var testFile = dir + '/' + common.randomFileName(); try { fs.writeFileSync(testFile, ' '); common.unlinkSync(testFile); return dir; } catch (e) { /* istanbul ignore next */ return false; } } // Variable to cache the tempdir value for successive lookups. var cachedTempDir; //@ //@ ### tempdir() //@ //@ Examples: //@ //@ ```javascript //@ var tmp = tempdir(); // "/tmp" for most *nix platforms //@ ``` //@ //@ Searches and returns string containing a writeable, platform-dependent temporary directory. //@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). function _tempDir() { if (cachedTempDir) return cachedTempDir; cachedTempDir = writeableDir(os.tmpdir()) || writeableDir(process.env.TMPDIR) || writeableDir(process.env.TEMP) || writeableDir(process.env.TMP) || writeableDir(process.env.Wimp$ScrapDir) || // RiscOS writeableDir('C:\\TEMP') || // Windows writeableDir('C:\\TMP') || // Windows writeableDir('\\TEMP') || // Windows writeableDir('\\TMP') || // Windows writeableDir('/tmp') || writeableDir('/var/tmp') || writeableDir('/usr/tmp') || writeableDir('.'); // last resort return cachedTempDir; } // Indicates if the tempdir value is currently cached. This is exposed for tests // only. The return value should only be tested for truthiness. function isCached() { return cachedTempDir; } // Clears the cached tempDir value, if one is cached. This is exposed for tests // only. function clearCache() { cachedTempDir = undefined; } module.exports.tempDir = _tempDir; module.exports.isCached = isCached; module.exports.clearCache = clearCache; /***/ }), /***/ 79723: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('test', _test, { cmdOptions: { 'b': 'block', 'c': 'character', 'd': 'directory', 'e': 'exists', 'f': 'file', 'L': 'link', 'p': 'pipe', 'S': 'socket', }, wrapOutput: false, allowGlobbing: false, }); //@ //@ ### test(expression) //@ //@ Available expression primaries: //@ //@ + `'-b', 'path'`: true if path is a block device //@ + `'-c', 'path'`: true if path is a character device //@ + `'-d', 'path'`: true if path is a directory //@ + `'-e', 'path'`: true if path exists //@ + `'-f', 'path'`: true if path is a regular file //@ + `'-L', 'path'`: true if path is a symbolic link //@ + `'-p', 'path'`: true if path is a pipe (FIFO) //@ + `'-S', 'path'`: true if path is a socket //@ //@ Examples: //@ //@ ```javascript //@ if (test('-d', path)) { /* do something with dir */ }; //@ if (!test('-f', path)) continue; // skip if it's a regular file //@ ``` //@ //@ Evaluates `expression` using the available primaries and returns corresponding value. function _test(options, path) { if (!path) common.error('no path given'); var canInterpret = false; Object.keys(options).forEach(function (key) { if (options[key] === true) { canInterpret = true; } }); if (!canInterpret) common.error('could not interpret expression'); if (options.link) { try { return common.statNoFollowLinks(path).isSymbolicLink(); } catch (e) { return false; } } if (!fs.existsSync(path)) return false; if (options.exists) return true; var stats = common.statFollowLinks(path); if (options.block) return stats.isBlockDevice(); if (options.character) return stats.isCharacterDevice(); if (options.directory) return stats.isDirectory(); if (options.file) return stats.isFile(); /* istanbul ignore next */ if (options.pipe) return stats.isFIFO(); /* istanbul ignore next */ if (options.socket) return stats.isSocket(); /* istanbul ignore next */ return false; // fallback } // test module.exports = _test; /***/ }), /***/ 71961: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); var path = __webpack_require__(85622); common.register('to', _to, { pipeOnly: true, wrapOutput: false, }); //@ //@ ### ShellString.prototype.to(file) //@ //@ Examples: //@ //@ ```javascript //@ cat('input.txt').to('output.txt'); //@ ``` //@ //@ Analogous to the redirection operator `>` in Unix, but works with //@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). _Like Unix //@ redirections, `to()` will overwrite any existing file!_ function _to(options, file) { if (!file) common.error('wrong arguments'); if (!fs.existsSync(path.dirname(file))) { common.error('no such file or directory: ' + path.dirname(file)); } try { fs.writeFileSync(file, this.stdout || this.toString(), 'utf8'); return this; } catch (e) { /* istanbul ignore next */ common.error('could not write to file (code ' + e.code + '): ' + file, { continue: true }); } } module.exports = _to; /***/ }), /***/ 33736: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); var path = __webpack_require__(85622); common.register('toEnd', _toEnd, { pipeOnly: true, wrapOutput: false, }); //@ //@ ### ShellString.prototype.toEnd(file) //@ //@ Examples: //@ //@ ```javascript //@ cat('input.txt').toEnd('output.txt'); //@ ``` //@ //@ Analogous to the redirect-and-append operator `>>` in Unix, but works with //@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). function _toEnd(options, file) { if (!file) common.error('wrong arguments'); if (!fs.existsSync(path.dirname(file))) { common.error('no such file or directory: ' + path.dirname(file)); } try { fs.appendFileSync(file, this.stdout || this.toString(), 'utf8'); return this; } catch (e) { /* istanbul ignore next */ common.error('could not append to file (code ' + e.code + '): ' + file, { continue: true }); } } module.exports = _toEnd; /***/ }), /***/ 28358: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); common.register('touch', _touch, { cmdOptions: { 'a': 'atime_only', 'c': 'no_create', 'd': 'date', 'm': 'mtime_only', 'r': 'reference', }, }); //@ //@ ### touch([options,] file [, file ...]) //@ ### touch([options,] file_array) //@ //@ Available options: //@ //@ + `-a`: Change only the access time //@ + `-c`: Do not create any files //@ + `-m`: Change only the modification time //@ + `-d DATE`: Parse `DATE` and use it instead of current time //@ + `-r FILE`: Use `FILE`'s times instead of current time //@ //@ Examples: //@ //@ ```javascript //@ touch('source.js'); //@ touch('-c', '/path/to/some/dir/source.js'); //@ touch({ '-r': FILE }, '/path/to/some/dir/source.js'); //@ ``` //@ //@ Update the access and modification times of each `FILE` to the current time. //@ A `FILE` argument that does not exist is created empty, unless `-c` is supplied. //@ This is a partial implementation of [`touch(1)`](http://linux.die.net/man/1/touch). function _touch(opts, files) { if (!files) { common.error('no files given'); } else if (typeof files === 'string') { files = [].slice.call(arguments, 1); } else { common.error('file arg should be a string file path or an Array of string file paths'); } files.forEach(function (f) { touchFile(opts, f); }); return ''; } function touchFile(opts, file) { var stat = tryStatFile(file); if (stat && stat.isDirectory()) { // don't error just exit return; } // if the file doesn't already exist and the user has specified --no-create then // this script is finished if (!stat && opts.no_create) { return; } // open the file and then close it. this will create it if it doesn't exist but will // not truncate the file fs.closeSync(fs.openSync(file, 'a')); // // Set timestamps // // setup some defaults var now = new Date(); var mtime = opts.date || now; var atime = opts.date || now; // use reference file if (opts.reference) { var refStat = tryStatFile(opts.reference); if (!refStat) { common.error('failed to get attributess of ' + opts.reference); } mtime = refStat.mtime; atime = refStat.atime; } else if (opts.date) { mtime = opts.date; atime = opts.date; } if (opts.atime_only && opts.mtime_only) { // keep the new values of mtime and atime like GNU } else if (opts.atime_only) { mtime = stat.mtime; } else if (opts.mtime_only) { atime = stat.atime; } fs.utimesSync(file, atime, mtime); } module.exports = _touch; function tryStatFile(filePath) { try { return common.statFollowLinks(filePath); } catch (e) { return null; } } /***/ }), /***/ 77286: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); // add c spaces to the left of str function lpad(c, str) { var res = '' + str; if (res.length < c) { res = Array((c - res.length) + 1).join(' ') + res; } return res; } common.register('uniq', _uniq, { canReceivePipe: true, cmdOptions: { 'i': 'ignoreCase', 'c': 'count', 'd': 'duplicates', }, }); //@ //@ ### uniq([options,] [input, [output]]) //@ //@ Available options: //@ //@ + `-i`: Ignore case while comparing //@ + `-c`: Prefix lines by the number of occurrences //@ + `-d`: Only print duplicate lines, one for each group of identical lines //@ //@ Examples: //@ //@ ```javascript //@ uniq('foo.txt'); //@ uniq('-i', 'foo.txt'); //@ uniq('-cd', 'foo.txt', 'bar.txt'); //@ ``` //@ //@ Filter adjacent matching lines from `input`. function _uniq(options, input, output) { // Check if this is coming from a pipe var pipe = common.readFromPipe(); if (!pipe) { if (!input) common.error('no input given'); if (!fs.existsSync(input)) { common.error(input + ': No such file or directory'); } else if (common.statFollowLinks(input).isDirectory()) { common.error("error reading '" + input + "'"); } } if (output && fs.existsSync(output) && common.statFollowLinks(output).isDirectory()) { common.error(output + ': Is a directory'); } var lines = (input ? fs.readFileSync(input, 'utf8') : pipe). trimRight(). split('\n'); var compare = function (a, b) { return options.ignoreCase ? a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase()) : a.localeCompare(b); }; var uniqed = lines.reduceRight(function (res, e) { // Perform uniq -c on the input if (res.length === 0) { return [{ count: 1, ln: e }]; } else if (compare(res[0].ln, e) === 0) { return [{ count: res[0].count + 1, ln: e }].concat(res.slice(1)); } else { return [{ count: 1, ln: e }].concat(res); } }, []).filter(function (obj) { // Do we want only duplicated objects? return options.duplicates ? obj.count > 1 : true; }).map(function (obj) { // Are we tracking the counts of each line? return (options.count ? (lpad(7, obj.count) + ' ') : '') + obj.ln; }).join('\n') + '\n'; if (output) { (new common.ShellString(uniqed)).to(output); // if uniq writes to output, nothing is passed to the next command in the pipeline (if any) return ''; } else { return uniqed; } } module.exports = _uniq; /***/ }), /***/ 64766: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var common = __webpack_require__(53687); var fs = __webpack_require__(35747); var path = __webpack_require__(85622); common.register('which', _which, { allowGlobbing: false, cmdOptions: { 'a': 'all', }, }); // XP's system default value for `PATHEXT` system variable, just in case it's not // set on Windows. var XP_DEFAULT_PATHEXT = '.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh'; // For earlier versions of NodeJS that doesn't have a list of constants (< v6) var FILE_EXECUTABLE_MODE = 1; function isWindowsPlatform() { return process.platform === 'win32'; } // Cross-platform method for splitting environment `PATH` variables function splitPath(p) { return p ? p.split(path.delimiter) : []; } // Tests are running all cases for this func but it stays uncovered by codecov due to unknown reason /* istanbul ignore next */ function isExecutable(pathName) { try { // TODO(node-support): replace with fs.constants.X_OK once remove support for node < v6 fs.accessSync(pathName, FILE_EXECUTABLE_MODE); } catch (err) { return false; } return true; } function checkPath(pathName) { return fs.existsSync(pathName) && !common.statFollowLinks(pathName).isDirectory() && (isWindowsPlatform() || isExecutable(pathName)); } //@ //@ ### which(command) //@ //@ Examples: //@ //@ ```javascript //@ var nodeExec = which('node'); //@ ``` //@ //@ Searches for `command` in the system's `PATH`. On Windows, this uses the //@ `PATHEXT` variable to append the extension if it's not already executable. //@ Returns string containing the absolute path to `command`. function _which(options, cmd) { if (!cmd) common.error('must specify command'); var isWindows = isWindowsPlatform(); var pathArray = splitPath(process.env.PATH); var queryMatches = []; // No relative/absolute paths provided? if (cmd.indexOf('/') === -1) { // Assume that there are no extensions to append to queries (this is the // case for unix) var pathExtArray = ['']; if (isWindows) { // In case the PATHEXT variable is somehow not set (e.g. // child_process.spawn with an empty environment), use the XP default. var pathExtEnv = process.env.PATHEXT || XP_DEFAULT_PATHEXT; pathExtArray = splitPath(pathExtEnv.toUpperCase()); } // Search for command in PATH for (var k = 0; k < pathArray.length; k++) { // already found it if (queryMatches.length > 0 && !options.all) break; var attempt = path.resolve(pathArray[k], cmd); if (isWindows) { attempt = attempt.toUpperCase(); } var match = attempt.match(/\.[^<>:"/\|?*.]+$/); if (match && pathExtArray.indexOf(match[0]) >= 0) { // this is Windows-only // The user typed a query with the file extension, like // `which('node.exe')` if (checkPath(attempt)) { queryMatches.push(attempt); break; } } else { // All-platforms // Cycle through the PATHEXT array, and check each extension // Note: the array is always [''] on Unix for (var i = 0; i < pathExtArray.length; i++) { var ext = pathExtArray[i]; var newAttempt = attempt + ext; if (checkPath(newAttempt)) { queryMatches.push(newAttempt); break; } } } } } else if (checkPath(cmd)) { // a valid absolute or relative path queryMatches.push(path.resolve(cmd)); } if (queryMatches.length > 0) { return options.all ? queryMatches : queryMatches[0]; } return options.all ? [] : null; } module.exports = _which; /***/ }), /***/ 66126: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. var Buffer = __webpack_require__(15118).Buffer; var algInfo = { 'dsa': { parts: ['p', 'q', 'g', 'y'], sizePart: 'p' }, 'rsa': { parts: ['e', 'n'], sizePart: 'n' }, 'ecdsa': { parts: ['curve', 'Q'], sizePart: 'Q' }, 'ed25519': { parts: ['A'], sizePart: 'A' } }; algInfo['curve25519'] = algInfo['ed25519']; var algPrivInfo = { 'dsa': { parts: ['p', 'q', 'g', 'y', 'x'] }, 'rsa': { parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] }, 'ecdsa': { parts: ['curve', 'Q', 'd'] }, 'ed25519': { parts: ['A', 'k'] } }; algPrivInfo['curve25519'] = algPrivInfo['ed25519']; var hashAlgs = { 'md5': true, 'sha1': true, 'sha256': true, 'sha384': true, 'sha512': true }; /* * Taken from * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf */ var curves = { 'nistp256': { size: 256, pkcs8oid: '1.2.840.10045.3.1.7', p: Buffer.from(('00' + 'ffffffff 00000001 00000000 00000000' + '00000000 ffffffff ffffffff ffffffff'). replace(/ /g, ''), 'hex'), a: Buffer.from(('00' + 'FFFFFFFF 00000001 00000000 00000000' + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). replace(/ /g, ''), 'hex'), b: Buffer.from(( '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). replace(/ /g, ''), 'hex'), s: Buffer.from(('00' + 'c49d3608 86e70493 6a6678e1 139d26b7' + '819f7e90'). replace(/ /g, ''), 'hex'), n: Buffer.from(('00' + 'ffffffff 00000000 ffffffff ffffffff' + 'bce6faad a7179e84 f3b9cac2 fc632551'). replace(/ /g, ''), 'hex'), G: Buffer.from(('04' + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + '77037d81 2deb33a0 f4a13945 d898c296' + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + '2bce3357 6b315ece cbb64068 37bf51f5'). replace(/ /g, ''), 'hex') }, 'nistp384': { size: 384, pkcs8oid: '1.3.132.0.34', p: Buffer.from(('00' + 'ffffffff ffffffff ffffffff ffffffff' + 'ffffffff ffffffff ffffffff fffffffe' + 'ffffffff 00000000 00000000 ffffffff'). replace(/ /g, ''), 'hex'), a: Buffer.from(('00' + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). replace(/ /g, ''), 'hex'), b: Buffer.from(( 'b3312fa7 e23ee7e4 988e056b e3f82d19' + '181d9c6e fe814112 0314088f 5013875a' + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). replace(/ /g, ''), 'hex'), s: Buffer.from(('00' + 'a335926a a319a27a 1d00896a 6773a482' + '7acdac73'). replace(/ /g, ''), 'hex'), n: Buffer.from(('00' + 'ffffffff ffffffff ffffffff ffffffff' + 'ffffffff ffffffff c7634d81 f4372ddf' + '581a0db2 48b0a77a ecec196a ccc52973'). replace(/ /g, ''), 'hex'), G: Buffer.from(('04' + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + '6e1d3b62 8ba79b98 59f741e0 82542a38' + '5502f25d bf55296c 3a545e38 72760ab7' + '3617de4a 96262c6f 5d9e98bf 9292dc29' + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). replace(/ /g, ''), 'hex') }, 'nistp521': { size: 521, pkcs8oid: '1.3.132.0.35', p: Buffer.from(( '01ffffff ffffffff ffffffff ffffffff' + 'ffffffff ffffffff ffffffff ffffffff' + 'ffffffff ffffffff ffffffff ffffffff' + 'ffffffff ffffffff ffffffff ffffffff' + 'ffff').replace(/ /g, ''), 'hex'), a: Buffer.from(('01FF' + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). replace(/ /g, ''), 'hex'), b: Buffer.from(('51' + '953eb961 8e1c9a1f 929a21a0 b68540ee' + 'a2da725b 99b315f3 b8b48991 8ef109e1' + '56193951 ec7e937b 1652c0bd 3bb1bf07' + '3573df88 3d2c34f1 ef451fd4 6b503f00'). replace(/ /g, ''), 'hex'), s: Buffer.from(('00' + 'd09e8800 291cb853 96cc6717 393284aa' + 'a0da64ba').replace(/ /g, ''), 'hex'), n: Buffer.from(('01ff' + 'ffffffff ffffffff ffffffff ffffffff' + 'ffffffff ffffffff ffffffff fffffffa' + '51868783 bf2f966b 7fcc0148 f709a5d0' + '3bb5c9b8 899c47ae bb6fb71e 91386409'). replace(/ /g, ''), 'hex'), G: Buffer.from(('04' + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + '9c648139 053fb521 f828af60 6b4d3dba' + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + '3348b3c1 856a429b f97e7e31 c2e5bd66' + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + '98f54449 579b4468 17afbd17 273e662c' + '97ee7299 5ef42640 c550b901 3fad0761' + '353c7086 a272c240 88be9476 9fd16650'). replace(/ /g, ''), 'hex') } }; module.exports = { info: algInfo, privInfo: algPrivInfo, hashAlgs: hashAlgs, curves: curves }; /***/ }), /***/ 7406: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2016 Joyent, Inc. module.exports = Certificate; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var crypto = __webpack_require__(33373); var Fingerprint = __webpack_require__(13079); var Signature = __webpack_require__(91394); var errs = __webpack_require__(27979); var util = __webpack_require__(31669); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var Identity = __webpack_require__(70508); var formats = {}; formats['openssh'] = __webpack_require__(94033); formats['x509'] = __webpack_require__(10267); formats['pem'] = __webpack_require__(30217); var CertificateParseError = errs.CertificateParseError; var InvalidAlgorithmError = errs.InvalidAlgorithmError; function Certificate(opts) { assert.object(opts, 'options'); assert.arrayOfObject(opts.subjects, 'options.subjects'); utils.assertCompatible(opts.subjects[0], Identity, [1, 0], 'options.subjects'); utils.assertCompatible(opts.subjectKey, Key, [1, 0], 'options.subjectKey'); utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); if (opts.issuerKey !== undefined) { utils.assertCompatible(opts.issuerKey, Key, [1, 0], 'options.issuerKey'); } assert.object(opts.signatures, 'options.signatures'); assert.buffer(opts.serial, 'options.serial'); assert.date(opts.validFrom, 'options.validFrom'); assert.date(opts.validUntil, 'optons.validUntil'); assert.optionalArrayOfString(opts.purposes, 'options.purposes'); this._hashCache = {}; this.subjects = opts.subjects; this.issuer = opts.issuer; this.subjectKey = opts.subjectKey; this.issuerKey = opts.issuerKey; this.signatures = opts.signatures; this.serial = opts.serial; this.validFrom = opts.validFrom; this.validUntil = opts.validUntil; this.purposes = opts.purposes; } Certificate.formats = formats; Certificate.prototype.toBuffer = function (format, options) { if (format === undefined) format = 'x509'; assert.string(format, 'format'); assert.object(formats[format], 'formats[format]'); assert.optionalObject(options, 'options'); return (formats[format].write(this, options)); }; Certificate.prototype.toString = function (format, options) { if (format === undefined) format = 'pem'; return (this.toBuffer(format, options).toString()); }; Certificate.prototype.fingerprint = function (algo) { if (algo === undefined) algo = 'sha256'; assert.string(algo, 'algorithm'); var opts = { type: 'certificate', hash: this.hash(algo), algorithm: algo }; return (new Fingerprint(opts)); }; Certificate.prototype.hash = function (algo) { assert.string(algo, 'algorithm'); algo = algo.toLowerCase(); if (algs.hashAlgs[algo] === undefined) throw (new InvalidAlgorithmError(algo)); if (this._hashCache[algo]) return (this._hashCache[algo]); var hash = crypto.createHash(algo). update(this.toBuffer('x509')).digest(); this._hashCache[algo] = hash; return (hash); }; Certificate.prototype.isExpired = function (when) { if (when === undefined) when = new Date(); return (!((when.getTime() >= this.validFrom.getTime()) && (when.getTime() < this.validUntil.getTime()))); }; Certificate.prototype.isSignedBy = function (issuerCert) { utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); if (!this.issuer.equals(issuerCert.subjects[0])) return (false); if (this.issuer.purposes && this.issuer.purposes.length > 0 && this.issuer.purposes.indexOf('ca') === -1) { return (false); } return (this.isSignedByKey(issuerCert.subjectKey)); }; Certificate.prototype.getExtension = function (keyOrOid) { assert.string(keyOrOid, 'keyOrOid'); var ext = this.getExtensions().filter(function (maybeExt) { if (maybeExt.format === 'x509') return (maybeExt.oid === keyOrOid); if (maybeExt.format === 'openssh') return (maybeExt.name === keyOrOid); return (false); })[0]; return (ext); }; Certificate.prototype.getExtensions = function () { var exts = []; var x509 = this.signatures.x509; if (x509 && x509.extras && x509.extras.exts) { x509.extras.exts.forEach(function (ext) { ext.format = 'x509'; exts.push(ext); }); } var openssh = this.signatures.openssh; if (openssh && openssh.exts) { openssh.exts.forEach(function (ext) { ext.format = 'openssh'; exts.push(ext); }); } return (exts); }; Certificate.prototype.isSignedByKey = function (issuerKey) { utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); if (this.issuerKey !== undefined) { return (this.issuerKey. fingerprint('sha512').matches(issuerKey)); } var fmt = Object.keys(this.signatures)[0]; var valid = formats[fmt].verify(this, issuerKey); if (valid) this.issuerKey = issuerKey; return (valid); }; Certificate.prototype.signWith = function (key) { utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); var fmts = Object.keys(formats); var didOne = false; for (var i = 0; i < fmts.length; ++i) { if (fmts[i] !== 'pem') { var ret = formats[fmts[i]].sign(this, key); if (ret === true) didOne = true; } } if (!didOne) { throw (new Error('Failed to sign the certificate for any ' + 'available certificate formats')); } }; Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { var subjects; if (Array.isArray(subjectOrSubjects)) subjects = subjectOrSubjects; else subjects = [subjectOrSubjects]; assert.arrayOfObject(subjects); subjects.forEach(function (subject) { utils.assertCompatible(subject, Identity, [1, 0], 'subject'); }); utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); assert.optionalObject(options, 'options'); if (options === undefined) options = {}; assert.optionalObject(options.validFrom, 'options.validFrom'); assert.optionalObject(options.validUntil, 'options.validUntil'); var validFrom = options.validFrom; var validUntil = options.validUntil; if (validFrom === undefined) validFrom = new Date(); if (validUntil === undefined) { assert.optionalNumber(options.lifetime, 'options.lifetime'); var lifetime = options.lifetime; if (lifetime === undefined) lifetime = 10*365*24*3600; validUntil = new Date(); validUntil.setTime(validUntil.getTime() + lifetime*1000); } assert.optionalBuffer(options.serial, 'options.serial'); var serial = options.serial; if (serial === undefined) serial = Buffer.from('0000000000000001', 'hex'); var purposes = options.purposes; if (purposes === undefined) purposes = []; if (purposes.indexOf('signature') === -1) purposes.push('signature'); /* Self-signed certs are always CAs. */ if (purposes.indexOf('ca') === -1) purposes.push('ca'); if (purposes.indexOf('crl') === -1) purposes.push('crl'); /* * If we weren't explicitly given any other purposes, do the sensible * thing and add some basic ones depending on the subject type. */ if (purposes.length <= 3) { var hostSubjects = subjects.filter(function (subject) { return (subject.type === 'host'); }); var userSubjects = subjects.filter(function (subject) { return (subject.type === 'user'); }); if (hostSubjects.length > 0) { if (purposes.indexOf('serverAuth') === -1) purposes.push('serverAuth'); } if (userSubjects.length > 0) { if (purposes.indexOf('clientAuth') === -1) purposes.push('clientAuth'); } if (userSubjects.length > 0 || hostSubjects.length > 0) { if (purposes.indexOf('keyAgreement') === -1) purposes.push('keyAgreement'); if (key.type === 'rsa' && purposes.indexOf('encryption') === -1) purposes.push('encryption'); } } var cert = new Certificate({ subjects: subjects, issuer: subjects[0], subjectKey: key.toPublic(), issuerKey: key.toPublic(), signatures: {}, serial: serial, validFrom: validFrom, validUntil: validUntil, purposes: purposes }); cert.signWith(key); return (cert); }; Certificate.create = function (subjectOrSubjects, key, issuer, issuerKey, options) { var subjects; if (Array.isArray(subjectOrSubjects)) subjects = subjectOrSubjects; else subjects = [subjectOrSubjects]; assert.arrayOfObject(subjects); subjects.forEach(function (subject) { utils.assertCompatible(subject, Identity, [1, 0], 'subject'); }); utils.assertCompatible(key, Key, [1, 0], 'key'); if (PrivateKey.isPrivateKey(key)) key = key.toPublic(); utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); assert.optionalObject(options, 'options'); if (options === undefined) options = {}; assert.optionalObject(options.validFrom, 'options.validFrom'); assert.optionalObject(options.validUntil, 'options.validUntil'); var validFrom = options.validFrom; var validUntil = options.validUntil; if (validFrom === undefined) validFrom = new Date(); if (validUntil === undefined) { assert.optionalNumber(options.lifetime, 'options.lifetime'); var lifetime = options.lifetime; if (lifetime === undefined) lifetime = 10*365*24*3600; validUntil = new Date(); validUntil.setTime(validUntil.getTime() + lifetime*1000); } assert.optionalBuffer(options.serial, 'options.serial'); var serial = options.serial; if (serial === undefined) serial = Buffer.from('0000000000000001', 'hex'); var purposes = options.purposes; if (purposes === undefined) purposes = []; if (purposes.indexOf('signature') === -1) purposes.push('signature'); if (options.ca === true) { if (purposes.indexOf('ca') === -1) purposes.push('ca'); if (purposes.indexOf('crl') === -1) purposes.push('crl'); } var hostSubjects = subjects.filter(function (subject) { return (subject.type === 'host'); }); var userSubjects = subjects.filter(function (subject) { return (subject.type === 'user'); }); if (hostSubjects.length > 0) { if (purposes.indexOf('serverAuth') === -1) purposes.push('serverAuth'); } if (userSubjects.length > 0) { if (purposes.indexOf('clientAuth') === -1) purposes.push('clientAuth'); } if (userSubjects.length > 0 || hostSubjects.length > 0) { if (purposes.indexOf('keyAgreement') === -1) purposes.push('keyAgreement'); if (key.type === 'rsa' && purposes.indexOf('encryption') === -1) purposes.push('encryption'); } var cert = new Certificate({ subjects: subjects, issuer: issuer, subjectKey: key, issuerKey: issuerKey.toPublic(), signatures: {}, serial: serial, validFrom: validFrom, validUntil: validUntil, purposes: purposes }); cert.signWith(issuerKey); return (cert); }; Certificate.parse = function (data, format, options) { if (typeof (data) !== 'string') assert.buffer(data, 'data'); if (format === undefined) format = 'auto'; assert.string(format, 'format'); if (typeof (options) === 'string') options = { filename: options }; assert.optionalObject(options, 'options'); if (options === undefined) options = {}; assert.optionalString(options.filename, 'options.filename'); if (options.filename === undefined) options.filename = '(unnamed)'; assert.object(formats[format], 'formats[format]'); try { var k = formats[format].read(data, options); return (k); } catch (e) { throw (new CertificateParseError(options.filename, format, e)); } }; Certificate.isCertificate = function (obj, ver) { return (utils.isCompatible(obj, Certificate, ver)); }; /* * API versions for Certificate: * [1,0] -- initial ver * [1,1] -- openssh format now unpacks extensions */ Certificate.prototype._sshpkApiVersion = [1, 1]; Certificate._oldVersionDetect = function (obj) { return ([1, 0]); }; /***/ }), /***/ 57602: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2017 Joyent, Inc. module.exports = { DiffieHellman: DiffieHellman, generateECDSA: generateECDSA, generateED25519: generateED25519 }; var assert = __webpack_require__(66631); var crypto = __webpack_require__(33373); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var nacl = __webpack_require__(68729); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); var ecdh = __webpack_require__(49865); var ec = __webpack_require__(3943); var jsbn = __webpack_require__(85587).BigInteger; function DiffieHellman(key) { utils.assertCompatible(key, Key, [1, 4], 'key'); this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); this._algo = key.type; this._curve = key.curve; this._key = key; if (key.type === 'dsa') { if (!CRYPTO_HAVE_ECDH) { throw (new Error('Due to bugs in the node 0.10 ' + 'crypto API, node 0.12.x or later is required ' + 'to use DH')); } this._dh = crypto.createDiffieHellman( key.part.p.data, undefined, key.part.g.data, undefined); this._p = key.part.p; this._g = key.part.g; if (this._isPriv) this._dh.setPrivateKey(key.part.x.data); this._dh.setPublicKey(key.part.y.data); } else if (key.type === 'ecdsa') { if (!CRYPTO_HAVE_ECDH) { this._ecParams = new X9ECParameters(this._curve); if (this._isPriv) { this._priv = new ECPrivate( this._ecParams, key.part.d.data); } return; } var curve = { 'nistp256': 'prime256v1', 'nistp384': 'secp384r1', 'nistp521': 'secp521r1' }[key.curve]; this._dh = crypto.createECDH(curve); if (typeof (this._dh) !== 'object' || typeof (this._dh.setPrivateKey) !== 'function') { CRYPTO_HAVE_ECDH = false; DiffieHellman.call(this, key); return; } if (this._isPriv) this._dh.setPrivateKey(key.part.d.data); this._dh.setPublicKey(key.part.Q.data); } else if (key.type === 'curve25519') { if (this._isPriv) { utils.assertCompatible(key, PrivateKey, [1, 5], 'key'); this._priv = key.part.k.data; } } else { throw (new Error('DH not supported for ' + key.type + ' keys')); } } DiffieHellman.prototype.getPublicKey = function () { if (this._isPriv) return (this._key.toPublic()); return (this._key); }; DiffieHellman.prototype.getPrivateKey = function () { if (this._isPriv) return (this._key); else return (undefined); }; DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; DiffieHellman.prototype._keyCheck = function (pk, isPub) { assert.object(pk, 'key'); if (!isPub) utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); utils.assertCompatible(pk, Key, [1, 4], 'key'); if (pk.type !== this._algo) { throw (new Error('A ' + pk.type + ' key cannot be used in ' + this._algo + ' Diffie-Hellman')); } if (pk.curve !== this._curve) { throw (new Error('A key from the ' + pk.curve + ' curve ' + 'cannot be used with a ' + this._curve + ' Diffie-Hellman')); } if (pk.type === 'dsa') { assert.deepEqual(pk.part.p, this._p, 'DSA key prime does not match'); assert.deepEqual(pk.part.g, this._g, 'DSA key generator does not match'); } }; DiffieHellman.prototype.setKey = function (pk) { this._keyCheck(pk); if (pk.type === 'dsa') { this._dh.setPrivateKey(pk.part.x.data); this._dh.setPublicKey(pk.part.y.data); } else if (pk.type === 'ecdsa') { if (CRYPTO_HAVE_ECDH) { this._dh.setPrivateKey(pk.part.d.data); this._dh.setPublicKey(pk.part.Q.data); } else { this._priv = new ECPrivate( this._ecParams, pk.part.d.data); } } else if (pk.type === 'curve25519') { var k = pk.part.k; if (!pk.part.k) k = pk.part.r; this._priv = k.data; if (this._priv[0] === 0x00) this._priv = this._priv.slice(1); this._priv = this._priv.slice(0, 32); } this._key = pk; this._isPriv = true; }; DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; DiffieHellman.prototype.computeSecret = function (otherpk) { this._keyCheck(otherpk, true); if (!this._isPriv) throw (new Error('DH exchange has not been initialized with ' + 'a private key yet')); var pub; if (this._algo === 'dsa') { return (this._dh.computeSecret( otherpk.part.y.data)); } else if (this._algo === 'ecdsa') { if (CRYPTO_HAVE_ECDH) { return (this._dh.computeSecret( otherpk.part.Q.data)); } else { pub = new ECPublic( this._ecParams, otherpk.part.Q.data); return (this._priv.deriveSharedSecret(pub)); } } else if (this._algo === 'curve25519') { pub = otherpk.part.A.data; while (pub[0] === 0x00 && pub.length > 32) pub = pub.slice(1); var priv = this._priv; assert.strictEqual(pub.length, 32); assert.strictEqual(priv.length, 32); var secret = nacl.box.before(new Uint8Array(pub), new Uint8Array(priv)); return (Buffer.from(secret)); } throw (new Error('Invalid algorithm: ' + this._algo)); }; DiffieHellman.prototype.generateKey = function () { var parts = []; var priv, pub; if (this._algo === 'dsa') { this._dh.generateKeys(); parts.push({name: 'p', data: this._p.data}); parts.push({name: 'q', data: this._key.part.q.data}); parts.push({name: 'g', data: this._g.data}); parts.push({name: 'y', data: this._dh.getPublicKey()}); parts.push({name: 'x', data: this._dh.getPrivateKey()}); this._key = new PrivateKey({ type: 'dsa', parts: parts }); this._isPriv = true; return (this._key); } else if (this._algo === 'ecdsa') { if (CRYPTO_HAVE_ECDH) { this._dh.generateKeys(); parts.push({name: 'curve', data: Buffer.from(this._curve)}); parts.push({name: 'Q', data: this._dh.getPublicKey()}); parts.push({name: 'd', data: this._dh.getPrivateKey()}); this._key = new PrivateKey({ type: 'ecdsa', curve: this._curve, parts: parts }); this._isPriv = true; return (this._key); } else { var n = this._ecParams.getN(); var r = new jsbn(crypto.randomBytes(n.bitLength())); var n1 = n.subtract(jsbn.ONE); priv = r.mod(n1).add(jsbn.ONE); pub = this._ecParams.getG().multiply(priv); priv = Buffer.from(priv.toByteArray()); pub = Buffer.from(this._ecParams.getCurve(). encodePointHex(pub), 'hex'); this._priv = new ECPrivate(this._ecParams, priv); parts.push({name: 'curve', data: Buffer.from(this._curve)}); parts.push({name: 'Q', data: pub}); parts.push({name: 'd', data: priv}); this._key = new PrivateKey({ type: 'ecdsa', curve: this._curve, parts: parts }); this._isPriv = true; return (this._key); } } else if (this._algo === 'curve25519') { var pair = nacl.box.keyPair(); priv = Buffer.from(pair.secretKey); pub = Buffer.from(pair.publicKey); priv = Buffer.concat([priv, pub]); assert.strictEqual(priv.length, 64); assert.strictEqual(pub.length, 32); parts.push({name: 'A', data: pub}); parts.push({name: 'k', data: priv}); this._key = new PrivateKey({ type: 'curve25519', parts: parts }); this._isPriv = true; return (this._key); } throw (new Error('Invalid algorithm: ' + this._algo)); }; DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; /* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ function X9ECParameters(name) { var params = algs.curves[name]; assert.object(params); var p = new jsbn(params.p); var a = new jsbn(params.a); var b = new jsbn(params.b); var n = new jsbn(params.n); var h = jsbn.ONE; var curve = new ec.ECCurveFp(p, a, b); var G = curve.decodePointHex(params.G.toString('hex')); this.curve = curve; this.g = G; this.n = n; this.h = h; } X9ECParameters.prototype.getCurve = function () { return (this.curve); }; X9ECParameters.prototype.getG = function () { return (this.g); }; X9ECParameters.prototype.getN = function () { return (this.n); }; X9ECParameters.prototype.getH = function () { return (this.h); }; function ECPublic(params, buffer) { this._params = params; if (buffer[0] === 0x00) buffer = buffer.slice(1); this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); } function ECPrivate(params, buffer) { this._params = params; this._priv = new jsbn(utils.mpNormalize(buffer)); } ECPrivate.prototype.deriveSharedSecret = function (pubKey) { assert.ok(pubKey instanceof ECPublic); var S = pubKey._pub.multiply(this._priv); return (Buffer.from(S.getX().toBigInteger().toByteArray())); }; function generateED25519() { var pair = nacl.sign.keyPair(); var priv = Buffer.from(pair.secretKey); var pub = Buffer.from(pair.publicKey); assert.strictEqual(priv.length, 64); assert.strictEqual(pub.length, 32); var parts = []; parts.push({name: 'A', data: pub}); parts.push({name: 'k', data: priv.slice(0, 32)}); var key = new PrivateKey({ type: 'ed25519', parts: parts }); return (key); } /* Generates a new ECDSA private key on a given curve. */ function generateECDSA(curve) { var parts = []; var key; if (CRYPTO_HAVE_ECDH) { /* * Node crypto doesn't expose key generation directly, but the * ECDH instances can generate keys. It turns out this just * calls into the OpenSSL generic key generator, and we can * read its output happily without doing an actual DH. So we * use that here. */ var osCurve = { 'nistp256': 'prime256v1', 'nistp384': 'secp384r1', 'nistp521': 'secp521r1' }[curve]; var dh = crypto.createECDH(osCurve); dh.generateKeys(); parts.push({name: 'curve', data: Buffer.from(curve)}); parts.push({name: 'Q', data: dh.getPublicKey()}); parts.push({name: 'd', data: dh.getPrivateKey()}); key = new PrivateKey({ type: 'ecdsa', curve: curve, parts: parts }); return (key); } else { var ecParams = new X9ECParameters(curve); /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ var n = ecParams.getN(); /* * The crypto.randomBytes() function can only give us whole * bytes, so taking a nod from X9.62, we round up. */ var cByteLen = Math.ceil((n.bitLength() + 64) / 8); var c = new jsbn(crypto.randomBytes(cByteLen)); var n1 = n.subtract(jsbn.ONE); var priv = c.mod(n1).add(jsbn.ONE); var pub = ecParams.getG().multiply(priv); priv = Buffer.from(priv.toByteArray()); pub = Buffer.from(ecParams.getCurve(). encodePointHex(pub), 'hex'); parts.push({name: 'curve', data: Buffer.from(curve)}); parts.push({name: 'Q', data: pub}); parts.push({name: 'd', data: priv}); key = new PrivateKey({ type: 'ecdsa', curve: curve, parts: parts }); return (key); } } /***/ }), /***/ 14694: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = { Verifier: Verifier, Signer: Signer }; var nacl = __webpack_require__(68729); var stream = __webpack_require__(92413); var util = __webpack_require__(31669); var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var Signature = __webpack_require__(91394); function Verifier(key, hashAlgo) { if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + 'SHA-512 hashes')); this.key = key; this.chunks = []; stream.Writable.call(this, {}); } util.inherits(Verifier, stream.Writable); Verifier.prototype._write = function (chunk, enc, cb) { this.chunks.push(chunk); cb(); }; Verifier.prototype.update = function (chunk) { if (typeof (chunk) === 'string') chunk = Buffer.from(chunk, 'binary'); this.chunks.push(chunk); }; Verifier.prototype.verify = function (signature, fmt) { var sig; if (Signature.isSignature(signature, [2, 0])) { if (signature.type !== 'ed25519') return (false); sig = signature.toBuffer('raw'); } else if (typeof (signature) === 'string') { sig = Buffer.from(signature, 'base64'); } else if (Signature.isSignature(signature, [1, 0])) { throw (new Error('signature was created by too old ' + 'a version of sshpk and cannot be verified')); } assert.buffer(sig); return (nacl.sign.detached.verify( new Uint8Array(Buffer.concat(this.chunks)), new Uint8Array(sig), new Uint8Array(this.key.part.A.data))); }; function Signer(key, hashAlgo) { if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + 'SHA-512 hashes')); this.key = key; this.chunks = []; stream.Writable.call(this, {}); } util.inherits(Signer, stream.Writable); Signer.prototype._write = function (chunk, enc, cb) { this.chunks.push(chunk); cb(); }; Signer.prototype.update = function (chunk) { if (typeof (chunk) === 'string') chunk = Buffer.from(chunk, 'binary'); this.chunks.push(chunk); }; Signer.prototype.sign = function () { var sig = nacl.sign.detached( new Uint8Array(Buffer.concat(this.chunks)), new Uint8Array(Buffer.concat([ this.key.part.k.data, this.key.part.A.data]))); var sigBuf = Buffer.from(sig); var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); sigObj.hashAlgorithm = 'sha512'; return (sigObj); }; /***/ }), /***/ 27979: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. var assert = __webpack_require__(66631); var util = __webpack_require__(31669); function FingerprintFormatError(fp, format) { if (Error.captureStackTrace) Error.captureStackTrace(this, FingerprintFormatError); this.name = 'FingerprintFormatError'; this.fingerprint = fp; this.format = format; this.message = 'Fingerprint format is not supported, or is invalid: '; if (fp !== undefined) this.message += ' fingerprint = ' + fp; if (format !== undefined) this.message += ' format = ' + format; } util.inherits(FingerprintFormatError, Error); function InvalidAlgorithmError(alg) { if (Error.captureStackTrace) Error.captureStackTrace(this, InvalidAlgorithmError); this.name = 'InvalidAlgorithmError'; this.algorithm = alg; this.message = 'Algorithm "' + alg + '" is not supported'; } util.inherits(InvalidAlgorithmError, Error); function KeyParseError(name, format, innerErr) { if (Error.captureStackTrace) Error.captureStackTrace(this, KeyParseError); this.name = 'KeyParseError'; this.format = format; this.keyName = name; this.innerErr = innerErr; this.message = 'Failed to parse ' + name + ' as a valid ' + format + ' format key: ' + innerErr.message; } util.inherits(KeyParseError, Error); function SignatureParseError(type, format, innerErr) { if (Error.captureStackTrace) Error.captureStackTrace(this, SignatureParseError); this.name = 'SignatureParseError'; this.type = type; this.format = format; this.innerErr = innerErr; this.message = 'Failed to parse the given data as a ' + type + ' signature in ' + format + ' format: ' + innerErr.message; } util.inherits(SignatureParseError, Error); function CertificateParseError(name, format, innerErr) { if (Error.captureStackTrace) Error.captureStackTrace(this, CertificateParseError); this.name = 'CertificateParseError'; this.format = format; this.certName = name; this.innerErr = innerErr; this.message = 'Failed to parse ' + name + ' as a valid ' + format + ' format certificate: ' + innerErr.message; } util.inherits(CertificateParseError, Error); function KeyEncryptedError(name, format) { if (Error.captureStackTrace) Error.captureStackTrace(this, KeyEncryptedError); this.name = 'KeyEncryptedError'; this.format = format; this.keyName = name; this.message = 'The ' + format + ' format key ' + name + ' is ' + 'encrypted (password-protected), and no passphrase was ' + 'provided in `options`'; } util.inherits(KeyEncryptedError, Error); module.exports = { FingerprintFormatError: FingerprintFormatError, InvalidAlgorithmError: InvalidAlgorithmError, KeyParseError: KeyParseError, SignatureParseError: SignatureParseError, KeyEncryptedError: KeyEncryptedError, CertificateParseError: CertificateParseError }; /***/ }), /***/ 13079: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2018 Joyent, Inc. module.exports = Fingerprint; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var crypto = __webpack_require__(33373); var errs = __webpack_require__(27979); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var Certificate = __webpack_require__(7406); var utils = __webpack_require__(80575); var FingerprintFormatError = errs.FingerprintFormatError; var InvalidAlgorithmError = errs.InvalidAlgorithmError; function Fingerprint(opts) { assert.object(opts, 'options'); assert.string(opts.type, 'options.type'); assert.buffer(opts.hash, 'options.hash'); assert.string(opts.algorithm, 'options.algorithm'); this.algorithm = opts.algorithm.toLowerCase(); if (algs.hashAlgs[this.algorithm] !== true) throw (new InvalidAlgorithmError(this.algorithm)); this.hash = opts.hash; this.type = opts.type; this.hashType = opts.hashType; } Fingerprint.prototype.toString = function (format) { if (format === undefined) { if (this.algorithm === 'md5' || this.hashType === 'spki') format = 'hex'; else format = 'base64'; } assert.string(format); switch (format) { case 'hex': if (this.hashType === 'spki') return (this.hash.toString('hex')); return (addColons(this.hash.toString('hex'))); case 'base64': if (this.hashType === 'spki') return (this.hash.toString('base64')); return (sshBase64Format(this.algorithm, this.hash.toString('base64'))); default: throw (new FingerprintFormatError(undefined, format)); } }; Fingerprint.prototype.matches = function (other) { assert.object(other, 'key or certificate'); if (this.type === 'key' && this.hashType !== 'ssh') { utils.assertCompatible(other, Key, [1, 7], 'key with spki'); if (PrivateKey.isPrivateKey(other)) { utils.assertCompatible(other, PrivateKey, [1, 6], 'privatekey with spki support'); } } else if (this.type === 'key') { utils.assertCompatible(other, Key, [1, 0], 'key'); } else { utils.assertCompatible(other, Certificate, [1, 0], 'certificate'); } var theirHash = other.hash(this.algorithm, this.hashType); var theirHash2 = crypto.createHash(this.algorithm). update(theirHash).digest('base64'); if (this.hash2 === undefined) this.hash2 = crypto.createHash(this.algorithm). update(this.hash).digest('base64'); return (this.hash2 === theirHash2); }; /*JSSTYLED*/ var base64RE = /^[A-Za-z0-9+\/=]+$/; /*JSSTYLED*/ var hexRE = /^[a-fA-F0-9]+$/; Fingerprint.parse = function (fp, options) { assert.string(fp, 'fingerprint'); var alg, hash, enAlgs; if (Array.isArray(options)) { enAlgs = options; options = {}; } assert.optionalObject(options, 'options'); if (options === undefined) options = {}; if (options.enAlgs !== undefined) enAlgs = options.enAlgs; if (options.algorithms !== undefined) enAlgs = options.algorithms; assert.optionalArrayOfString(enAlgs, 'algorithms'); var hashType = 'ssh'; if (options.hashType !== undefined) hashType = options.hashType; assert.string(hashType, 'options.hashType'); var parts = fp.split(':'); if (parts.length == 2) { alg = parts[0].toLowerCase(); if (!base64RE.test(parts[1])) throw (new FingerprintFormatError(fp)); try { hash = Buffer.from(parts[1], 'base64'); } catch (e) { throw (new FingerprintFormatError(fp)); } } else if (parts.length > 2) { alg = 'md5'; if (parts[0].toLowerCase() === 'md5') parts = parts.slice(1); parts = parts.map(function (p) { while (p.length < 2) p = '0' + p; if (p.length > 2) throw (new FingerprintFormatError(fp)); return (p); }); parts = parts.join(''); if (!hexRE.test(parts) || parts.length % 2 !== 0) throw (new FingerprintFormatError(fp)); try { hash = Buffer.from(parts, 'hex'); } catch (e) { throw (new FingerprintFormatError(fp)); } } else { if (hexRE.test(fp)) { hash = Buffer.from(fp, 'hex'); } else if (base64RE.test(fp)) { hash = Buffer.from(fp, 'base64'); } else { throw (new FingerprintFormatError(fp)); } switch (hash.length) { case 32: alg = 'sha256'; break; case 16: alg = 'md5'; break; case 20: alg = 'sha1'; break; case 64: alg = 'sha512'; break; default: throw (new FingerprintFormatError(fp)); } /* Plain hex/base64: guess it's probably SPKI unless told. */ if (options.hashType === undefined) hashType = 'spki'; } if (alg === undefined) throw (new FingerprintFormatError(fp)); if (algs.hashAlgs[alg] === undefined) throw (new InvalidAlgorithmError(alg)); if (enAlgs !== undefined) { enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); if (enAlgs.indexOf(alg) === -1) throw (new InvalidAlgorithmError(alg)); } return (new Fingerprint({ algorithm: alg, hash: hash, type: options.type || 'key', hashType: hashType })); }; function addColons(s) { /*JSSTYLED*/ return (s.replace(/(.{2})(?=.)/g, '$1:')); } function base64Strip(s) { /*JSSTYLED*/ return (s.replace(/=*$/, '')); } function sshBase64Format(alg, h) { return (alg.toUpperCase() + ':' + base64Strip(h)); } Fingerprint.isFingerprint = function (obj, ver) { return (utils.isCompatible(obj, Fingerprint, ver)); }; /* * API versions for Fingerprint: * [1,0] -- initial ver * [1,1] -- first tagged ver * [1,2] -- hashType and spki support */ Fingerprint.prototype._sshpkApiVersion = [1, 2]; Fingerprint._oldVersionDetect = function (obj) { assert.func(obj.toString); assert.func(obj.matches); return ([1, 0]); }; /***/ }), /***/ 8243: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2018 Joyent, Inc. module.exports = { read: read, write: write }; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pem = __webpack_require__(14324); var ssh = __webpack_require__(68927); var rfc4253 = __webpack_require__(88688); var dnssec = __webpack_require__(63561); var putty = __webpack_require__(80974); var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; function read(buf, options) { if (typeof (buf) === 'string') { if (buf.trim().match(/^[-]+[ ]*BEGIN/)) return (pem.read(buf, options)); if (buf.match(/^\s*ssh-[a-z]/)) return (ssh.read(buf, options)); if (buf.match(/^\s*ecdsa-/)) return (ssh.read(buf, options)); if (buf.match(/^putty-user-key-file-2:/i)) return (putty.read(buf, options)); if (findDNSSECHeader(buf)) return (dnssec.read(buf, options)); buf = Buffer.from(buf, 'binary'); } else { assert.buffer(buf); if (findPEMHeader(buf)) return (pem.read(buf, options)); if (findSSHHeader(buf)) return (ssh.read(buf, options)); if (findPuTTYHeader(buf)) return (putty.read(buf, options)); if (findDNSSECHeader(buf)) return (dnssec.read(buf, options)); } if (buf.readUInt32BE(0) < buf.length) return (rfc4253.read(buf, options)); throw (new Error('Failed to auto-detect format of key')); } function findPuTTYHeader(buf) { var offset = 0; while (offset < buf.length && (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) ++offset; if (offset + 22 <= buf.length && buf.slice(offset, offset + 22).toString('ascii').toLowerCase() === 'putty-user-key-file-2:') return (true); return (false); } function findSSHHeader(buf) { var offset = 0; while (offset < buf.length && (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) ++offset; if (offset + 4 <= buf.length && buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') return (true); if (offset + 6 <= buf.length && buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') return (true); return (false); } function findPEMHeader(buf) { var offset = 0; while (offset < buf.length && (buf[offset] === 32 || buf[offset] === 10)) ++offset; if (buf[offset] !== 45) return (false); while (offset < buf.length && (buf[offset] === 45)) ++offset; while (offset < buf.length && (buf[offset] === 32)) ++offset; if (offset + 5 > buf.length || buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') return (false); return (true); } function findDNSSECHeader(buf) { // private case first if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) return (false); var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX) return (true); // public-key RFC3110 ? // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...' // skip any comment-lines if (typeof (buf) !== 'string') { buf = buf.toString('ascii'); } var lines = buf.split('\n'); var line = 0; /* JSSTYLED */ while (lines[line].match(/^\;/)) line++; if (lines[line].toString('ascii').match(/\. IN KEY /)) return (true); if (lines[line].toString('ascii').match(/\. IN DNSKEY /)) return (true); return (false); } function write(key, options) { throw (new Error('"auto" format cannot be used for writing')); } /***/ }), /***/ 63561: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2017 Joyent, Inc. module.exports = { read: read, write: write }; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var utils = __webpack_require__(80575); var SSHBuffer = __webpack_require__(25621); var Dhe = __webpack_require__(57602); var supportedAlgos = { 'rsa-sha1' : 5, 'rsa-sha256' : 8, 'rsa-sha512' : 10, 'ecdsa-p256-sha256' : 13, 'ecdsa-p384-sha384' : 14 /* * ed25519 is hypothetically supported with id 15 * but the common tools available don't appear to be * capable of generating/using ed25519 keys */ }; var supportedAlgosById = {}; Object.keys(supportedAlgos).forEach(function (k) { supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); }); function read(buf, options) { if (typeof (buf) !== 'string') { assert.buffer(buf, 'buf'); buf = buf.toString('ascii'); } var lines = buf.split('\n'); if (lines[0].match(/^Private-key-format\: v1/)) { var algElems = lines[1].split(' '); var algoNum = parseInt(algElems[1], 10); var algoName = algElems[2]; if (!supportedAlgosById[algoNum]) throw (new Error('Unsupported algorithm: ' + algoName)); return (readDNSSECPrivateKey(algoNum, lines.slice(2))); } // skip any comment-lines var line = 0; /* JSSTYLED */ while (lines[line].match(/^\;/)) line++; // we should now have *one single* line left with our KEY on it. if ((lines[line].match(/\. IN KEY /) || lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) { return (readRFC3110(lines[line])); } throw (new Error('Cannot parse dnssec key')); } function readRFC3110(keyString) { var elems = keyString.split(' '); //unused var flags = parseInt(elems[3], 10); //unused var protocol = parseInt(elems[4], 10); var algorithm = parseInt(elems[5], 10); if (!supportedAlgosById[algorithm]) throw (new Error('Unsupported algorithm: ' + algorithm)); var base64key = elems.slice(6, elems.length).join(); var keyBuffer = Buffer.from(base64key, 'base64'); if (supportedAlgosById[algorithm].match(/^RSA-/)) { // join the rest of the body into a single base64-blob var publicExponentLen = keyBuffer.readUInt8(0); if (publicExponentLen != 3 && publicExponentLen != 1) throw (new Error('Cannot parse dnssec key: ' + 'unsupported exponent length')); var publicExponent = keyBuffer.slice(1, publicExponentLen+1); publicExponent = utils.mpNormalize(publicExponent); var modulus = keyBuffer.slice(1+publicExponentLen); modulus = utils.mpNormalize(modulus); // now, make the key var rsaKey = { type: 'rsa', parts: [] }; rsaKey.parts.push({ name: 'e', data: publicExponent}); rsaKey.parts.push({ name: 'n', data: modulus}); return (new Key(rsaKey)); } if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' || supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') { var curve = 'nistp384'; var size = 384; if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { curve = 'nistp256'; size = 256; } var ecdsaKey = { type: 'ecdsa', curve: curve, size: size, parts: [ {name: 'curve', data: Buffer.from(curve) }, {name: 'Q', data: utils.ecNormalize(keyBuffer) } ] }; return (new Key(ecdsaKey)); } throw (new Error('Unsupported algorithm: ' + supportedAlgosById[algorithm])); } function elementToBuf(e) { return (Buffer.from(e.split(' ')[1], 'base64')); } function readDNSSECRSAPrivateKey(elements) { var rsaParams = {}; elements.forEach(function (element) { if (element.split(' ')[0] === 'Modulus:') rsaParams['n'] = elementToBuf(element); else if (element.split(' ')[0] === 'PublicExponent:') rsaParams['e'] = elementToBuf(element); else if (element.split(' ')[0] === 'PrivateExponent:') rsaParams['d'] = elementToBuf(element); else if (element.split(' ')[0] === 'Prime1:') rsaParams['p'] = elementToBuf(element); else if (element.split(' ')[0] === 'Prime2:') rsaParams['q'] = elementToBuf(element); else if (element.split(' ')[0] === 'Exponent1:') rsaParams['dmodp'] = elementToBuf(element); else if (element.split(' ')[0] === 'Exponent2:') rsaParams['dmodq'] = elementToBuf(element); else if (element.split(' ')[0] === 'Coefficient:') rsaParams['iqmp'] = elementToBuf(element); }); // now, make the key var key = { type: 'rsa', parts: [ { name: 'e', data: utils.mpNormalize(rsaParams['e'])}, { name: 'n', data: utils.mpNormalize(rsaParams['n'])}, { name: 'd', data: utils.mpNormalize(rsaParams['d'])}, { name: 'p', data: utils.mpNormalize(rsaParams['p'])}, { name: 'q', data: utils.mpNormalize(rsaParams['q'])}, { name: 'dmodp', data: utils.mpNormalize(rsaParams['dmodp'])}, { name: 'dmodq', data: utils.mpNormalize(rsaParams['dmodq'])}, { name: 'iqmp', data: utils.mpNormalize(rsaParams['iqmp'])} ] }; return (new PrivateKey(key)); } function readDNSSECPrivateKey(alg, elements) { if (supportedAlgosById[alg].match(/^RSA-/)) { return (readDNSSECRSAPrivateKey(elements)); } if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' || supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { var d = Buffer.from(elements[0].split(' ')[1], 'base64'); var curve = 'nistp384'; var size = 384; if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { curve = 'nistp256'; size = 256; } // DNSSEC generates the public-key on the fly (go calculate it) var publicKey = utils.publicFromPrivateECDSA(curve, d); var Q = publicKey.part['Q'].data; var ecdsaKey = { type: 'ecdsa', curve: curve, size: size, parts: [ {name: 'curve', data: Buffer.from(curve) }, {name: 'd', data: d }, {name: 'Q', data: Q } ] }; return (new PrivateKey(ecdsaKey)); } throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg])); } function dnssecTimestamp(date) { var year = date.getFullYear() + ''; //stringify var month = (date.getMonth() + 1); var timestampStr = year + month + date.getUTCDate(); timestampStr += '' + date.getUTCHours() + date.getUTCMinutes(); timestampStr += date.getUTCSeconds(); return (timestampStr); } function rsaAlgFromOptions(opts) { if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1') return ('5 (RSASHA1)'); else if (opts.hashAlgo === 'sha256') return ('8 (RSASHA256)'); else if (opts.hashAlgo === 'sha512') return ('10 (RSASHA512)'); else throw (new Error('Unknown or unsupported hash: ' + opts.hashAlgo)); } function writeRSA(key, options) { // if we're missing parts, add them. if (!key.part.dmodp || !key.part.dmodq) { utils.addRSAMissing(key); } var out = ''; out += 'Private-key-format: v1.3\n'; out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n'; var n = utils.mpDenormalize(key.part['n'].data); out += 'Modulus: ' + n.toString('base64') + '\n'; var e = utils.mpDenormalize(key.part['e'].data); out += 'PublicExponent: ' + e.toString('base64') + '\n'; var d = utils.mpDenormalize(key.part['d'].data); out += 'PrivateExponent: ' + d.toString('base64') + '\n'; var p = utils.mpDenormalize(key.part['p'].data); out += 'Prime1: ' + p.toString('base64') + '\n'; var q = utils.mpDenormalize(key.part['q'].data); out += 'Prime2: ' + q.toString('base64') + '\n'; var dmodp = utils.mpDenormalize(key.part['dmodp'].data); out += 'Exponent1: ' + dmodp.toString('base64') + '\n'; var dmodq = utils.mpDenormalize(key.part['dmodq'].data); out += 'Exponent2: ' + dmodq.toString('base64') + '\n'; var iqmp = utils.mpDenormalize(key.part['iqmp'].data); out += 'Coefficient: ' + iqmp.toString('base64') + '\n'; // Assume that we're valid as-of now var timestamp = new Date(); out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; return (Buffer.from(out, 'ascii')); } function writeECDSA(key, options) { var out = ''; out += 'Private-key-format: v1.3\n'; if (key.curve === 'nistp256') { out += 'Algorithm: 13 (ECDSAP256SHA256)\n'; } else if (key.curve === 'nistp384') { out += 'Algorithm: 14 (ECDSAP384SHA384)\n'; } else { throw (new Error('Unsupported curve')); } var base64Key = key.part['d'].data.toString('base64'); out += 'PrivateKey: ' + base64Key + '\n'; // Assume that we're valid as-of now var timestamp = new Date(); out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; return (Buffer.from(out, 'ascii')); } function write(key, options) { if (PrivateKey.isPrivateKey(key)) { if (key.type === 'rsa') { return (writeRSA(key, options)); } else if (key.type === 'ecdsa') { return (writeECDSA(key, options)); } else { throw (new Error('Unsupported algorithm: ' + key.type)); } } else if (Key.isKey(key)) { /* * RFC3110 requires a keyname, and a keytype, which we * don't really have a mechanism for specifying such * additional metadata. */ throw (new Error('Format "dnssec" only supports ' + 'writing private keys')); } else { throw (new Error('key is not a Key or PrivateKey')); } } /***/ }), /***/ 94033: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2017 Joyent, Inc. module.exports = { read: read, verify: verify, sign: sign, signAsync: signAsync, write: write, /* Internal private API */ fromBuffer: fromBuffer, toBuffer: toBuffer }; var assert = __webpack_require__(66631); var SSHBuffer = __webpack_require__(25621); var crypto = __webpack_require__(33373); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var Identity = __webpack_require__(70508); var rfc4253 = __webpack_require__(88688); var Signature = __webpack_require__(91394); var utils = __webpack_require__(80575); var Certificate = __webpack_require__(7406); function verify(cert, key) { /* * We always give an issuerKey, so if our verify() is being called then * there was no signature. Return false. */ return (false); } var TYPES = { 'user': 1, 'host': 2 }; Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; }); var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/; function read(buf, options) { if (Buffer.isBuffer(buf)) buf = buf.toString('ascii'); var parts = buf.trim().split(/[ \t\n]+/g); if (parts.length < 2 || parts.length > 3) throw (new Error('Not a valid SSH certificate line')); var algo = parts[0]; var data = parts[1]; data = Buffer.from(data, 'base64'); return (fromBuffer(data, algo)); } function fromBuffer(data, algo, partial) { var sshbuf = new SSHBuffer({ buffer: data }); var innerAlgo = sshbuf.readString(); if (algo !== undefined && innerAlgo !== algo) throw (new Error('SSH certificate algorithm mismatch')); if (algo === undefined) algo = innerAlgo; var cert = {}; cert.signatures = {}; cert.signatures.openssh = {}; cert.signatures.openssh.nonce = sshbuf.readBuffer(); var key = {}; var parts = (key.parts = []); key.type = getAlg(algo); var partCount = algs.info[key.type].parts.length; while (parts.length < partCount) parts.push(sshbuf.readPart()); assert.ok(parts.length >= 1, 'key must have at least one part'); var algInfo = algs.info[key.type]; if (key.type === 'ecdsa') { var res = ECDSA_ALGO.exec(algo); assert.ok(res !== null); assert.strictEqual(res[1], parts[0].data.toString()); } for (var i = 0; i < algInfo.parts.length; ++i) { parts[i].name = algInfo.parts[i]; if (parts[i].name !== 'curve' && algInfo.normalize !== false) { var p = parts[i]; p.data = utils.mpNormalize(p.data); } } cert.subjectKey = new Key(key); cert.serial = sshbuf.readInt64(); var type = TYPES[sshbuf.readInt()]; assert.string(type, 'valid cert type'); cert.signatures.openssh.keyId = sshbuf.readString(); var principals = []; var pbuf = sshbuf.readBuffer(); var psshbuf = new SSHBuffer({ buffer: pbuf }); while (!psshbuf.atEnd()) principals.push(psshbuf.readString()); if (principals.length === 0) principals = ['*']; cert.subjects = principals.map(function (pr) { if (type === 'user') return (Identity.forUser(pr)); else if (type === 'host') return (Identity.forHost(pr)); throw (new Error('Unknown identity type ' + type)); }); cert.validFrom = int64ToDate(sshbuf.readInt64()); cert.validUntil = int64ToDate(sshbuf.readInt64()); var exts = []; var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); var ext; while (!extbuf.atEnd()) { ext = { critical: true }; ext.name = extbuf.readString(); ext.data = extbuf.readBuffer(); exts.push(ext); } extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); while (!extbuf.atEnd()) { ext = { critical: false }; ext.name = extbuf.readString(); ext.data = extbuf.readBuffer(); exts.push(ext); } cert.signatures.openssh.exts = exts; /* reserved */ sshbuf.readBuffer(); var signingKeyBuf = sshbuf.readBuffer(); cert.issuerKey = rfc4253.read(signingKeyBuf); /* * OpenSSH certs don't give the identity of the issuer, just their * public key. So, we use an Identity that matches anything. The * isSignedBy() function will later tell you if the key matches. */ cert.issuer = Identity.forHost('**'); var sigBuf = sshbuf.readBuffer(); cert.signatures.openssh.signature = Signature.parse(sigBuf, cert.issuerKey.type, 'ssh'); if (partial !== undefined) { partial.remainder = sshbuf.remainder(); partial.consumed = sshbuf._offset; } return (new Certificate(cert)); } function int64ToDate(buf) { var i = buf.readUInt32BE(0) * 4294967296; i += buf.readUInt32BE(4); var d = new Date(); d.setTime(i * 1000); d.sourceInt64 = buf; return (d); } function dateToInt64(date) { if (date.sourceInt64 !== undefined) return (date.sourceInt64); var i = Math.round(date.getTime() / 1000); var upper = Math.floor(i / 4294967296); var lower = Math.floor(i % 4294967296); var buf = Buffer.alloc(8); buf.writeUInt32BE(upper, 0); buf.writeUInt32BE(lower, 4); return (buf); } function sign(cert, key) { if (cert.signatures.openssh === undefined) cert.signatures.openssh = {}; try { var blob = toBuffer(cert, true); } catch (e) { delete (cert.signatures.openssh); return (false); } var sig = cert.signatures.openssh; var hashAlgo = undefined; if (key.type === 'rsa' || key.type === 'dsa') hashAlgo = 'sha1'; var signer = key.createSign(hashAlgo); signer.write(blob); sig.signature = signer.sign(); return (true); } function signAsync(cert, signer, done) { if (cert.signatures.openssh === undefined) cert.signatures.openssh = {}; try { var blob = toBuffer(cert, true); } catch (e) { delete (cert.signatures.openssh); done(e); return; } var sig = cert.signatures.openssh; signer(blob, function (err, signature) { if (err) { done(err); return; } try { /* * This will throw if the signature isn't of a * type/algo that can be used for SSH. */ signature.toBuffer('ssh'); } catch (e) { done(e); return; } sig.signature = signature; done(); }); } function write(cert, options) { if (options === undefined) options = {}; var blob = toBuffer(cert); var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64'); if (options.comment) out = out + ' ' + options.comment; return (out); } function toBuffer(cert, noSig) { assert.object(cert.signatures.openssh, 'signature for openssh format'); var sig = cert.signatures.openssh; if (sig.nonce === undefined) sig.nonce = crypto.randomBytes(16); var buf = new SSHBuffer({}); buf.writeString(getCertType(cert.subjectKey)); buf.writeBuffer(sig.nonce); var key = cert.subjectKey; var algInfo = algs.info[key.type]; algInfo.parts.forEach(function (part) { buf.writePart(key.part[part]); }); buf.writeInt64(cert.serial); var type = cert.subjects[0].type; assert.notStrictEqual(type, 'unknown'); cert.subjects.forEach(function (id) { assert.strictEqual(id.type, type); }); type = TYPES[type]; buf.writeInt(type); if (sig.keyId === undefined) { sig.keyId = cert.subjects[0].type + '_' + (cert.subjects[0].uid || cert.subjects[0].hostname); } buf.writeString(sig.keyId); var sub = new SSHBuffer({}); cert.subjects.forEach(function (id) { if (type === TYPES.host) sub.writeString(id.hostname); else if (type === TYPES.user) sub.writeString(id.uid); }); buf.writeBuffer(sub.toBuffer()); buf.writeInt64(dateToInt64(cert.validFrom)); buf.writeInt64(dateToInt64(cert.validUntil)); var exts = sig.exts; if (exts === undefined) exts = []; var extbuf = new SSHBuffer({}); exts.forEach(function (ext) { if (ext.critical !== true) return; extbuf.writeString(ext.name); extbuf.writeBuffer(ext.data); }); buf.writeBuffer(extbuf.toBuffer()); extbuf = new SSHBuffer({}); exts.forEach(function (ext) { if (ext.critical === true) return; extbuf.writeString(ext.name); extbuf.writeBuffer(ext.data); }); buf.writeBuffer(extbuf.toBuffer()); /* reserved */ buf.writeBuffer(Buffer.alloc(0)); sub = rfc4253.write(cert.issuerKey); buf.writeBuffer(sub); if (!noSig) buf.writeBuffer(sig.signature.toBuffer('ssh')); return (buf.toBuffer()); } function getAlg(certType) { if (certType === 'ssh-rsa-cert-v01@openssh.com') return ('rsa'); if (certType === 'ssh-dss-cert-v01@openssh.com') return ('dsa'); if (certType.match(ECDSA_ALGO)) return ('ecdsa'); if (certType === 'ssh-ed25519-cert-v01@openssh.com') return ('ed25519'); throw (new Error('Unsupported cert type ' + certType)); } function getCertType(key) { if (key.type === 'rsa') return ('ssh-rsa-cert-v01@openssh.com'); if (key.type === 'dsa') return ('ssh-dss-cert-v01@openssh.com'); if (key.type === 'ecdsa') return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com'); if (key.type === 'ed25519') return ('ssh-ed25519-cert-v01@openssh.com'); throw (new Error('Unsupported key type ' + key.type)); } /***/ }), /***/ 14324: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2018 Joyent, Inc. module.exports = { read: read, write: write }; var assert = __webpack_require__(66631); var asn1 = __webpack_require__(80970); var crypto = __webpack_require__(33373); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pkcs1 = __webpack_require__(69367); var pkcs8 = __webpack_require__(4173); var sshpriv = __webpack_require__(3923); var rfc4253 = __webpack_require__(88688); var errors = __webpack_require__(27979); var OID_PBES2 = '1.2.840.113549.1.5.13'; var OID_PBKDF2 = '1.2.840.113549.1.5.12'; var OID_TO_CIPHER = { '1.2.840.113549.3.7': '3des-cbc', '2.16.840.1.101.3.4.1.2': 'aes128-cbc', '2.16.840.1.101.3.4.1.42': 'aes256-cbc' }; var CIPHER_TO_OID = {}; Object.keys(OID_TO_CIPHER).forEach(function (k) { CIPHER_TO_OID[OID_TO_CIPHER[k]] = k; }); var OID_TO_HASH = { '1.2.840.113549.2.7': 'sha1', '1.2.840.113549.2.9': 'sha256', '1.2.840.113549.2.11': 'sha512' }; var HASH_TO_OID = {}; Object.keys(OID_TO_HASH).forEach(function (k) { HASH_TO_OID[OID_TO_HASH[k]] = k; }); /* * For reading we support both PKCS#1 and PKCS#8. If we find a private key, * we just take the public component of it and use that. */ function read(buf, options, forceType) { var input = buf; if (typeof (buf) !== 'string') { assert.buffer(buf, 'buf'); buf = buf.toString('ascii'); } var lines = buf.trim().split(/[\r\n]+/g); var m; var si = -1; while (!m && si < lines.length) { m = lines[++si].match(/*JSSTYLED*/ /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); } assert.ok(m, 'invalid PEM header'); var m2; var ei = lines.length; while (!m2 && ei > 0) { m2 = lines[--ei].match(/*JSSTYLED*/ /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); } assert.ok(m2, 'invalid PEM footer'); /* Begin and end banners must match key type */ assert.equal(m[2], m2[2]); var type = m[2].toLowerCase(); var alg; if (m[1]) { /* They also must match algorithms, if given */ assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); alg = m[1].trim(); } lines = lines.slice(si, ei + 1); var headers = {}; while (true) { lines = lines.slice(1); m = lines[0].match(/*JSSTYLED*/ /^([A-Za-z0-9-]+): (.+)$/); if (!m) break; headers[m[1].toLowerCase()] = m[2]; } /* Chop off the first and last lines */ lines = lines.slice(0, -1).join(''); buf = Buffer.from(lines, 'base64'); var cipher, key, iv; if (headers['proc-type']) { var parts = headers['proc-type'].split(','); if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { if (typeof (options.passphrase) === 'string') { options.passphrase = Buffer.from( options.passphrase, 'utf-8'); } if (!Buffer.isBuffer(options.passphrase)) { throw (new errors.KeyEncryptedError( options.filename, 'PEM')); } else { parts = headers['dek-info'].split(','); assert.ok(parts.length === 2); cipher = parts[0].toLowerCase(); iv = Buffer.from(parts[1], 'hex'); key = utils.opensslKeyDeriv(cipher, iv, options.passphrase, 1).key; } } } if (alg && alg.toLowerCase() === 'encrypted') { var eder = new asn1.BerReader(buf); var pbesEnd; eder.readSequence(); eder.readSequence(); pbesEnd = eder.offset + eder.length; var method = eder.readOID(); if (method !== OID_PBES2) { throw (new Error('Unsupported PEM/PKCS8 encryption ' + 'scheme: ' + method)); } eder.readSequence(); /* PBES2-params */ eder.readSequence(); /* keyDerivationFunc */ var kdfEnd = eder.offset + eder.length; var kdfOid = eder.readOID(); if (kdfOid !== OID_PBKDF2) throw (new Error('Unsupported PBES2 KDF: ' + kdfOid)); eder.readSequence(); var salt = eder.readString(asn1.Ber.OctetString, true); var iterations = eder.readInt(); var hashAlg = 'sha1'; if (eder.offset < kdfEnd) { eder.readSequence(); var hashAlgOid = eder.readOID(); hashAlg = OID_TO_HASH[hashAlgOid]; if (hashAlg === undefined) { throw (new Error('Unsupported PBKDF2 hash: ' + hashAlgOid)); } } eder._offset = kdfEnd; eder.readSequence(); /* encryptionScheme */ var cipherOid = eder.readOID(); cipher = OID_TO_CIPHER[cipherOid]; if (cipher === undefined) { throw (new Error('Unsupported PBES2 cipher: ' + cipherOid)); } iv = eder.readString(asn1.Ber.OctetString, true); eder._offset = pbesEnd; buf = eder.readString(asn1.Ber.OctetString, true); if (typeof (options.passphrase) === 'string') { options.passphrase = Buffer.from( options.passphrase, 'utf-8'); } if (!Buffer.isBuffer(options.passphrase)) { throw (new errors.KeyEncryptedError( options.filename, 'PEM')); } var cinfo = utils.opensshCipherInfo(cipher); cipher = cinfo.opensslName; key = utils.pbkdf2(hashAlg, salt, iterations, cinfo.keySize, options.passphrase); alg = undefined; } if (cipher && key && iv) { var cipherStream = crypto.createDecipheriv(cipher, key, iv); var chunk, chunks = []; cipherStream.once('error', function (e) { if (e.toString().indexOf('bad decrypt') !== -1) { throw (new Error('Incorrect passphrase ' + 'supplied, could not decrypt key')); } throw (e); }); cipherStream.write(buf); cipherStream.end(); while ((chunk = cipherStream.read()) !== null) chunks.push(chunk); buf = Buffer.concat(chunks); } /* The new OpenSSH internal format abuses PEM headers */ if (alg && alg.toLowerCase() === 'openssh') return (sshpriv.readSSHPrivate(type, buf, options)); if (alg && alg.toLowerCase() === 'ssh2') return (rfc4253.readType(type, buf, options)); var der = new asn1.BerReader(buf); der.originalInput = input; /* * All of the PEM file types start with a sequence tag, so chop it * off here */ der.readSequence(); /* PKCS#1 type keys name an algorithm in the banner explicitly */ if (alg) { if (forceType) assert.strictEqual(forceType, 'pkcs1'); return (pkcs1.readPkcs1(alg, type, der)); } else { if (forceType) assert.strictEqual(forceType, 'pkcs8'); return (pkcs8.readPkcs8(alg, type, der)); } } function write(key, options, type) { assert.object(key); var alg = { 'ecdsa': 'EC', 'rsa': 'RSA', 'dsa': 'DSA', 'ed25519': 'EdDSA' }[key.type]; var header; var der = new asn1.BerWriter(); if (PrivateKey.isPrivateKey(key)) { if (type && type === 'pkcs8') { header = 'PRIVATE KEY'; pkcs8.writePkcs8(der, key); } else { if (type) assert.strictEqual(type, 'pkcs1'); header = alg + ' PRIVATE KEY'; pkcs1.writePkcs1(der, key); } } else if (Key.isKey(key)) { if (type && type === 'pkcs1') { header = alg + ' PUBLIC KEY'; pkcs1.writePkcs1(der, key); } else { if (type) assert.strictEqual(type, 'pkcs8'); header = 'PUBLIC KEY'; pkcs8.writePkcs8(der, key); } } else { throw (new Error('key is not a Key or PrivateKey')); } var tmp = der.buffer.toString('base64'); var len = tmp.length + (tmp.length / 64) + 18 + 16 + header.length*2 + 10; var buf = Buffer.alloc(len); var o = 0; o += buf.write('-----BEGIN ' + header + '-----\n', o); for (var i = 0; i < tmp.length; ) { var limit = i + 64; if (limit > tmp.length) limit = tmp.length; o += buf.write(tmp.slice(i, limit), o); buf[o++] = 10; i = limit; } o += buf.write('-----END ' + header + '-----\n', o); return (buf.slice(0, o)); } /***/ }), /***/ 69367: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = { read: read, readPkcs1: readPkcs1, write: write, writePkcs1: writePkcs1 }; var assert = __webpack_require__(66631); var asn1 = __webpack_require__(80970); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pem = __webpack_require__(14324); var pkcs8 = __webpack_require__(4173); var readECDSACurve = pkcs8.readECDSACurve; function read(buf, options) { return (pem.read(buf, options, 'pkcs1')); } function write(key, options) { return (pem.write(key, options, 'pkcs1')); } /* Helper to read in a single mpint */ function readMPInt(der, nm) { assert.strictEqual(der.peek(), asn1.Ber.Integer, nm + ' is not an Integer'); return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); } function readPkcs1(alg, type, der) { switch (alg) { case 'RSA': if (type === 'public') return (readPkcs1RSAPublic(der)); else if (type === 'private') return (readPkcs1RSAPrivate(der)); throw (new Error('Unknown key type: ' + type)); case 'DSA': if (type === 'public') return (readPkcs1DSAPublic(der)); else if (type === 'private') return (readPkcs1DSAPrivate(der)); throw (new Error('Unknown key type: ' + type)); case 'EC': case 'ECDSA': if (type === 'private') return (readPkcs1ECDSAPrivate(der)); else if (type === 'public') return (readPkcs1ECDSAPublic(der)); throw (new Error('Unknown key type: ' + type)); case 'EDDSA': case 'EdDSA': if (type === 'private') return (readPkcs1EdDSAPrivate(der)); throw (new Error(type + ' keys not supported with EdDSA')); default: throw (new Error('Unknown key algo: ' + alg)); } } function readPkcs1RSAPublic(der) { // modulus and exponent var n = readMPInt(der, 'modulus'); var e = readMPInt(der, 'exponent'); // now, make the key var key = { type: 'rsa', parts: [ { name: 'e', data: e }, { name: 'n', data: n } ] }; return (new Key(key)); } function readPkcs1RSAPrivate(der) { var version = readMPInt(der, 'version'); assert.strictEqual(version[0], 0); // modulus then public exponent var n = readMPInt(der, 'modulus'); var e = readMPInt(der, 'public exponent'); var d = readMPInt(der, 'private exponent'); var p = readMPInt(der, 'prime1'); var q = readMPInt(der, 'prime2'); var dmodp = readMPInt(der, 'exponent1'); var dmodq = readMPInt(der, 'exponent2'); var iqmp = readMPInt(der, 'iqmp'); // now, make the key var key = { type: 'rsa', parts: [ { name: 'n', data: n }, { name: 'e', data: e }, { name: 'd', data: d }, { name: 'iqmp', data: iqmp }, { name: 'p', data: p }, { name: 'q', data: q }, { name: 'dmodp', data: dmodp }, { name: 'dmodq', data: dmodq } ] }; return (new PrivateKey(key)); } function readPkcs1DSAPrivate(der) { var version = readMPInt(der, 'version'); assert.strictEqual(version.readUInt8(0), 0); var p = readMPInt(der, 'p'); var q = readMPInt(der, 'q'); var g = readMPInt(der, 'g'); var y = readMPInt(der, 'y'); var x = readMPInt(der, 'x'); // now, make the key var key = { type: 'dsa', parts: [ { name: 'p', data: p }, { name: 'q', data: q }, { name: 'g', data: g }, { name: 'y', data: y }, { name: 'x', data: x } ] }; return (new PrivateKey(key)); } function readPkcs1EdDSAPrivate(der) { var version = readMPInt(der, 'version'); assert.strictEqual(version.readUInt8(0), 1); // private key var k = der.readString(asn1.Ber.OctetString, true); der.readSequence(0xa0); var oid = der.readOID(); assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier'); der.readSequence(0xa1); var A = utils.readBitString(der); var key = { type: 'ed25519', parts: [ { name: 'A', data: utils.zeroPadToLength(A, 32) }, { name: 'k', data: k } ] }; return (new PrivateKey(key)); } function readPkcs1DSAPublic(der) { var y = readMPInt(der, 'y'); var p = readMPInt(der, 'p'); var q = readMPInt(der, 'q'); var g = readMPInt(der, 'g'); var key = { type: 'dsa', parts: [ { name: 'y', data: y }, { name: 'p', data: p }, { name: 'q', data: q }, { name: 'g', data: g } ] }; return (new Key(key)); } function readPkcs1ECDSAPublic(der) { der.readSequence(); var oid = der.readOID(); assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); var curveOid = der.readOID(); var curve; var curves = Object.keys(algs.curves); for (var j = 0; j < curves.length; ++j) { var c = curves[j]; var cd = algs.curves[c]; if (cd.pkcs8oid === curveOid) { curve = c; break; } } assert.string(curve, 'a known ECDSA named curve'); var Q = der.readString(asn1.Ber.BitString, true); Q = utils.ecNormalize(Q); var key = { type: 'ecdsa', parts: [ { name: 'curve', data: Buffer.from(curve) }, { name: 'Q', data: Q } ] }; return (new Key(key)); } function readPkcs1ECDSAPrivate(der) { var version = readMPInt(der, 'version'); assert.strictEqual(version.readUInt8(0), 1); // private key var d = der.readString(asn1.Ber.OctetString, true); der.readSequence(0xa0); var curve = readECDSACurve(der); assert.string(curve, 'a known elliptic curve'); der.readSequence(0xa1); var Q = der.readString(asn1.Ber.BitString, true); Q = utils.ecNormalize(Q); var key = { type: 'ecdsa', parts: [ { name: 'curve', data: Buffer.from(curve) }, { name: 'Q', data: Q }, { name: 'd', data: d } ] }; return (new PrivateKey(key)); } function writePkcs1(der, key) { der.startSequence(); switch (key.type) { case 'rsa': if (PrivateKey.isPrivateKey(key)) writePkcs1RSAPrivate(der, key); else writePkcs1RSAPublic(der, key); break; case 'dsa': if (PrivateKey.isPrivateKey(key)) writePkcs1DSAPrivate(der, key); else writePkcs1DSAPublic(der, key); break; case 'ecdsa': if (PrivateKey.isPrivateKey(key)) writePkcs1ECDSAPrivate(der, key); else writePkcs1ECDSAPublic(der, key); break; case 'ed25519': if (PrivateKey.isPrivateKey(key)) writePkcs1EdDSAPrivate(der, key); else writePkcs1EdDSAPublic(der, key); break; default: throw (new Error('Unknown key algo: ' + key.type)); } der.endSequence(); } function writePkcs1RSAPublic(der, key) { der.writeBuffer(key.part.n.data, asn1.Ber.Integer); der.writeBuffer(key.part.e.data, asn1.Ber.Integer); } function writePkcs1RSAPrivate(der, key) { var ver = Buffer.from([0]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.n.data, asn1.Ber.Integer); der.writeBuffer(key.part.e.data, asn1.Ber.Integer); der.writeBuffer(key.part.d.data, asn1.Ber.Integer); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); der.writeBuffer(key.part.q.data, asn1.Ber.Integer); if (!key.part.dmodp || !key.part.dmodq) utils.addRSAMissing(key); der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); } function writePkcs1DSAPrivate(der, key) { var ver = Buffer.from([0]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); der.writeBuffer(key.part.q.data, asn1.Ber.Integer); der.writeBuffer(key.part.g.data, asn1.Ber.Integer); der.writeBuffer(key.part.y.data, asn1.Ber.Integer); der.writeBuffer(key.part.x.data, asn1.Ber.Integer); } function writePkcs1DSAPublic(der, key) { der.writeBuffer(key.part.y.data, asn1.Ber.Integer); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); der.writeBuffer(key.part.q.data, asn1.Ber.Integer); der.writeBuffer(key.part.g.data, asn1.Ber.Integer); } function writePkcs1ECDSAPublic(der, key) { der.startSequence(); der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ var curve = key.part.curve.data.toString(); var curveOid = algs.curves[curve].pkcs8oid; assert.string(curveOid, 'a known ECDSA named curve'); der.writeOID(curveOid); der.endSequence(); var Q = utils.ecNormalize(key.part.Q.data, true); der.writeBuffer(Q, asn1.Ber.BitString); } function writePkcs1ECDSAPrivate(der, key) { var ver = Buffer.from([1]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); der.startSequence(0xa0); var curve = key.part.curve.data.toString(); var curveOid = algs.curves[curve].pkcs8oid; assert.string(curveOid, 'a known ECDSA named curve'); der.writeOID(curveOid); der.endSequence(); der.startSequence(0xa1); var Q = utils.ecNormalize(key.part.Q.data, true); der.writeBuffer(Q, asn1.Ber.BitString); der.endSequence(); } function writePkcs1EdDSAPrivate(der, key) { var ver = Buffer.from([1]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); der.startSequence(0xa0); der.writeOID('1.3.101.112'); der.endSequence(); der.startSequence(0xa1); utils.writeBitString(der, key.part.A.data); der.endSequence(); } function writePkcs1EdDSAPublic(der, key) { throw (new Error('Public keys are not supported for EdDSA PKCS#1')); } /***/ }), /***/ 4173: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2018 Joyent, Inc. module.exports = { read: read, readPkcs8: readPkcs8, write: write, writePkcs8: writePkcs8, pkcs8ToBuffer: pkcs8ToBuffer, readECDSACurve: readECDSACurve, writeECDSACurve: writeECDSACurve }; var assert = __webpack_require__(66631); var asn1 = __webpack_require__(80970); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pem = __webpack_require__(14324); function read(buf, options) { return (pem.read(buf, options, 'pkcs8')); } function write(key, options) { return (pem.write(key, options, 'pkcs8')); } /* Helper to read in a single mpint */ function readMPInt(der, nm) { assert.strictEqual(der.peek(), asn1.Ber.Integer, nm + ' is not an Integer'); return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); } function readPkcs8(alg, type, der) { /* Private keys in pkcs#8 format have a weird extra int */ if (der.peek() === asn1.Ber.Integer) { assert.strictEqual(type, 'private', 'unexpected Integer at start of public key'); der.readString(asn1.Ber.Integer, true); } der.readSequence(); var next = der.offset + der.length; var oid = der.readOID(); switch (oid) { case '1.2.840.113549.1.1.1': der._offset = next; if (type === 'public') return (readPkcs8RSAPublic(der)); else return (readPkcs8RSAPrivate(der)); case '1.2.840.10040.4.1': if (type === 'public') return (readPkcs8DSAPublic(der)); else return (readPkcs8DSAPrivate(der)); case '1.2.840.10045.2.1': if (type === 'public') return (readPkcs8ECDSAPublic(der)); else return (readPkcs8ECDSAPrivate(der)); case '1.3.101.112': if (type === 'public') { return (readPkcs8EdDSAPublic(der)); } else { return (readPkcs8EdDSAPrivate(der)); } case '1.3.101.110': if (type === 'public') { return (readPkcs8X25519Public(der)); } else { return (readPkcs8X25519Private(der)); } default: throw (new Error('Unknown key type OID ' + oid)); } } function readPkcs8RSAPublic(der) { // bit string sequence der.readSequence(asn1.Ber.BitString); der.readByte(); der.readSequence(); // modulus var n = readMPInt(der, 'modulus'); var e = readMPInt(der, 'exponent'); // now, make the key var key = { type: 'rsa', source: der.originalInput, parts: [ { name: 'e', data: e }, { name: 'n', data: n } ] }; return (new Key(key)); } function readPkcs8RSAPrivate(der) { der.readSequence(asn1.Ber.OctetString); der.readSequence(); var ver = readMPInt(der, 'version'); assert.equal(ver[0], 0x0, 'unknown RSA private key version'); // modulus then public exponent var n = readMPInt(der, 'modulus'); var e = readMPInt(der, 'public exponent'); var d = readMPInt(der, 'private exponent'); var p = readMPInt(der, 'prime1'); var q = readMPInt(der, 'prime2'); var dmodp = readMPInt(der, 'exponent1'); var dmodq = readMPInt(der, 'exponent2'); var iqmp = readMPInt(der, 'iqmp'); // now, make the key var key = { type: 'rsa', parts: [ { name: 'n', data: n }, { name: 'e', data: e }, { name: 'd', data: d }, { name: 'iqmp', data: iqmp }, { name: 'p', data: p }, { name: 'q', data: q }, { name: 'dmodp', data: dmodp }, { name: 'dmodq', data: dmodq } ] }; return (new PrivateKey(key)); } function readPkcs8DSAPublic(der) { der.readSequence(); var p = readMPInt(der, 'p'); var q = readMPInt(der, 'q'); var g = readMPInt(der, 'g'); // bit string sequence der.readSequence(asn1.Ber.BitString); der.readByte(); var y = readMPInt(der, 'y'); // now, make the key var key = { type: 'dsa', parts: [ { name: 'p', data: p }, { name: 'q', data: q }, { name: 'g', data: g }, { name: 'y', data: y } ] }; return (new Key(key)); } function readPkcs8DSAPrivate(der) { der.readSequence(); var p = readMPInt(der, 'p'); var q = readMPInt(der, 'q'); var g = readMPInt(der, 'g'); der.readSequence(asn1.Ber.OctetString); var x = readMPInt(der, 'x'); /* The pkcs#8 format does not include the public key */ var y = utils.calculateDSAPublic(g, p, x); var key = { type: 'dsa', parts: [ { name: 'p', data: p }, { name: 'q', data: q }, { name: 'g', data: g }, { name: 'y', data: y }, { name: 'x', data: x } ] }; return (new PrivateKey(key)); } function readECDSACurve(der) { var curveName, curveNames; var j, c, cd; if (der.peek() === asn1.Ber.OID) { var oid = der.readOID(); curveNames = Object.keys(algs.curves); for (j = 0; j < curveNames.length; ++j) { c = curveNames[j]; cd = algs.curves[c]; if (cd.pkcs8oid === oid) { curveName = c; break; } } } else { // ECParameters sequence der.readSequence(); var version = der.readString(asn1.Ber.Integer, true); assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); var curve = {}; // FieldID sequence der.readSequence(); var fieldTypeOid = der.readOID(); assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', 'ECDSA key is not from a prime-field'); var p = curve.p = utils.mpNormalize( der.readString(asn1.Ber.Integer, true)); /* * p always starts with a 1 bit, so count the zeros to get its * real size. */ curve.size = p.length * 8 - utils.countZeros(p); // Curve sequence der.readSequence(); curve.a = utils.mpNormalize( der.readString(asn1.Ber.OctetString, true)); curve.b = utils.mpNormalize( der.readString(asn1.Ber.OctetString, true)); if (der.peek() === asn1.Ber.BitString) curve.s = der.readString(asn1.Ber.BitString, true); // Combined Gx and Gy curve.G = der.readString(asn1.Ber.OctetString, true); assert.strictEqual(curve.G[0], 0x4, 'uncompressed G is required'); curve.n = utils.mpNormalize( der.readString(asn1.Ber.Integer, true)); curve.h = utils.mpNormalize( der.readString(asn1.Ber.Integer, true)); assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + 'required'); curveNames = Object.keys(algs.curves); var ks = Object.keys(curve); for (j = 0; j < curveNames.length; ++j) { c = curveNames[j]; cd = algs.curves[c]; var equal = true; for (var i = 0; i < ks.length; ++i) { var k = ks[i]; if (cd[k] === undefined) continue; if (typeof (cd[k]) === 'object' && cd[k].equals !== undefined) { if (!cd[k].equals(curve[k])) { equal = false; break; } } else if (Buffer.isBuffer(cd[k])) { if (cd[k].toString('binary') !== curve[k].toString('binary')) { equal = false; break; } } else { if (cd[k] !== curve[k]) { equal = false; break; } } } if (equal) { curveName = c; break; } } } return (curveName); } function readPkcs8ECDSAPrivate(der) { var curveName = readECDSACurve(der); assert.string(curveName, 'a known elliptic curve'); der.readSequence(asn1.Ber.OctetString); der.readSequence(); var version = readMPInt(der, 'version'); assert.equal(version[0], 1, 'unknown version of ECDSA key'); var d = der.readString(asn1.Ber.OctetString, true); var Q; if (der.peek() == 0xa0) { der.readSequence(0xa0); der._offset += der.length; } if (der.peek() == 0xa1) { der.readSequence(0xa1); Q = der.readString(asn1.Ber.BitString, true); Q = utils.ecNormalize(Q); } if (Q === undefined) { var pub = utils.publicFromPrivateECDSA(curveName, d); Q = pub.part.Q.data; } var key = { type: 'ecdsa', parts: [ { name: 'curve', data: Buffer.from(curveName) }, { name: 'Q', data: Q }, { name: 'd', data: d } ] }; return (new PrivateKey(key)); } function readPkcs8ECDSAPublic(der) { var curveName = readECDSACurve(der); assert.string(curveName, 'a known elliptic curve'); var Q = der.readString(asn1.Ber.BitString, true); Q = utils.ecNormalize(Q); var key = { type: 'ecdsa', parts: [ { name: 'curve', data: Buffer.from(curveName) }, { name: 'Q', data: Q } ] }; return (new Key(key)); } function readPkcs8EdDSAPublic(der) { if (der.peek() === 0x00) der.readByte(); var A = utils.readBitString(der); var key = { type: 'ed25519', parts: [ { name: 'A', data: utils.zeroPadToLength(A, 32) } ] }; return (new Key(key)); } function readPkcs8X25519Public(der) { var A = utils.readBitString(der); var key = { type: 'curve25519', parts: [ { name: 'A', data: utils.zeroPadToLength(A, 32) } ] }; return (new Key(key)); } function readPkcs8EdDSAPrivate(der) { if (der.peek() === 0x00) der.readByte(); der.readSequence(asn1.Ber.OctetString); var k = der.readString(asn1.Ber.OctetString, true); k = utils.zeroPadToLength(k, 32); var A; if (der.peek() === asn1.Ber.BitString) { A = utils.readBitString(der); A = utils.zeroPadToLength(A, 32); } else { A = utils.calculateED25519Public(k); } var key = { type: 'ed25519', parts: [ { name: 'A', data: utils.zeroPadToLength(A, 32) }, { name: 'k', data: utils.zeroPadToLength(k, 32) } ] }; return (new PrivateKey(key)); } function readPkcs8X25519Private(der) { if (der.peek() === 0x00) der.readByte(); der.readSequence(asn1.Ber.OctetString); var k = der.readString(asn1.Ber.OctetString, true); k = utils.zeroPadToLength(k, 32); var A = utils.calculateX25519Public(k); var key = { type: 'curve25519', parts: [ { name: 'A', data: utils.zeroPadToLength(A, 32) }, { name: 'k', data: utils.zeroPadToLength(k, 32) } ] }; return (new PrivateKey(key)); } function pkcs8ToBuffer(key) { var der = new asn1.BerWriter(); writePkcs8(der, key); return (der.buffer); } function writePkcs8(der, key) { der.startSequence(); if (PrivateKey.isPrivateKey(key)) { var sillyInt = Buffer.from([0]); der.writeBuffer(sillyInt, asn1.Ber.Integer); } der.startSequence(); switch (key.type) { case 'rsa': der.writeOID('1.2.840.113549.1.1.1'); if (PrivateKey.isPrivateKey(key)) writePkcs8RSAPrivate(key, der); else writePkcs8RSAPublic(key, der); break; case 'dsa': der.writeOID('1.2.840.10040.4.1'); if (PrivateKey.isPrivateKey(key)) writePkcs8DSAPrivate(key, der); else writePkcs8DSAPublic(key, der); break; case 'ecdsa': der.writeOID('1.2.840.10045.2.1'); if (PrivateKey.isPrivateKey(key)) writePkcs8ECDSAPrivate(key, der); else writePkcs8ECDSAPublic(key, der); break; case 'ed25519': der.writeOID('1.3.101.112'); if (PrivateKey.isPrivateKey(key)) throw (new Error('Ed25519 private keys in pkcs8 ' + 'format are not supported')); writePkcs8EdDSAPublic(key, der); break; default: throw (new Error('Unsupported key type: ' + key.type)); } der.endSequence(); } function writePkcs8RSAPrivate(key, der) { der.writeNull(); der.endSequence(); der.startSequence(asn1.Ber.OctetString); der.startSequence(); var version = Buffer.from([0]); der.writeBuffer(version, asn1.Ber.Integer); der.writeBuffer(key.part.n.data, asn1.Ber.Integer); der.writeBuffer(key.part.e.data, asn1.Ber.Integer); der.writeBuffer(key.part.d.data, asn1.Ber.Integer); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); der.writeBuffer(key.part.q.data, asn1.Ber.Integer); if (!key.part.dmodp || !key.part.dmodq) utils.addRSAMissing(key); der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); der.endSequence(); der.endSequence(); } function writePkcs8RSAPublic(key, der) { der.writeNull(); der.endSequence(); der.startSequence(asn1.Ber.BitString); der.writeByte(0x00); der.startSequence(); der.writeBuffer(key.part.n.data, asn1.Ber.Integer); der.writeBuffer(key.part.e.data, asn1.Ber.Integer); der.endSequence(); der.endSequence(); } function writePkcs8DSAPrivate(key, der) { der.startSequence(); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); der.writeBuffer(key.part.q.data, asn1.Ber.Integer); der.writeBuffer(key.part.g.data, asn1.Ber.Integer); der.endSequence(); der.endSequence(); der.startSequence(asn1.Ber.OctetString); der.writeBuffer(key.part.x.data, asn1.Ber.Integer); der.endSequence(); } function writePkcs8DSAPublic(key, der) { der.startSequence(); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); der.writeBuffer(key.part.q.data, asn1.Ber.Integer); der.writeBuffer(key.part.g.data, asn1.Ber.Integer); der.endSequence(); der.endSequence(); der.startSequence(asn1.Ber.BitString); der.writeByte(0x00); der.writeBuffer(key.part.y.data, asn1.Ber.Integer); der.endSequence(); } function writeECDSACurve(key, der) { var curve = algs.curves[key.curve]; if (curve.pkcs8oid) { /* This one has a name in pkcs#8, so just write the oid */ der.writeOID(curve.pkcs8oid); } else { // ECParameters sequence der.startSequence(); var version = Buffer.from([1]); der.writeBuffer(version, asn1.Ber.Integer); // FieldID sequence der.startSequence(); der.writeOID('1.2.840.10045.1.1'); // prime-field der.writeBuffer(curve.p, asn1.Ber.Integer); der.endSequence(); // Curve sequence der.startSequence(); var a = curve.p; if (a[0] === 0x0) a = a.slice(1); der.writeBuffer(a, asn1.Ber.OctetString); der.writeBuffer(curve.b, asn1.Ber.OctetString); der.writeBuffer(curve.s, asn1.Ber.BitString); der.endSequence(); der.writeBuffer(curve.G, asn1.Ber.OctetString); der.writeBuffer(curve.n, asn1.Ber.Integer); var h = curve.h; if (!h) { h = Buffer.from([1]); } der.writeBuffer(h, asn1.Ber.Integer); // ECParameters der.endSequence(); } } function writePkcs8ECDSAPublic(key, der) { writeECDSACurve(key, der); der.endSequence(); var Q = utils.ecNormalize(key.part.Q.data, true); der.writeBuffer(Q, asn1.Ber.BitString); } function writePkcs8ECDSAPrivate(key, der) { writeECDSACurve(key, der); der.endSequence(); der.startSequence(asn1.Ber.OctetString); der.startSequence(); var version = Buffer.from([1]); der.writeBuffer(version, asn1.Ber.Integer); der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); der.startSequence(0xa1); var Q = utils.ecNormalize(key.part.Q.data, true); der.writeBuffer(Q, asn1.Ber.BitString); der.endSequence(); der.endSequence(); der.endSequence(); } function writePkcs8EdDSAPublic(key, der) { der.endSequence(); utils.writeBitString(der, key.part.A.data); } function writePkcs8EdDSAPrivate(key, der) { der.endSequence(); var k = utils.mpNormalize(key.part.k.data, true); der.startSequence(asn1.Ber.OctetString); der.writeBuffer(k, asn1.Ber.OctetString); der.endSequence(); } /***/ }), /***/ 80974: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2018 Joyent, Inc. module.exports = { read: read, write: write }; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var rfc4253 = __webpack_require__(88688); var Key = __webpack_require__(36814); var errors = __webpack_require__(27979); function read(buf, options) { var lines = buf.toString('ascii').split(/[\r\n]+/); var found = false; var parts; var si = 0; while (si < lines.length) { parts = splitHeader(lines[si++]); if (parts && parts[0].toLowerCase() === 'putty-user-key-file-2') { found = true; break; } } if (!found) { throw (new Error('No PuTTY format first line found')); } var alg = parts[1]; parts = splitHeader(lines[si++]); assert.equal(parts[0].toLowerCase(), 'encryption'); parts = splitHeader(lines[si++]); assert.equal(parts[0].toLowerCase(), 'comment'); var comment = parts[1]; parts = splitHeader(lines[si++]); assert.equal(parts[0].toLowerCase(), 'public-lines'); var publicLines = parseInt(parts[1], 10); if (!isFinite(publicLines) || publicLines < 0 || publicLines > lines.length) { throw (new Error('Invalid public-lines count')); } var publicBuf = Buffer.from( lines.slice(si, si + publicLines).join(''), 'base64'); var keyType = rfc4253.algToKeyType(alg); var key = rfc4253.read(publicBuf); if (key.type !== keyType) { throw (new Error('Outer key algorithm mismatch')); } key.comment = comment; return (key); } function splitHeader(line) { var idx = line.indexOf(':'); if (idx === -1) return (null); var header = line.slice(0, idx); ++idx; while (line[idx] === ' ') ++idx; var rest = line.slice(idx); return ([header, rest]); } function write(key, options) { assert.object(key); if (!Key.isKey(key)) throw (new Error('Must be a public key')); var alg = rfc4253.keyTypeToAlg(key); var buf = rfc4253.write(key); var comment = key.comment || ''; var b64 = buf.toString('base64'); var lines = wrap(b64, 64); lines.unshift('Public-Lines: ' + lines.length); lines.unshift('Comment: ' + comment); lines.unshift('Encryption: none'); lines.unshift('PuTTY-User-Key-File-2: ' + alg); return (Buffer.from(lines.join('\n') + '\n')); } function wrap(txt, len) { var lines = []; var pos = 0; while (pos < txt.length) { lines.push(txt.slice(pos, pos + 64)); pos += 64; } return (lines); } /***/ }), /***/ 88688: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = { read: read.bind(undefined, false, undefined), readType: read.bind(undefined, false), write: write, /* semi-private api, used by sshpk-agent */ readPartial: read.bind(undefined, true), /* shared with ssh format */ readInternal: read, keyTypeToAlg: keyTypeToAlg, algToKeyType: algToKeyType }; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var SSHBuffer = __webpack_require__(25621); function algToKeyType(alg) { assert.string(alg); if (alg === 'ssh-dss') return ('dsa'); else if (alg === 'ssh-rsa') return ('rsa'); else if (alg === 'ssh-ed25519') return ('ed25519'); else if (alg === 'ssh-curve25519') return ('curve25519'); else if (alg.match(/^ecdsa-sha2-/)) return ('ecdsa'); else throw (new Error('Unknown algorithm ' + alg)); } function keyTypeToAlg(key) { assert.object(key); if (key.type === 'dsa') return ('ssh-dss'); else if (key.type === 'rsa') return ('ssh-rsa'); else if (key.type === 'ed25519') return ('ssh-ed25519'); else if (key.type === 'curve25519') return ('ssh-curve25519'); else if (key.type === 'ecdsa') return ('ecdsa-sha2-' + key.part.curve.data.toString()); else throw (new Error('Unknown key type ' + key.type)); } function read(partial, type, buf, options) { if (typeof (buf) === 'string') buf = Buffer.from(buf); assert.buffer(buf, 'buf'); var key = {}; var parts = key.parts = []; var sshbuf = new SSHBuffer({buffer: buf}); var alg = sshbuf.readString(); assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); key.type = algToKeyType(alg); var partCount = algs.info[key.type].parts.length; if (type && type === 'private') partCount = algs.privInfo[key.type].parts.length; while (!sshbuf.atEnd() && parts.length < partCount) parts.push(sshbuf.readPart()); while (!partial && !sshbuf.atEnd()) parts.push(sshbuf.readPart()); assert.ok(parts.length >= 1, 'key must have at least one part'); assert.ok(partial || sshbuf.atEnd(), 'leftover bytes at end of key'); var Constructor = Key; var algInfo = algs.info[key.type]; if (type === 'private' || algInfo.parts.length !== parts.length) { algInfo = algs.privInfo[key.type]; Constructor = PrivateKey; } assert.strictEqual(algInfo.parts.length, parts.length); if (key.type === 'ecdsa') { var res = /^ecdsa-sha2-(.+)$/.exec(alg); assert.ok(res !== null); assert.strictEqual(res[1], parts[0].data.toString()); } var normalized = true; for (var i = 0; i < algInfo.parts.length; ++i) { var p = parts[i]; p.name = algInfo.parts[i]; /* * OpenSSH stores ed25519 "private" keys as seed + public key * concat'd together (k followed by A). We want to keep them * separate for other formats that don't do this. */ if (key.type === 'ed25519' && p.name === 'k') p.data = p.data.slice(0, 32); if (p.name !== 'curve' && algInfo.normalize !== false) { var nd; if (key.type === 'ed25519') { nd = utils.zeroPadToLength(p.data, 32); } else { nd = utils.mpNormalize(p.data); } if (nd.toString('binary') !== p.data.toString('binary')) { p.data = nd; normalized = false; } } } if (normalized) key._rfc4253Cache = sshbuf.toBuffer(); if (partial && typeof (partial) === 'object') { partial.remainder = sshbuf.remainder(); partial.consumed = sshbuf._offset; } return (new Constructor(key)); } function write(key, options) { assert.object(key); var alg = keyTypeToAlg(key); var i; var algInfo = algs.info[key.type]; if (PrivateKey.isPrivateKey(key)) algInfo = algs.privInfo[key.type]; var parts = algInfo.parts; var buf = new SSHBuffer({}); buf.writeString(alg); for (i = 0; i < parts.length; ++i) { var data = key.part[parts[i]].data; if (algInfo.normalize !== false) { if (key.type === 'ed25519') data = utils.zeroPadToLength(data, 32); else data = utils.mpNormalize(data); } if (key.type === 'ed25519' && parts[i] === 'k') data = Buffer.concat([data, key.part.A.data]); buf.writeBuffer(data); } return (buf.toBuffer()); } /***/ }), /***/ 3923: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = { read: read, readSSHPrivate: readSSHPrivate, write: write }; var assert = __webpack_require__(66631); var asn1 = __webpack_require__(80970); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var crypto = __webpack_require__(33373); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pem = __webpack_require__(14324); var rfc4253 = __webpack_require__(88688); var SSHBuffer = __webpack_require__(25621); var errors = __webpack_require__(27979); var bcrypt; function read(buf, options) { return (pem.read(buf, options)); } var MAGIC = 'openssh-key-v1'; function readSSHPrivate(type, buf, options) { buf = new SSHBuffer({buffer: buf}); var magic = buf.readCString(); assert.strictEqual(magic, MAGIC, 'bad magic string'); var cipher = buf.readString(); var kdf = buf.readString(); var kdfOpts = buf.readBuffer(); var nkeys = buf.readInt(); if (nkeys !== 1) { throw (new Error('OpenSSH-format key file contains ' + 'multiple keys: this is unsupported.')); } var pubKey = buf.readBuffer(); if (type === 'public') { assert.ok(buf.atEnd(), 'excess bytes left after key'); return (rfc4253.read(pubKey)); } var privKeyBlob = buf.readBuffer(); assert.ok(buf.atEnd(), 'excess bytes left after key'); var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); switch (kdf) { case 'none': if (cipher !== 'none') { throw (new Error('OpenSSH-format key uses KDF "none" ' + 'but specifies a cipher other than "none"')); } break; case 'bcrypt': var salt = kdfOptsBuf.readBuffer(); var rounds = kdfOptsBuf.readInt(); var cinf = utils.opensshCipherInfo(cipher); if (bcrypt === undefined) { bcrypt = __webpack_require__(45447); } if (typeof (options.passphrase) === 'string') { options.passphrase = Buffer.from(options.passphrase, 'utf-8'); } if (!Buffer.isBuffer(options.passphrase)) { throw (new errors.KeyEncryptedError( options.filename, 'OpenSSH')); } var pass = new Uint8Array(options.passphrase); var salti = new Uint8Array(salt); /* Use the pbkdf to derive both the key and the IV. */ var out = new Uint8Array(cinf.keySize + cinf.blockSize); var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, out, out.length, rounds); if (res !== 0) { throw (new Error('bcrypt_pbkdf function returned ' + 'failure, parameters invalid')); } out = Buffer.from(out); var ckey = out.slice(0, cinf.keySize); var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); var cipherStream = crypto.createDecipheriv(cinf.opensslName, ckey, iv); cipherStream.setAutoPadding(false); var chunk, chunks = []; cipherStream.once('error', function (e) { if (e.toString().indexOf('bad decrypt') !== -1) { throw (new Error('Incorrect passphrase ' + 'supplied, could not decrypt key')); } throw (e); }); cipherStream.write(privKeyBlob); cipherStream.end(); while ((chunk = cipherStream.read()) !== null) chunks.push(chunk); privKeyBlob = Buffer.concat(chunks); break; default: throw (new Error( 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); } buf = new SSHBuffer({buffer: privKeyBlob}); var checkInt1 = buf.readInt(); var checkInt2 = buf.readInt(); if (checkInt1 !== checkInt2) { throw (new Error('Incorrect passphrase supplied, could not ' + 'decrypt key')); } var ret = {}; var key = rfc4253.readInternal(ret, 'private', buf.remainder()); buf.skip(ret.consumed); var comment = buf.readString(); key.comment = comment; return (key); } function write(key, options) { var pubKey; if (PrivateKey.isPrivateKey(key)) pubKey = key.toPublic(); else pubKey = key; var cipher = 'none'; var kdf = 'none'; var kdfopts = Buffer.alloc(0); var cinf = { blockSize: 8 }; var passphrase; if (options !== undefined) { passphrase = options.passphrase; if (typeof (passphrase) === 'string') passphrase = Buffer.from(passphrase, 'utf-8'); if (passphrase !== undefined) { assert.buffer(passphrase, 'options.passphrase'); assert.optionalString(options.cipher, 'options.cipher'); cipher = options.cipher; if (cipher === undefined) cipher = 'aes128-ctr'; cinf = utils.opensshCipherInfo(cipher); kdf = 'bcrypt'; } } var privBuf; if (PrivateKey.isPrivateKey(key)) { privBuf = new SSHBuffer({}); var checkInt = crypto.randomBytes(4).readUInt32BE(0); privBuf.writeInt(checkInt); privBuf.writeInt(checkInt); privBuf.write(key.toBuffer('rfc4253')); privBuf.writeString(key.comment || ''); var n = 1; while (privBuf._offset % cinf.blockSize !== 0) privBuf.writeChar(n++); privBuf = privBuf.toBuffer(); } switch (kdf) { case 'none': break; case 'bcrypt': var salt = crypto.randomBytes(16); var rounds = 16; var kdfssh = new SSHBuffer({}); kdfssh.writeBuffer(salt); kdfssh.writeInt(rounds); kdfopts = kdfssh.toBuffer(); if (bcrypt === undefined) { bcrypt = __webpack_require__(45447); } var pass = new Uint8Array(passphrase); var salti = new Uint8Array(salt); /* Use the pbkdf to derive both the key and the IV. */ var out = new Uint8Array(cinf.keySize + cinf.blockSize); var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, out, out.length, rounds); if (res !== 0) { throw (new Error('bcrypt_pbkdf function returned ' + 'failure, parameters invalid')); } out = Buffer.from(out); var ckey = out.slice(0, cinf.keySize); var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); var cipherStream = crypto.createCipheriv(cinf.opensslName, ckey, iv); cipherStream.setAutoPadding(false); var chunk, chunks = []; cipherStream.once('error', function (e) { throw (e); }); cipherStream.write(privBuf); cipherStream.end(); while ((chunk = cipherStream.read()) !== null) chunks.push(chunk); privBuf = Buffer.concat(chunks); break; default: throw (new Error('Unsupported kdf ' + kdf)); } var buf = new SSHBuffer({}); buf.writeCString(MAGIC); buf.writeString(cipher); /* cipher */ buf.writeString(kdf); /* kdf */ buf.writeBuffer(kdfopts); /* kdfoptions */ buf.writeInt(1); /* nkeys */ buf.writeBuffer(pubKey.toBuffer('rfc4253')); if (privBuf) buf.writeBuffer(privBuf); buf = buf.toBuffer(); var header; if (PrivateKey.isPrivateKey(key)) header = 'OPENSSH PRIVATE KEY'; else header = 'OPENSSH PUBLIC KEY'; var tmp = buf.toString('base64'); var len = tmp.length + (tmp.length / 70) + 18 + 16 + header.length*2 + 10; buf = Buffer.alloc(len); var o = 0; o += buf.write('-----BEGIN ' + header + '-----\n', o); for (var i = 0; i < tmp.length; ) { var limit = i + 70; if (limit > tmp.length) limit = tmp.length; o += buf.write(tmp.slice(i, limit), o); buf[o++] = 10; i = limit; } o += buf.write('-----END ' + header + '-----\n', o); return (buf.slice(0, o)); } /***/ }), /***/ 68927: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = { read: read, write: write }; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var rfc4253 = __webpack_require__(88688); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var sshpriv = __webpack_require__(3923); /*JSSTYLED*/ var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; /*JSSTYLED*/ var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; function read(buf, options) { if (typeof (buf) !== 'string') { assert.buffer(buf, 'buf'); buf = buf.toString('ascii'); } var trimmed = buf.trim().replace(/[\\\r]/g, ''); var m = trimmed.match(SSHKEY_RE); if (!m) m = trimmed.match(SSHKEY_RE2); assert.ok(m, 'key must match regex'); var type = rfc4253.algToKeyType(m[1]); var kbuf = Buffer.from(m[2], 'base64'); /* * This is a bit tricky. If we managed to parse the key and locate the * key comment with the regex, then do a non-partial read and assert * that we have consumed all bytes. If we couldn't locate the key * comment, though, there may be whitespace shenanigans going on that * have conjoined the comment to the rest of the key. We do a partial * read in this case to try to make the best out of a sorry situation. */ var key; var ret = {}; if (m[4]) { try { key = rfc4253.read(kbuf); } catch (e) { m = trimmed.match(SSHKEY_RE2); assert.ok(m, 'key must match regex'); kbuf = Buffer.from(m[2], 'base64'); key = rfc4253.readInternal(ret, 'public', kbuf); } } else { key = rfc4253.readInternal(ret, 'public', kbuf); } assert.strictEqual(type, key.type); if (m[4] && m[4].length > 0) { key.comment = m[4]; } else if (ret.consumed) { /* * Now the magic: trying to recover the key comment when it's * gotten conjoined to the key or otherwise shenanigan'd. * * Work out how much base64 we used, then drop all non-base64 * chars from the beginning up to this point in the the string. * Then offset in this and try to make up for missing = chars. */ var data = m[2] + (m[3] ? m[3] : ''); var realOffset = Math.ceil(ret.consumed / 3) * 4; data = data.slice(0, realOffset - 2). /*JSSTYLED*/ replace(/[^a-zA-Z0-9+\/=]/g, '') + data.slice(realOffset - 2); var padding = ret.consumed % 3; if (padding > 0 && data.slice(realOffset - 1, realOffset) !== '=') realOffset--; while (data.slice(realOffset, realOffset + 1) === '=') realOffset++; /* Finally, grab what we think is the comment & clean it up. */ var trailer = data.slice(realOffset); trailer = trailer.replace(/[\r\n]/g, ' '). replace(/^\s+/, ''); if (trailer.match(/^[a-zA-Z0-9]/)) key.comment = trailer; } return (key); } function write(key, options) { assert.object(key); if (!Key.isKey(key)) throw (new Error('Must be a public key')); var parts = []; var alg = rfc4253.keyTypeToAlg(key); parts.push(alg); var buf = rfc4253.write(key); parts.push(buf.toString('base64')); if (key.comment) parts.push(key.comment); return (Buffer.from(parts.join(' '))); } /***/ }), /***/ 30217: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2016 Joyent, Inc. var x509 = __webpack_require__(10267); module.exports = { read: read, verify: x509.verify, sign: x509.sign, write: write }; var assert = __webpack_require__(66631); var asn1 = __webpack_require__(80970); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pem = __webpack_require__(14324); var Identity = __webpack_require__(70508); var Signature = __webpack_require__(91394); var Certificate = __webpack_require__(7406); function read(buf, options) { if (typeof (buf) !== 'string') { assert.buffer(buf, 'buf'); buf = buf.toString('ascii'); } var lines = buf.trim().split(/[\r\n]+/g); var m; var si = -1; while (!m && si < lines.length) { m = lines[++si].match(/*JSSTYLED*/ /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/); } assert.ok(m, 'invalid PEM header'); var m2; var ei = lines.length; while (!m2 && ei > 0) { m2 = lines[--ei].match(/*JSSTYLED*/ /[-]+[ ]*END CERTIFICATE[ ]*[-]+/); } assert.ok(m2, 'invalid PEM footer'); lines = lines.slice(si, ei + 1); var headers = {}; while (true) { lines = lines.slice(1); m = lines[0].match(/*JSSTYLED*/ /^([A-Za-z0-9-]+): (.+)$/); if (!m) break; headers[m[1].toLowerCase()] = m[2]; } /* Chop off the first and last lines */ lines = lines.slice(0, -1).join(''); buf = Buffer.from(lines, 'base64'); return (x509.read(buf, options)); } function write(cert, options) { var dbuf = x509.write(cert, options); var header = 'CERTIFICATE'; var tmp = dbuf.toString('base64'); var len = tmp.length + (tmp.length / 64) + 18 + 16 + header.length*2 + 10; var buf = Buffer.alloc(len); var o = 0; o += buf.write('-----BEGIN ' + header + '-----\n', o); for (var i = 0; i < tmp.length; ) { var limit = i + 64; if (limit > tmp.length) limit = tmp.length; o += buf.write(tmp.slice(i, limit), o); buf[o++] = 10; i = limit; } o += buf.write('-----END ' + header + '-----\n', o); return (buf.slice(0, o)); } /***/ }), /***/ 10267: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2017 Joyent, Inc. module.exports = { read: read, verify: verify, sign: sign, signAsync: signAsync, write: write }; var assert = __webpack_require__(66631); var asn1 = __webpack_require__(80970); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var utils = __webpack_require__(80575); var Key = __webpack_require__(36814); var PrivateKey = __webpack_require__(29602); var pem = __webpack_require__(14324); var Identity = __webpack_require__(70508); var Signature = __webpack_require__(91394); var Certificate = __webpack_require__(7406); var pkcs8 = __webpack_require__(4173); /* * This file is based on RFC5280 (X.509). */ /* Helper to read in a single mpint */ function readMPInt(der, nm) { assert.strictEqual(der.peek(), asn1.Ber.Integer, nm + ' is not an Integer'); return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); } function verify(cert, key) { var sig = cert.signatures.x509; assert.object(sig, 'x509 signature'); var algParts = sig.algo.split('-'); if (algParts[0] !== key.type) return (false); var blob = sig.cache; if (blob === undefined) { var der = new asn1.BerWriter(); writeTBSCert(cert, der); blob = der.buffer; } var verifier = key.createVerify(algParts[1]); verifier.write(blob); return (verifier.verify(sig.signature)); } function Local(i) { return (asn1.Ber.Context | asn1.Ber.Constructor | i); } function Context(i) { return (asn1.Ber.Context | i); } var SIGN_ALGS = { 'rsa-md5': '1.2.840.113549.1.1.4', 'rsa-sha1': '1.2.840.113549.1.1.5', 'rsa-sha256': '1.2.840.113549.1.1.11', 'rsa-sha384': '1.2.840.113549.1.1.12', 'rsa-sha512': '1.2.840.113549.1.1.13', 'dsa-sha1': '1.2.840.10040.4.3', 'dsa-sha256': '2.16.840.1.101.3.4.3.2', 'ecdsa-sha1': '1.2.840.10045.4.1', 'ecdsa-sha256': '1.2.840.10045.4.3.2', 'ecdsa-sha384': '1.2.840.10045.4.3.3', 'ecdsa-sha512': '1.2.840.10045.4.3.4', 'ed25519-sha512': '1.3.101.112' }; Object.keys(SIGN_ALGS).forEach(function (k) { SIGN_ALGS[SIGN_ALGS[k]] = k; }); SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5'; SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1'; var EXTS = { 'issuerKeyId': '2.5.29.35', 'altName': '2.5.29.17', 'basicConstraints': '2.5.29.19', 'keyUsage': '2.5.29.15', 'extKeyUsage': '2.5.29.37' }; function read(buf, options) { if (typeof (buf) === 'string') { buf = Buffer.from(buf, 'binary'); } assert.buffer(buf, 'buf'); var der = new asn1.BerReader(buf); der.readSequence(); if (Math.abs(der.length - der.remain) > 1) { throw (new Error('DER sequence does not contain whole byte ' + 'stream')); } var tbsStart = der.offset; der.readSequence(); var sigOffset = der.offset + der.length; var tbsEnd = sigOffset; if (der.peek() === Local(0)) { der.readSequence(Local(0)); var version = der.readInt(); assert.ok(version <= 3, 'only x.509 versions up to v3 supported'); } var cert = {}; cert.signatures = {}; var sig = (cert.signatures.x509 = {}); sig.extras = {}; cert.serial = readMPInt(der, 'serial'); der.readSequence(); var after = der.offset + der.length; var certAlgOid = der.readOID(); var certAlg = SIGN_ALGS[certAlgOid]; if (certAlg === undefined) throw (new Error('unknown signature algorithm ' + certAlgOid)); der._offset = after; cert.issuer = Identity.parseAsn1(der); der.readSequence(); cert.validFrom = readDate(der); cert.validUntil = readDate(der); cert.subjects = [Identity.parseAsn1(der)]; der.readSequence(); after = der.offset + der.length; cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der); der._offset = after; /* issuerUniqueID */ if (der.peek() === Local(1)) { der.readSequence(Local(1)); sig.extras.issuerUniqueID = buf.slice(der.offset, der.offset + der.length); der._offset += der.length; } /* subjectUniqueID */ if (der.peek() === Local(2)) { der.readSequence(Local(2)); sig.extras.subjectUniqueID = buf.slice(der.offset, der.offset + der.length); der._offset += der.length; } /* extensions */ if (der.peek() === Local(3)) { der.readSequence(Local(3)); var extEnd = der.offset + der.length; der.readSequence(); while (der.offset < extEnd) readExtension(cert, buf, der); assert.strictEqual(der.offset, extEnd); } assert.strictEqual(der.offset, sigOffset); der.readSequence(); after = der.offset + der.length; var sigAlgOid = der.readOID(); var sigAlg = SIGN_ALGS[sigAlgOid]; if (sigAlg === undefined) throw (new Error('unknown signature algorithm ' + sigAlgOid)); der._offset = after; var sigData = der.readString(asn1.Ber.BitString, true); if (sigData[0] === 0) sigData = sigData.slice(1); var algParts = sigAlg.split('-'); sig.signature = Signature.parse(sigData, algParts[0], 'asn1'); sig.signature.hashAlgorithm = algParts[1]; sig.algo = sigAlg; sig.cache = buf.slice(tbsStart, tbsEnd); return (new Certificate(cert)); } function readDate(der) { if (der.peek() === asn1.Ber.UTCTime) { return (utcTimeToDate(der.readString(asn1.Ber.UTCTime))); } else if (der.peek() === asn1.Ber.GeneralizedTime) { return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime))); } else { throw (new Error('Unsupported date format')); } } function writeDate(der, date) { if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) { der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime); } else { der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime); } } /* RFC5280, section 4.2.1.6 (GeneralName type) */ var ALTNAME = { OtherName: Local(0), RFC822Name: Context(1), DNSName: Context(2), X400Address: Local(3), DirectoryName: Local(4), EDIPartyName: Local(5), URI: Context(6), IPAddress: Context(7), OID: Context(8) }; /* RFC5280, section 4.2.1.12 (KeyPurposeId) */ var EXTPURPOSE = { 'serverAuth': '1.3.6.1.5.5.7.3.1', 'clientAuth': '1.3.6.1.5.5.7.3.2', 'codeSigning': '1.3.6.1.5.5.7.3.3', /* See https://github.com/joyent/oid-docs/blob/master/root.md */ 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1', 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2' }; var EXTPURPOSE_REV = {}; Object.keys(EXTPURPOSE).forEach(function (k) { EXTPURPOSE_REV[EXTPURPOSE[k]] = k; }); var KEYUSEBITS = [ 'signature', 'identity', 'keyEncryption', 'encryption', 'keyAgreement', 'ca', 'crl' ]; function readExtension(cert, buf, der) { der.readSequence(); var after = der.offset + der.length; var extId = der.readOID(); var id; var sig = cert.signatures.x509; if (!sig.extras.exts) sig.extras.exts = []; var critical; if (der.peek() === asn1.Ber.Boolean) critical = der.readBoolean(); switch (extId) { case (EXTS.basicConstraints): der.readSequence(asn1.Ber.OctetString); der.readSequence(); var bcEnd = der.offset + der.length; var ca = false; if (der.peek() === asn1.Ber.Boolean) ca = der.readBoolean(); if (cert.purposes === undefined) cert.purposes = []; if (ca === true) cert.purposes.push('ca'); var bc = { oid: extId, critical: critical }; if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer) bc.pathLen = der.readInt(); sig.extras.exts.push(bc); break; case (EXTS.extKeyUsage): der.readSequence(asn1.Ber.OctetString); der.readSequence(); if (cert.purposes === undefined) cert.purposes = []; var ekEnd = der.offset + der.length; while (der.offset < ekEnd) { var oid = der.readOID(); cert.purposes.push(EXTPURPOSE_REV[oid] || oid); } /* * This is a bit of a hack: in the case where we have a cert * that's only allowed to do serverAuth or clientAuth (and not * the other), we want to make sure all our Subjects are of * the right type. But we already parsed our Subjects and * decided if they were hosts or users earlier (since it appears * first in the cert). * * So we go through and mutate them into the right kind here if * it doesn't match. This might not be hugely beneficial, as it * seems that single-purpose certs are not often seen in the * wild. */ if (cert.purposes.indexOf('serverAuth') !== -1 && cert.purposes.indexOf('clientAuth') === -1) { cert.subjects.forEach(function (ide) { if (ide.type !== 'host') { ide.type = 'host'; ide.hostname = ide.uid || ide.email || ide.components[0].value; } }); } else if (cert.purposes.indexOf('clientAuth') !== -1 && cert.purposes.indexOf('serverAuth') === -1) { cert.subjects.forEach(function (ide) { if (ide.type !== 'user') { ide.type = 'user'; ide.uid = ide.hostname || ide.email || ide.components[0].value; } }); } sig.extras.exts.push({ oid: extId, critical: critical }); break; case (EXTS.keyUsage): der.readSequence(asn1.Ber.OctetString); var bits = der.readString(asn1.Ber.BitString, true); var setBits = readBitField(bits, KEYUSEBITS); setBits.forEach(function (bit) { if (cert.purposes === undefined) cert.purposes = []; if (cert.purposes.indexOf(bit) === -1) cert.purposes.push(bit); }); sig.extras.exts.push({ oid: extId, critical: critical, bits: bits }); break; case (EXTS.altName): der.readSequence(asn1.Ber.OctetString); der.readSequence(); var aeEnd = der.offset + der.length; while (der.offset < aeEnd) { switch (der.peek()) { case ALTNAME.OtherName: case ALTNAME.EDIPartyName: der.readSequence(); der._offset += der.length; break; case ALTNAME.OID: der.readOID(ALTNAME.OID); break; case ALTNAME.RFC822Name: /* RFC822 specifies email addresses */ var email = der.readString(ALTNAME.RFC822Name); id = Identity.forEmail(email); if (!cert.subjects[0].equals(id)) cert.subjects.push(id); break; case ALTNAME.DirectoryName: der.readSequence(ALTNAME.DirectoryName); id = Identity.parseAsn1(der); if (!cert.subjects[0].equals(id)) cert.subjects.push(id); break; case ALTNAME.DNSName: var host = der.readString( ALTNAME.DNSName); id = Identity.forHost(host); if (!cert.subjects[0].equals(id)) cert.subjects.push(id); break; default: der.readString(der.peek()); break; } } sig.extras.exts.push({ oid: extId, critical: critical }); break; default: sig.extras.exts.push({ oid: extId, critical: critical, data: der.readString(asn1.Ber.OctetString, true) }); break; } der._offset = after; } var UTCTIME_RE = /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; function utcTimeToDate(t) { var m = t.match(UTCTIME_RE); assert.ok(m, 'timestamps must be in UTC'); var d = new Date(); var thisYear = d.getUTCFullYear(); var century = Math.floor(thisYear / 100) * 100; var year = parseInt(m[1], 10); if (thisYear % 100 < 50 && year >= 60) year += (century - 1); else year += century; d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10)); d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); if (m[6] && m[6].length > 0) d.setUTCSeconds(parseInt(m[6], 10)); return (d); } var GTIME_RE = /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; function gTimeToDate(t) { var m = t.match(GTIME_RE); assert.ok(m); var d = new Date(); d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1, parseInt(m[3], 10)); d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); if (m[6] && m[6].length > 0) d.setUTCSeconds(parseInt(m[6], 10)); return (d); } function zeroPad(n, m) { if (m === undefined) m = 2; var s = '' + n; while (s.length < m) s = '0' + s; return (s); } function dateToUTCTime(d) { var s = ''; s += zeroPad(d.getUTCFullYear() % 100); s += zeroPad(d.getUTCMonth() + 1); s += zeroPad(d.getUTCDate()); s += zeroPad(d.getUTCHours()); s += zeroPad(d.getUTCMinutes()); s += zeroPad(d.getUTCSeconds()); s += 'Z'; return (s); } function dateToGTime(d) { var s = ''; s += zeroPad(d.getUTCFullYear(), 4); s += zeroPad(d.getUTCMonth() + 1); s += zeroPad(d.getUTCDate()); s += zeroPad(d.getUTCHours()); s += zeroPad(d.getUTCMinutes()); s += zeroPad(d.getUTCSeconds()); s += 'Z'; return (s); } function sign(cert, key) { if (cert.signatures.x509 === undefined) cert.signatures.x509 = {}; var sig = cert.signatures.x509; sig.algo = key.type + '-' + key.defaultHashAlgorithm(); if (SIGN_ALGS[sig.algo] === undefined) return (false); var der = new asn1.BerWriter(); writeTBSCert(cert, der); var blob = der.buffer; sig.cache = blob; var signer = key.createSign(); signer.write(blob); cert.signatures.x509.signature = signer.sign(); return (true); } function signAsync(cert, signer, done) { if (cert.signatures.x509 === undefined) cert.signatures.x509 = {}; var sig = cert.signatures.x509; var der = new asn1.BerWriter(); writeTBSCert(cert, der); var blob = der.buffer; sig.cache = blob; signer(blob, function (err, signature) { if (err) { done(err); return; } sig.algo = signature.type + '-' + signature.hashAlgorithm; if (SIGN_ALGS[sig.algo] === undefined) { done(new Error('Invalid signing algorithm "' + sig.algo + '"')); return; } sig.signature = signature; done(); }); } function write(cert, options) { var sig = cert.signatures.x509; assert.object(sig, 'x509 signature'); var der = new asn1.BerWriter(); der.startSequence(); if (sig.cache) { der._ensure(sig.cache.length); sig.cache.copy(der._buf, der._offset); der._offset += sig.cache.length; } else { writeTBSCert(cert, der); } der.startSequence(); der.writeOID(SIGN_ALGS[sig.algo]); if (sig.algo.match(/^rsa-/)) der.writeNull(); der.endSequence(); var sigData = sig.signature.toBuffer('asn1'); var data = Buffer.alloc(sigData.length + 1); data[0] = 0; sigData.copy(data, 1); der.writeBuffer(data, asn1.Ber.BitString); der.endSequence(); return (der.buffer); } function writeTBSCert(cert, der) { var sig = cert.signatures.x509; assert.object(sig, 'x509 signature'); der.startSequence(); der.startSequence(Local(0)); der.writeInt(2); der.endSequence(); der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer); der.startSequence(); der.writeOID(SIGN_ALGS[sig.algo]); if (sig.algo.match(/^rsa-/)) der.writeNull(); der.endSequence(); cert.issuer.toAsn1(der); der.startSequence(); writeDate(der, cert.validFrom); writeDate(der, cert.validUntil); der.endSequence(); var subject = cert.subjects[0]; var altNames = cert.subjects.slice(1); subject.toAsn1(der); pkcs8.writePkcs8(der, cert.subjectKey); if (sig.extras && sig.extras.issuerUniqueID) { der.writeBuffer(sig.extras.issuerUniqueID, Local(1)); } if (sig.extras && sig.extras.subjectUniqueID) { der.writeBuffer(sig.extras.subjectUniqueID, Local(2)); } if (altNames.length > 0 || subject.type === 'host' || (cert.purposes !== undefined && cert.purposes.length > 0) || (sig.extras && sig.extras.exts)) { der.startSequence(Local(3)); der.startSequence(); var exts = []; if (cert.purposes !== undefined && cert.purposes.length > 0) { exts.push({ oid: EXTS.basicConstraints, critical: true }); exts.push({ oid: EXTS.keyUsage, critical: true }); exts.push({ oid: EXTS.extKeyUsage, critical: true }); } exts.push({ oid: EXTS.altName }); if (sig.extras && sig.extras.exts) exts = sig.extras.exts; for (var i = 0; i < exts.length; ++i) { der.startSequence(); der.writeOID(exts[i].oid); if (exts[i].critical !== undefined) der.writeBoolean(exts[i].critical); if (exts[i].oid === EXTS.altName) { der.startSequence(asn1.Ber.OctetString); der.startSequence(); if (subject.type === 'host') { der.writeString(subject.hostname, Context(2)); } for (var j = 0; j < altNames.length; ++j) { if (altNames[j].type === 'host') { der.writeString( altNames[j].hostname, ALTNAME.DNSName); } else if (altNames[j].type === 'email') { der.writeString( altNames[j].email, ALTNAME.RFC822Name); } else { /* * Encode anything else as a * DN style name for now. */ der.startSequence( ALTNAME.DirectoryName); altNames[j].toAsn1(der); der.endSequence(); } } der.endSequence(); der.endSequence(); } else if (exts[i].oid === EXTS.basicConstraints) { der.startSequence(asn1.Ber.OctetString); der.startSequence(); var ca = (cert.purposes.indexOf('ca') !== -1); var pathLen = exts[i].pathLen; der.writeBoolean(ca); if (pathLen !== undefined) der.writeInt(pathLen); der.endSequence(); der.endSequence(); } else if (exts[i].oid === EXTS.extKeyUsage) { der.startSequence(asn1.Ber.OctetString); der.startSequence(); cert.purposes.forEach(function (purpose) { if (purpose === 'ca') return; if (KEYUSEBITS.indexOf(purpose) !== -1) return; var oid = purpose; if (EXTPURPOSE[purpose] !== undefined) oid = EXTPURPOSE[purpose]; der.writeOID(oid); }); der.endSequence(); der.endSequence(); } else if (exts[i].oid === EXTS.keyUsage) { der.startSequence(asn1.Ber.OctetString); /* * If we parsed this certificate from a byte * stream (i.e. we didn't generate it in sshpk) * then we'll have a ".bits" property on the * ext with the original raw byte contents. * * If we have this, use it here instead of * regenerating it. This guarantees we output * the same data we parsed, so signatures still * validate. */ if (exts[i].bits !== undefined) { der.writeBuffer(exts[i].bits, asn1.Ber.BitString); } else { var bits = writeBitField(cert.purposes, KEYUSEBITS); der.writeBuffer(bits, asn1.Ber.BitString); } der.endSequence(); } else { der.writeBuffer(exts[i].data, asn1.Ber.OctetString); } der.endSequence(); } der.endSequence(); der.endSequence(); } der.endSequence(); } /* * Reads an ASN.1 BER bitfield out of the Buffer produced by doing * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw * contents of the BitString tag, which is a count of unused bits followed by * the bits as a right-padded byte string. * * `bits` is the Buffer, `bitIndex` should contain an array of string names * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec. * * Returns an array of Strings, the names of the bits that were set to 1. */ function readBitField(bits, bitIndex) { var bitLen = 8 * (bits.length - 1) - bits[0]; var setBits = {}; for (var i = 0; i < bitLen; ++i) { var byteN = 1 + Math.floor(i / 8); var bit = 7 - (i % 8); var mask = 1 << bit; var bitVal = ((bits[byteN] & mask) !== 0); var name = bitIndex[i]; if (bitVal && typeof (name) === 'string') { setBits[name] = true; } } return (Object.keys(setBits)); } /* * `setBits` is an array of strings, containing the names for each bit that * sould be set to 1. `bitIndex` is same as in `readBitField()`. * * Returns a Buffer, ready to be written out with `BerWriter#writeString()`. */ function writeBitField(setBits, bitIndex) { var bitLen = bitIndex.length; var blen = Math.ceil(bitLen / 8); var unused = blen * 8 - bitLen; var bits = Buffer.alloc(1 + blen); // zero-filled bits[0] = unused; for (var i = 0; i < bitLen; ++i) { var byteN = 1 + Math.floor(i / 8); var bit = 7 - (i % 8); var mask = 1 << bit; var name = bitIndex[i]; if (name === undefined) continue; var bitVal = (setBits.indexOf(name) !== -1); if (bitVal) { bits[byteN] |= mask; } } return (bits); } /***/ }), /***/ 70508: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2017 Joyent, Inc. module.exports = Identity; var assert = __webpack_require__(66631); var algs = __webpack_require__(66126); var crypto = __webpack_require__(33373); var Fingerprint = __webpack_require__(13079); var Signature = __webpack_require__(91394); var errs = __webpack_require__(27979); var util = __webpack_require__(31669); var utils = __webpack_require__(80575); var asn1 = __webpack_require__(80970); var Buffer = __webpack_require__(15118).Buffer; /*JSSTYLED*/ var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; var oids = {}; oids.cn = '2.5.4.3'; oids.o = '2.5.4.10'; oids.ou = '2.5.4.11'; oids.l = '2.5.4.7'; oids.s = '2.5.4.8'; oids.c = '2.5.4.6'; oids.sn = '2.5.4.4'; oids.postalCode = '2.5.4.17'; oids.serialNumber = '2.5.4.5'; oids.street = '2.5.4.9'; oids.x500UniqueIdentifier = '2.5.4.45'; oids.role = '2.5.4.72'; oids.telephoneNumber = '2.5.4.20'; oids.description = '2.5.4.13'; oids.dc = '0.9.2342.19200300.100.1.25'; oids.uid = '0.9.2342.19200300.100.1.1'; oids.mail = '0.9.2342.19200300.100.1.3'; oids.title = '2.5.4.12'; oids.gn = '2.5.4.42'; oids.initials = '2.5.4.43'; oids.pseudonym = '2.5.4.65'; oids.emailAddress = '1.2.840.113549.1.9.1'; var unoids = {}; Object.keys(oids).forEach(function (k) { unoids[oids[k]] = k; }); function Identity(opts) { var self = this; assert.object(opts, 'options'); assert.arrayOfObject(opts.components, 'options.components'); this.components = opts.components; this.componentLookup = {}; this.components.forEach(function (c) { if (c.name && !c.oid) c.oid = oids[c.name]; if (c.oid && !c.name) c.name = unoids[c.oid]; if (self.componentLookup[c.name] === undefined) self.componentLookup[c.name] = []; self.componentLookup[c.name].push(c); }); if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { this.cn = this.componentLookup.cn[0].value; } assert.optionalString(opts.type, 'options.type'); if (opts.type === undefined) { if (this.components.length === 1 && this.componentLookup.cn && this.componentLookup.cn.length === 1 && this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { this.type = 'host'; this.hostname = this.componentLookup.cn[0].value; } else if (this.componentLookup.dc && this.components.length === this.componentLookup.dc.length) { this.type = 'host'; this.hostname = this.componentLookup.dc.map( function (c) { return (c.value); }).join('.'); } else if (this.componentLookup.uid && this.components.length === this.componentLookup.uid.length) { this.type = 'user'; this.uid = this.componentLookup.uid[0].value; } else if (this.componentLookup.cn && this.componentLookup.cn.length === 1 && this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { this.type = 'host'; this.hostname = this.componentLookup.cn[0].value; } else if (this.componentLookup.uid && this.componentLookup.uid.length === 1) { this.type = 'user'; this.uid = this.componentLookup.uid[0].value; } else if (this.componentLookup.mail && this.componentLookup.mail.length === 1) { this.type = 'email'; this.email = this.componentLookup.mail[0].value; } else if (this.componentLookup.cn && this.componentLookup.cn.length === 1) { this.type = 'user'; this.uid = this.componentLookup.cn[0].value; } else { this.type = 'unknown'; } } else { this.type = opts.type; if (this.type === 'host') this.hostname = opts.hostname; else if (this.type === 'user') this.uid = opts.uid; else if (this.type === 'email') this.email = opts.email; else throw (new Error('Unknown type ' + this.type)); } } Identity.prototype.toString = function () { return (this.components.map(function (c) { var n = c.name.toUpperCase(); /*JSSTYLED*/ n = n.replace(/=/g, '\\='); var v = c.value; /*JSSTYLED*/ v = v.replace(/,/g, '\\,'); return (n + '=' + v); }).join(', ')); }; Identity.prototype.get = function (name, asArray) { assert.string(name, 'name'); var arr = this.componentLookup[name]; if (arr === undefined || arr.length === 0) return (undefined); if (!asArray && arr.length > 1) throw (new Error('Multiple values for attribute ' + name)); if (!asArray) return (arr[0].value); return (arr.map(function (c) { return (c.value); })); }; Identity.prototype.toArray = function (idx) { return (this.components.map(function (c) { return ({ name: c.name, value: c.value }); })); }; /* * These are from X.680 -- PrintableString allowed chars are in section 37.4 * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 * (the basic ASCII character set). */ /* JSSTYLED */ var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; /* JSSTYLED */ var NOT_IA5 = /[^\x00-\x7f]/; Identity.prototype.toAsn1 = function (der, tag) { der.startSequence(tag); this.components.forEach(function (c) { der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); der.startSequence(); der.writeOID(c.oid); /* * If we fit in a PrintableString, use that. Otherwise use an * IA5String or UTF8String. * * If this identity was parsed from a DN, use the ASN.1 types * from the original representation (otherwise this might not * be a full match for the original in some validators). */ if (c.asn1type === asn1.Ber.Utf8String || c.value.match(NOT_IA5)) { var v = Buffer.from(c.value, 'utf8'); der.writeBuffer(v, asn1.Ber.Utf8String); } else if (c.asn1type === asn1.Ber.IA5String || c.value.match(NOT_PRINTABLE)) { der.writeString(c.value, asn1.Ber.IA5String); } else { var type = asn1.Ber.PrintableString; if (c.asn1type !== undefined) type = c.asn1type; der.writeString(c.value, type); } der.endSequence(); der.endSequence(); }); der.endSequence(); }; function globMatch(a, b) { if (a === '**' || b === '**') return (true); var aParts = a.split('.'); var bParts = b.split('.'); if (aParts.length !== bParts.length) return (false); for (var i = 0; i < aParts.length; ++i) { if (aParts[i] === '*' || bParts[i] === '*') continue; if (aParts[i] !== bParts[i]) return (false); } return (true); } Identity.prototype.equals = function (other) { if (!Identity.isIdentity(other, [1, 0])) return (false); if (other.components.length !== this.components.length) return (false); for (var i = 0; i < this.components.length; ++i) { if (this.components[i].oid !== other.components[i].oid) return (false); if (!globMatch(this.components[i].value, other.components[i].value)) { return (false); } } return (true); }; Identity.forHost = function (hostname) { assert.string(hostname, 'hostname'); return (new Identity({ type: 'host', hostname: hostname, components: [ { name: 'cn', value: hostname } ] })); }; Identity.forUser = function (uid) { assert.string(uid, 'uid'); return (new Identity({ type: 'user', uid: uid, components: [ { name: 'uid', value: uid } ] })); }; Identity.forEmail = function (email) { assert.string(email, 'email'); return (new Identity({ type: 'email', email: email, components: [ { name: 'mail', value: email } ] })); }; Identity.parseDN = function (dn) { assert.string(dn, 'dn'); var parts = ['']; var idx = 0; var rem = dn; while (rem.length > 0) { var m; /*JSSTYLED*/ if ((m = /^,/.exec(rem)) !== null) { parts[++idx] = ''; rem = rem.slice(m[0].length); /*JSSTYLED*/ } else if ((m = /^\\,/.exec(rem)) !== null) { parts[idx] += ','; rem = rem.slice(m[0].length); /*JSSTYLED*/ } else if ((m = /^\\./.exec(rem)) !== null) { parts[idx] += m[0]; rem = rem.slice(m[0].length); /*JSSTYLED*/ } else if ((m = /^[^\\,]+/.exec(rem)) !== null) { parts[idx] += m[0]; rem = rem.slice(m[0].length); } else { throw (new Error('Failed to parse DN')); } } var cmps = parts.map(function (c) { c = c.trim(); var eqPos = c.indexOf('='); while (eqPos > 0 && c.charAt(eqPos - 1) === '\\') eqPos = c.indexOf('=', eqPos + 1); if (eqPos === -1) { throw (new Error('Failed to parse DN')); } /*JSSTYLED*/ var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, '='); var value = c.slice(eqPos + 1); return ({ name: name, value: value }); }); return (new Identity({ components: cmps })); }; Identity.fromArray = function (components) { assert.arrayOfObject(components, 'components'); components.forEach(function (cmp) { assert.object(cmp, 'component'); assert.string(cmp.name, 'component.name'); if (!Buffer.isBuffer(cmp.value) && !(typeof (cmp.value) === 'string')) { throw (new Error('Invalid component value')); } }); return (new Identity({ components: components })); }; Identity.parseAsn1 = function (der, top) { var components = []; der.readSequence(top); var end = der.offset + der.length; while (der.offset < end) { der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); var after = der.offset + der.length; der.readSequence(); var oid = der.readOID(); var type = der.peek(); var value; switch (type) { case asn1.Ber.PrintableString: case asn1.Ber.IA5String: case asn1.Ber.OctetString: case asn1.Ber.T61String: value = der.readString(type); break; case asn1.Ber.Utf8String: value = der.readString(type, true); value = value.toString('utf8'); break; case asn1.Ber.CharacterString: case asn1.Ber.BMPString: value = der.readString(type, true); value = value.toString('utf16le'); break; default: throw (new Error('Unknown asn1 type ' + type)); } components.push({ oid: oid, asn1type: type, value: value }); der._offset = after; } der._offset = end; return (new Identity({ components: components })); }; Identity.isIdentity = function (obj, ver) { return (utils.isCompatible(obj, Identity, ver)); }; /* * API versions for Identity: * [1,0] -- initial ver */ Identity.prototype._sshpkApiVersion = [1, 0]; Identity._oldVersionDetect = function (obj) { return ([1, 0]); }; /***/ }), /***/ 87022: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. var Key = __webpack_require__(36814); var Fingerprint = __webpack_require__(13079); var Signature = __webpack_require__(91394); var PrivateKey = __webpack_require__(29602); var Certificate = __webpack_require__(7406); var Identity = __webpack_require__(70508); var errs = __webpack_require__(27979); module.exports = { /* top-level classes */ Key: Key, parseKey: Key.parse, Fingerprint: Fingerprint, parseFingerprint: Fingerprint.parse, Signature: Signature, parseSignature: Signature.parse, PrivateKey: PrivateKey, parsePrivateKey: PrivateKey.parse, generatePrivateKey: PrivateKey.generate, Certificate: Certificate, parseCertificate: Certificate.parse, createSelfSignedCertificate: Certificate.createSelfSigned, createCertificate: Certificate.create, Identity: Identity, identityFromDN: Identity.parseDN, identityForHost: Identity.forHost, identityForUser: Identity.forUser, identityForEmail: Identity.forEmail, identityFromArray: Identity.fromArray, /* errors */ FingerprintFormatError: errs.FingerprintFormatError, InvalidAlgorithmError: errs.InvalidAlgorithmError, KeyParseError: errs.KeyParseError, SignatureParseError: errs.SignatureParseError, KeyEncryptedError: errs.KeyEncryptedError, CertificateParseError: errs.CertificateParseError }; /***/ }), /***/ 36814: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2018 Joyent, Inc. module.exports = Key; var assert = __webpack_require__(66631); var algs = __webpack_require__(66126); var crypto = __webpack_require__(33373); var Fingerprint = __webpack_require__(13079); var Signature = __webpack_require__(91394); var DiffieHellman = __webpack_require__(57602).DiffieHellman; var errs = __webpack_require__(27979); var utils = __webpack_require__(80575); var PrivateKey = __webpack_require__(29602); var edCompat; try { edCompat = __webpack_require__(14694); } catch (e) { /* Just continue through, and bail out if we try to use it. */ } var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; var formats = {}; formats['auto'] = __webpack_require__(8243); formats['pem'] = __webpack_require__(14324); formats['pkcs1'] = __webpack_require__(69367); formats['pkcs8'] = __webpack_require__(4173); formats['rfc4253'] = __webpack_require__(88688); formats['ssh'] = __webpack_require__(68927); formats['ssh-private'] = __webpack_require__(3923); formats['openssh'] = formats['ssh-private']; formats['dnssec'] = __webpack_require__(63561); formats['putty'] = __webpack_require__(80974); formats['ppk'] = formats['putty']; function Key(opts) { assert.object(opts, 'options'); assert.arrayOfObject(opts.parts, 'options.parts'); assert.string(opts.type, 'options.type'); assert.optionalString(opts.comment, 'options.comment'); var algInfo = algs.info[opts.type]; if (typeof (algInfo) !== 'object') throw (new InvalidAlgorithmError(opts.type)); var partLookup = {}; for (var i = 0; i < opts.parts.length; ++i) { var part = opts.parts[i]; partLookup[part.name] = part; } this.type = opts.type; this.parts = opts.parts; this.part = partLookup; this.comment = undefined; this.source = opts.source; /* for speeding up hashing/fingerprint operations */ this._rfc4253Cache = opts._rfc4253Cache; this._hashCache = {}; var sz; this.curve = undefined; if (this.type === 'ecdsa') { var curve = this.part.curve.data.toString(); this.curve = curve; sz = algs.curves[curve].size; } else if (this.type === 'ed25519' || this.type === 'curve25519') { sz = 256; this.curve = 'curve25519'; } else { var szPart = this.part[algInfo.sizePart]; sz = szPart.data.length; sz = sz * 8 - utils.countZeros(szPart.data); } this.size = sz; } Key.formats = formats; Key.prototype.toBuffer = function (format, options) { if (format === undefined) format = 'ssh'; assert.string(format, 'format'); assert.object(formats[format], 'formats[format]'); assert.optionalObject(options, 'options'); if (format === 'rfc4253') { if (this._rfc4253Cache === undefined) this._rfc4253Cache = formats['rfc4253'].write(this); return (this._rfc4253Cache); } return (formats[format].write(this, options)); }; Key.prototype.toString = function (format, options) { return (this.toBuffer(format, options).toString()); }; Key.prototype.hash = function (algo, type) { assert.string(algo, 'algorithm'); assert.optionalString(type, 'type'); if (type === undefined) type = 'ssh'; algo = algo.toLowerCase(); if (algs.hashAlgs[algo] === undefined) throw (new InvalidAlgorithmError(algo)); var cacheKey = algo + '||' + type; if (this._hashCache[cacheKey]) return (this._hashCache[cacheKey]); var buf; if (type === 'ssh') { buf = this.toBuffer('rfc4253'); } else if (type === 'spki') { buf = formats.pkcs8.pkcs8ToBuffer(this); } else { throw (new Error('Hash type ' + type + ' not supported')); } var hash = crypto.createHash(algo).update(buf).digest(); this._hashCache[cacheKey] = hash; return (hash); }; Key.prototype.fingerprint = function (algo, type) { if (algo === undefined) algo = 'sha256'; if (type === undefined) type = 'ssh'; assert.string(algo, 'algorithm'); assert.string(type, 'type'); var opts = { type: 'key', hash: this.hash(algo, type), algorithm: algo, hashType: type }; return (new Fingerprint(opts)); }; Key.prototype.defaultHashAlgorithm = function () { var hashAlgo = 'sha1'; if (this.type === 'rsa') hashAlgo = 'sha256'; if (this.type === 'dsa' && this.size > 1024) hashAlgo = 'sha256'; if (this.type === 'ed25519') hashAlgo = 'sha512'; if (this.type === 'ecdsa') { if (this.size <= 256) hashAlgo = 'sha256'; else if (this.size <= 384) hashAlgo = 'sha384'; else hashAlgo = 'sha512'; } return (hashAlgo); }; Key.prototype.createVerify = function (hashAlgo) { if (hashAlgo === undefined) hashAlgo = this.defaultHashAlgorithm(); assert.string(hashAlgo, 'hash algorithm'); /* ED25519 is not supported by OpenSSL, use a javascript impl. */ if (this.type === 'ed25519' && edCompat !== undefined) return (new edCompat.Verifier(this, hashAlgo)); if (this.type === 'curve25519') throw (new Error('Curve25519 keys are not suitable for ' + 'signing or verification')); var v, nm, err; try { nm = hashAlgo.toUpperCase(); v = crypto.createVerify(nm); } catch (e) { err = e; } if (v === undefined || (err instanceof Error && err.message.match(/Unknown message digest/))) { nm = 'RSA-'; nm += hashAlgo.toUpperCase(); v = crypto.createVerify(nm); } assert.ok(v, 'failed to create verifier'); var oldVerify = v.verify.bind(v); var key = this.toBuffer('pkcs8'); var curve = this.curve; var self = this; v.verify = function (signature, fmt) { if (Signature.isSignature(signature, [2, 0])) { if (signature.type !== self.type) return (false); if (signature.hashAlgorithm && signature.hashAlgorithm !== hashAlgo) return (false); if (signature.curve && self.type === 'ecdsa' && signature.curve !== curve) return (false); return (oldVerify(key, signature.toBuffer('asn1'))); } else if (typeof (signature) === 'string' || Buffer.isBuffer(signature)) { return (oldVerify(key, signature, fmt)); /* * Avoid doing this on valid arguments, walking the prototype * chain can be quite slow. */ } else if (Signature.isSignature(signature, [1, 0])) { throw (new Error('signature was created by too old ' + 'a version of sshpk and cannot be verified')); } else { throw (new TypeError('signature must be a string, ' + 'Buffer, or Signature object')); } }; return (v); }; Key.prototype.createDiffieHellman = function () { if (this.type === 'rsa') throw (new Error('RSA keys do not support Diffie-Hellman')); return (new DiffieHellman(this)); }; Key.prototype.createDH = Key.prototype.createDiffieHellman; Key.parse = function (data, format, options) { if (typeof (data) !== 'string') assert.buffer(data, 'data'); if (format === undefined) format = 'auto'; assert.string(format, 'format'); if (typeof (options) === 'string') options = { filename: options }; assert.optionalObject(options, 'options'); if (options === undefined) options = {}; assert.optionalString(options.filename, 'options.filename'); if (options.filename === undefined) options.filename = '(unnamed)'; assert.object(formats[format], 'formats[format]'); try { var k = formats[format].read(data, options); if (k instanceof PrivateKey) k = k.toPublic(); if (!k.comment) k.comment = options.filename; return (k); } catch (e) { if (e.name === 'KeyEncryptedError') throw (e); throw (new KeyParseError(options.filename, format, e)); } }; Key.isKey = function (obj, ver) { return (utils.isCompatible(obj, Key, ver)); }; /* * API versions for Key: * [1,0] -- initial ver, may take Signature for createVerify or may not * [1,1] -- added pkcs1, pkcs8 formats * [1,2] -- added auto, ssh-private, openssh formats * [1,3] -- added defaultHashAlgorithm * [1,4] -- added ed support, createDH * [1,5] -- first explicitly tagged version * [1,6] -- changed ed25519 part names * [1,7] -- spki hash types */ Key.prototype._sshpkApiVersion = [1, 7]; Key._oldVersionDetect = function (obj) { assert.func(obj.toBuffer); assert.func(obj.fingerprint); if (obj.createDH) return ([1, 4]); if (obj.defaultHashAlgorithm) return ([1, 3]); if (obj.formats['auto']) return ([1, 2]); if (obj.formats['pkcs1']) return ([1, 1]); return ([1, 0]); }; /***/ }), /***/ 29602: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2017 Joyent, Inc. module.exports = PrivateKey; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var crypto = __webpack_require__(33373); var Fingerprint = __webpack_require__(13079); var Signature = __webpack_require__(91394); var errs = __webpack_require__(27979); var util = __webpack_require__(31669); var utils = __webpack_require__(80575); var dhe = __webpack_require__(57602); var generateECDSA = dhe.generateECDSA; var generateED25519 = dhe.generateED25519; var edCompat = __webpack_require__(14694); var nacl = __webpack_require__(68729); var Key = __webpack_require__(36814); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; var KeyEncryptedError = errs.KeyEncryptedError; var formats = {}; formats['auto'] = __webpack_require__(8243); formats['pem'] = __webpack_require__(14324); formats['pkcs1'] = __webpack_require__(69367); formats['pkcs8'] = __webpack_require__(4173); formats['rfc4253'] = __webpack_require__(88688); formats['ssh-private'] = __webpack_require__(3923); formats['openssh'] = formats['ssh-private']; formats['ssh'] = formats['ssh-private']; formats['dnssec'] = __webpack_require__(63561); function PrivateKey(opts) { assert.object(opts, 'options'); Key.call(this, opts); this._pubCache = undefined; } util.inherits(PrivateKey, Key); PrivateKey.formats = formats; PrivateKey.prototype.toBuffer = function (format, options) { if (format === undefined) format = 'pkcs1'; assert.string(format, 'format'); assert.object(formats[format], 'formats[format]'); assert.optionalObject(options, 'options'); return (formats[format].write(this, options)); }; PrivateKey.prototype.hash = function (algo, type) { return (this.toPublic().hash(algo, type)); }; PrivateKey.prototype.fingerprint = function (algo, type) { return (this.toPublic().fingerprint(algo, type)); }; PrivateKey.prototype.toPublic = function () { if (this._pubCache) return (this._pubCache); var algInfo = algs.info[this.type]; var pubParts = []; for (var i = 0; i < algInfo.parts.length; ++i) { var p = algInfo.parts[i]; pubParts.push(this.part[p]); } this._pubCache = new Key({ type: this.type, source: this, parts: pubParts }); if (this.comment) this._pubCache.comment = this.comment; return (this._pubCache); }; PrivateKey.prototype.derive = function (newType) { assert.string(newType, 'type'); var priv, pub, pair; if (this.type === 'ed25519' && newType === 'curve25519') { priv = this.part.k.data; if (priv[0] === 0x00) priv = priv.slice(1); pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); pub = Buffer.from(pair.publicKey); return (new PrivateKey({ type: 'curve25519', parts: [ { name: 'A', data: utils.mpNormalize(pub) }, { name: 'k', data: utils.mpNormalize(priv) } ] })); } else if (this.type === 'curve25519' && newType === 'ed25519') { priv = this.part.k.data; if (priv[0] === 0x00) priv = priv.slice(1); pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); pub = Buffer.from(pair.publicKey); return (new PrivateKey({ type: 'ed25519', parts: [ { name: 'A', data: utils.mpNormalize(pub) }, { name: 'k', data: utils.mpNormalize(priv) } ] })); } throw (new Error('Key derivation not supported from ' + this.type + ' to ' + newType)); }; PrivateKey.prototype.createVerify = function (hashAlgo) { return (this.toPublic().createVerify(hashAlgo)); }; PrivateKey.prototype.createSign = function (hashAlgo) { if (hashAlgo === undefined) hashAlgo = this.defaultHashAlgorithm(); assert.string(hashAlgo, 'hash algorithm'); /* ED25519 is not supported by OpenSSL, use a javascript impl. */ if (this.type === 'ed25519' && edCompat !== undefined) return (new edCompat.Signer(this, hashAlgo)); if (this.type === 'curve25519') throw (new Error('Curve25519 keys are not suitable for ' + 'signing or verification')); var v, nm, err; try { nm = hashAlgo.toUpperCase(); v = crypto.createSign(nm); } catch (e) { err = e; } if (v === undefined || (err instanceof Error && err.message.match(/Unknown message digest/))) { nm = 'RSA-'; nm += hashAlgo.toUpperCase(); v = crypto.createSign(nm); } assert.ok(v, 'failed to create verifier'); var oldSign = v.sign.bind(v); var key = this.toBuffer('pkcs1'); var type = this.type; var curve = this.curve; v.sign = function () { var sig = oldSign(key); if (typeof (sig) === 'string') sig = Buffer.from(sig, 'binary'); sig = Signature.parse(sig, type, 'asn1'); sig.hashAlgorithm = hashAlgo; sig.curve = curve; return (sig); }; return (v); }; PrivateKey.parse = function (data, format, options) { if (typeof (data) !== 'string') assert.buffer(data, 'data'); if (format === undefined) format = 'auto'; assert.string(format, 'format'); if (typeof (options) === 'string') options = { filename: options }; assert.optionalObject(options, 'options'); if (options === undefined) options = {}; assert.optionalString(options.filename, 'options.filename'); if (options.filename === undefined) options.filename = '(unnamed)'; assert.object(formats[format], 'formats[format]'); try { var k = formats[format].read(data, options); assert.ok(k instanceof PrivateKey, 'key is not a private key'); if (!k.comment) k.comment = options.filename; return (k); } catch (e) { if (e.name === 'KeyEncryptedError') throw (e); throw (new KeyParseError(options.filename, format, e)); } }; PrivateKey.isPrivateKey = function (obj, ver) { return (utils.isCompatible(obj, PrivateKey, ver)); }; PrivateKey.generate = function (type, options) { if (options === undefined) options = {}; assert.object(options, 'options'); switch (type) { case 'ecdsa': if (options.curve === undefined) options.curve = 'nistp256'; assert.string(options.curve, 'options.curve'); return (generateECDSA(options.curve)); case 'ed25519': return (generateED25519()); default: throw (new Error('Key generation not supported with key ' + 'type "' + type + '"')); } }; /* * API versions for PrivateKey: * [1,0] -- initial ver * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats * [1,2] -- added defaultHashAlgorithm * [1,3] -- added derive, ed, createDH * [1,4] -- first tagged version * [1,5] -- changed ed25519 part names and format * [1,6] -- type arguments for hash() and fingerprint() */ PrivateKey.prototype._sshpkApiVersion = [1, 6]; PrivateKey._oldVersionDetect = function (obj) { assert.func(obj.toPublic); assert.func(obj.createSign); if (obj.derive) return ([1, 3]); if (obj.defaultHashAlgorithm) return ([1, 2]); if (obj.formats['auto']) return ([1, 1]); return ([1, 0]); }; /***/ }), /***/ 91394: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = Signature; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var algs = __webpack_require__(66126); var crypto = __webpack_require__(33373); var errs = __webpack_require__(27979); var utils = __webpack_require__(80575); var asn1 = __webpack_require__(80970); var SSHBuffer = __webpack_require__(25621); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var SignatureParseError = errs.SignatureParseError; function Signature(opts) { assert.object(opts, 'options'); assert.arrayOfObject(opts.parts, 'options.parts'); assert.string(opts.type, 'options.type'); var partLookup = {}; for (var i = 0; i < opts.parts.length; ++i) { var part = opts.parts[i]; partLookup[part.name] = part; } this.type = opts.type; this.hashAlgorithm = opts.hashAlgo; this.curve = opts.curve; this.parts = opts.parts; this.part = partLookup; } Signature.prototype.toBuffer = function (format) { if (format === undefined) format = 'asn1'; assert.string(format, 'format'); var buf; var stype = 'ssh-' + this.type; switch (this.type) { case 'rsa': switch (this.hashAlgorithm) { case 'sha256': stype = 'rsa-sha2-256'; break; case 'sha512': stype = 'rsa-sha2-512'; break; case 'sha1': case undefined: break; default: throw (new Error('SSH signature ' + 'format does not support hash ' + 'algorithm ' + this.hashAlgorithm)); } if (format === 'ssh') { buf = new SSHBuffer({}); buf.writeString(stype); buf.writePart(this.part.sig); return (buf.toBuffer()); } else { return (this.part.sig.data); } break; case 'ed25519': if (format === 'ssh') { buf = new SSHBuffer({}); buf.writeString(stype); buf.writePart(this.part.sig); return (buf.toBuffer()); } else { return (this.part.sig.data); } break; case 'dsa': case 'ecdsa': var r, s; if (format === 'asn1') { var der = new asn1.BerWriter(); der.startSequence(); r = utils.mpNormalize(this.part.r.data); s = utils.mpNormalize(this.part.s.data); der.writeBuffer(r, asn1.Ber.Integer); der.writeBuffer(s, asn1.Ber.Integer); der.endSequence(); return (der.buffer); } else if (format === 'ssh' && this.type === 'dsa') { buf = new SSHBuffer({}); buf.writeString('ssh-dss'); r = this.part.r.data; if (r.length > 20 && r[0] === 0x00) r = r.slice(1); s = this.part.s.data; if (s.length > 20 && s[0] === 0x00) s = s.slice(1); if ((this.hashAlgorithm && this.hashAlgorithm !== 'sha1') || r.length + s.length !== 40) { throw (new Error('OpenSSH only supports ' + 'DSA signatures with SHA1 hash')); } buf.writeBuffer(Buffer.concat([r, s])); return (buf.toBuffer()); } else if (format === 'ssh' && this.type === 'ecdsa') { var inner = new SSHBuffer({}); r = this.part.r.data; inner.writeBuffer(r); inner.writePart(this.part.s); buf = new SSHBuffer({}); /* XXX: find a more proper way to do this? */ var curve; if (r[0] === 0x00) r = r.slice(1); var sz = r.length * 8; if (sz === 256) curve = 'nistp256'; else if (sz === 384) curve = 'nistp384'; else if (sz === 528) curve = 'nistp521'; buf.writeString('ecdsa-sha2-' + curve); buf.writeBuffer(inner.toBuffer()); return (buf.toBuffer()); } throw (new Error('Invalid signature format')); default: throw (new Error('Invalid signature data')); } }; Signature.prototype.toString = function (format) { assert.optionalString(format, 'format'); return (this.toBuffer(format).toString('base64')); }; Signature.parse = function (data, type, format) { if (typeof (data) === 'string') data = Buffer.from(data, 'base64'); assert.buffer(data, 'data'); assert.string(format, 'format'); assert.string(type, 'type'); var opts = {}; opts.type = type.toLowerCase(); opts.parts = []; try { assert.ok(data.length > 0, 'signature must not be empty'); switch (opts.type) { case 'rsa': return (parseOneNum(data, type, format, opts)); case 'ed25519': return (parseOneNum(data, type, format, opts)); case 'dsa': case 'ecdsa': if (format === 'asn1') return (parseDSAasn1(data, type, format, opts)); else if (opts.type === 'dsa') return (parseDSA(data, type, format, opts)); else return (parseECDSA(data, type, format, opts)); default: throw (new InvalidAlgorithmError(type)); } } catch (e) { if (e instanceof InvalidAlgorithmError) throw (e); throw (new SignatureParseError(type, format, e)); } }; function parseOneNum(data, type, format, opts) { if (format === 'ssh') { try { var buf = new SSHBuffer({buffer: data}); var head = buf.readString(); } catch (e) { /* fall through */ } if (buf !== undefined) { var msg = 'SSH signature does not match expected ' + 'type (expected ' + type + ', got ' + head + ')'; switch (head) { case 'ssh-rsa': assert.strictEqual(type, 'rsa', msg); opts.hashAlgo = 'sha1'; break; case 'rsa-sha2-256': assert.strictEqual(type, 'rsa', msg); opts.hashAlgo = 'sha256'; break; case 'rsa-sha2-512': assert.strictEqual(type, 'rsa', msg); opts.hashAlgo = 'sha512'; break; case 'ssh-ed25519': assert.strictEqual(type, 'ed25519', msg); opts.hashAlgo = 'sha512'; break; default: throw (new Error('Unknown SSH signature ' + 'type: ' + head)); } var sig = buf.readPart(); assert.ok(buf.atEnd(), 'extra trailing bytes'); sig.name = 'sig'; opts.parts.push(sig); return (new Signature(opts)); } } opts.parts.push({name: 'sig', data: data}); return (new Signature(opts)); } function parseDSAasn1(data, type, format, opts) { var der = new asn1.BerReader(data); der.readSequence(); var r = der.readString(asn1.Ber.Integer, true); var s = der.readString(asn1.Ber.Integer, true); opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); opts.parts.push({name: 's', data: utils.mpNormalize(s)}); return (new Signature(opts)); } function parseDSA(data, type, format, opts) { if (data.length != 40) { var buf = new SSHBuffer({buffer: data}); var d = buf.readBuffer(); if (d.toString('ascii') === 'ssh-dss') d = buf.readBuffer(); assert.ok(buf.atEnd(), 'extra trailing bytes'); assert.strictEqual(d.length, 40, 'invalid inner length'); data = d; } opts.parts.push({name: 'r', data: data.slice(0, 20)}); opts.parts.push({name: 's', data: data.slice(20, 40)}); return (new Signature(opts)); } function parseECDSA(data, type, format, opts) { var buf = new SSHBuffer({buffer: data}); var r, s; var inner = buf.readBuffer(); var stype = inner.toString('ascii'); if (stype.slice(0, 6) === 'ecdsa-') { var parts = stype.split('-'); assert.strictEqual(parts[0], 'ecdsa'); assert.strictEqual(parts[1], 'sha2'); opts.curve = parts[2]; switch (opts.curve) { case 'nistp256': opts.hashAlgo = 'sha256'; break; case 'nistp384': opts.hashAlgo = 'sha384'; break; case 'nistp521': opts.hashAlgo = 'sha512'; break; default: throw (new Error('Unsupported ECDSA curve: ' + opts.curve)); } inner = buf.readBuffer(); assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); buf = new SSHBuffer({buffer: inner}); r = buf.readPart(); } else { r = {data: inner}; } s = buf.readPart(); assert.ok(buf.atEnd(), 'extra trailing bytes'); r.name = 'r'; s.name = 's'; opts.parts.push(r); opts.parts.push(s); return (new Signature(opts)); } Signature.isSignature = function (obj, ver) { return (utils.isCompatible(obj, Signature, ver)); }; /* * API versions for Signature: * [1,0] -- initial ver * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent * hashAlgorithm property * [2,1] -- first tagged version */ Signature.prototype._sshpkApiVersion = [2, 1]; Signature._oldVersionDetect = function (obj) { assert.func(obj.toBuffer); if (obj.hasOwnProperty('hashAlgorithm')) return ([2, 0]); return ([1, 0]); }; /***/ }), /***/ 25621: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = SSHBuffer; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; function SSHBuffer(opts) { assert.object(opts, 'options'); if (opts.buffer !== undefined) assert.buffer(opts.buffer, 'options.buffer'); this._size = opts.buffer ? opts.buffer.length : 1024; this._buffer = opts.buffer || Buffer.alloc(this._size); this._offset = 0; } SSHBuffer.prototype.toBuffer = function () { return (this._buffer.slice(0, this._offset)); }; SSHBuffer.prototype.atEnd = function () { return (this._offset >= this._buffer.length); }; SSHBuffer.prototype.remainder = function () { return (this._buffer.slice(this._offset)); }; SSHBuffer.prototype.skip = function (n) { this._offset += n; }; SSHBuffer.prototype.expand = function () { this._size *= 2; var buf = Buffer.alloc(this._size); this._buffer.copy(buf, 0); this._buffer = buf; }; SSHBuffer.prototype.readPart = function () { return ({data: this.readBuffer()}); }; SSHBuffer.prototype.readBuffer = function () { var len = this._buffer.readUInt32BE(this._offset); this._offset += 4; assert.ok(this._offset + len <= this._buffer.length, 'length out of bounds at +0x' + this._offset.toString(16) + ' (data truncated?)'); var buf = this._buffer.slice(this._offset, this._offset + len); this._offset += len; return (buf); }; SSHBuffer.prototype.readString = function () { return (this.readBuffer().toString()); }; SSHBuffer.prototype.readCString = function () { var offset = this._offset; while (offset < this._buffer.length && this._buffer[offset] !== 0x00) offset++; assert.ok(offset < this._buffer.length, 'c string does not terminate'); var str = this._buffer.slice(this._offset, offset).toString(); this._offset = offset + 1; return (str); }; SSHBuffer.prototype.readInt = function () { var v = this._buffer.readUInt32BE(this._offset); this._offset += 4; return (v); }; SSHBuffer.prototype.readInt64 = function () { assert.ok(this._offset + 8 < this._buffer.length, 'buffer not long enough to read Int64'); var v = this._buffer.slice(this._offset, this._offset + 8); this._offset += 8; return (v); }; SSHBuffer.prototype.readChar = function () { var v = this._buffer[this._offset++]; return (v); }; SSHBuffer.prototype.writeBuffer = function (buf) { while (this._offset + 4 + buf.length > this._size) this.expand(); this._buffer.writeUInt32BE(buf.length, this._offset); this._offset += 4; buf.copy(this._buffer, this._offset); this._offset += buf.length; }; SSHBuffer.prototype.writeString = function (str) { this.writeBuffer(Buffer.from(str, 'utf8')); }; SSHBuffer.prototype.writeCString = function (str) { while (this._offset + 1 + str.length > this._size) this.expand(); this._buffer.write(str, this._offset); this._offset += str.length; this._buffer[this._offset++] = 0; }; SSHBuffer.prototype.writeInt = function (v) { while (this._offset + 4 > this._size) this.expand(); this._buffer.writeUInt32BE(v, this._offset); this._offset += 4; }; SSHBuffer.prototype.writeInt64 = function (v) { assert.buffer(v, 'value'); if (v.length > 8) { var lead = v.slice(0, v.length - 8); for (var i = 0; i < lead.length; ++i) { assert.strictEqual(lead[i], 0, 'must fit in 64 bits of precision'); } v = v.slice(v.length - 8, v.length); } while (this._offset + 8 > this._size) this.expand(); v.copy(this._buffer, this._offset); this._offset += 8; }; SSHBuffer.prototype.writeChar = function (v) { while (this._offset + 1 > this._size) this.expand(); this._buffer[this._offset++] = v; }; SSHBuffer.prototype.writePart = function (p) { this.writeBuffer(p.data); }; SSHBuffer.prototype.write = function (buf) { while (this._offset + buf.length > this._size) this.expand(); buf.copy(this._buffer, this._offset); this._offset += buf.length; }; /***/ }), /***/ 80575: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2015 Joyent, Inc. module.exports = { bufferSplit: bufferSplit, addRSAMissing: addRSAMissing, calculateDSAPublic: calculateDSAPublic, calculateED25519Public: calculateED25519Public, calculateX25519Public: calculateX25519Public, mpNormalize: mpNormalize, mpDenormalize: mpDenormalize, ecNormalize: ecNormalize, countZeros: countZeros, assertCompatible: assertCompatible, isCompatible: isCompatible, opensslKeyDeriv: opensslKeyDeriv, opensshCipherInfo: opensshCipherInfo, publicFromPrivateECDSA: publicFromPrivateECDSA, zeroPadToLength: zeroPadToLength, writeBitString: writeBitString, readBitString: readBitString, pbkdf2: pbkdf2 }; var assert = __webpack_require__(66631); var Buffer = __webpack_require__(15118).Buffer; var PrivateKey = __webpack_require__(29602); var Key = __webpack_require__(36814); var crypto = __webpack_require__(33373); var algs = __webpack_require__(66126); var asn1 = __webpack_require__(80970); var ec = __webpack_require__(3943); var jsbn = __webpack_require__(85587).BigInteger; var nacl = __webpack_require__(68729); var MAX_CLASS_DEPTH = 3; function isCompatible(obj, klass, needVer) { if (obj === null || typeof (obj) !== 'object') return (false); if (needVer === undefined) needVer = klass.prototype._sshpkApiVersion; if (obj instanceof klass && klass.prototype._sshpkApiVersion[0] == needVer[0]) return (true); var proto = Object.getPrototypeOf(obj); var depth = 0; while (proto.constructor.name !== klass.name) { proto = Object.getPrototypeOf(proto); if (!proto || ++depth > MAX_CLASS_DEPTH) return (false); } if (proto.constructor.name !== klass.name) return (false); var ver = proto._sshpkApiVersion; if (ver === undefined) ver = klass._oldVersionDetect(obj); if (ver[0] != needVer[0] || ver[1] < needVer[1]) return (false); return (true); } function assertCompatible(obj, klass, needVer, name) { if (name === undefined) name = 'object'; assert.ok(obj, name + ' must not be null'); assert.object(obj, name + ' must be an object'); if (needVer === undefined) needVer = klass.prototype._sshpkApiVersion; if (obj instanceof klass && klass.prototype._sshpkApiVersion[0] == needVer[0]) return; var proto = Object.getPrototypeOf(obj); var depth = 0; while (proto.constructor.name !== klass.name) { proto = Object.getPrototypeOf(proto); assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, name + ' must be a ' + klass.name + ' instance'); } assert.strictEqual(proto.constructor.name, klass.name, name + ' must be a ' + klass.name + ' instance'); var ver = proto._sshpkApiVersion; if (ver === undefined) ver = klass._oldVersionDetect(obj); assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], name + ' must be compatible with ' + klass.name + ' klass ' + 'version ' + needVer[0] + '.' + needVer[1]); } var CIPHER_LEN = { 'des-ede3-cbc': { key: 24, iv: 8 }, 'aes-128-cbc': { key: 16, iv: 16 }, 'aes-256-cbc': { key: 32, iv: 16 } }; var PKCS5_SALT_LEN = 8; function opensslKeyDeriv(cipher, salt, passphrase, count) { assert.buffer(salt, 'salt'); assert.buffer(passphrase, 'passphrase'); assert.number(count, 'iteration count'); var clen = CIPHER_LEN[cipher]; assert.object(clen, 'supported cipher'); salt = salt.slice(0, PKCS5_SALT_LEN); var D, D_prev, bufs; var material = Buffer.alloc(0); while (material.length < clen.key + clen.iv) { bufs = []; if (D_prev) bufs.push(D_prev); bufs.push(passphrase); bufs.push(salt); D = Buffer.concat(bufs); for (var j = 0; j < count; ++j) D = crypto.createHash('md5').update(D).digest(); material = Buffer.concat([material, D]); D_prev = D; } return ({ key: material.slice(0, clen.key), iv: material.slice(clen.key, clen.key + clen.iv) }); } /* See: RFC2898 */ function pbkdf2(hashAlg, salt, iterations, size, passphrase) { var hkey = Buffer.alloc(salt.length + 4); salt.copy(hkey); var gen = 0, ts = []; var i = 1; while (gen < size) { var t = T(i++); gen += t.length; ts.push(t); } return (Buffer.concat(ts).slice(0, size)); function T(I) { hkey.writeUInt32BE(I, hkey.length - 4); var hmac = crypto.createHmac(hashAlg, passphrase); hmac.update(hkey); var Ti = hmac.digest(); var Uc = Ti; var c = 1; while (c++ < iterations) { hmac = crypto.createHmac(hashAlg, passphrase); hmac.update(Uc); Uc = hmac.digest(); for (var x = 0; x < Ti.length; ++x) Ti[x] ^= Uc[x]; } return (Ti); } } /* Count leading zero bits on a buffer */ function countZeros(buf) { var o = 0, obit = 8; while (o < buf.length) { var mask = (1 << obit); if ((buf[o] & mask) === mask) break; obit--; if (obit < 0) { o++; obit = 8; } } return (o*8 + (8 - obit) - 1); } function bufferSplit(buf, chr) { assert.buffer(buf); assert.string(chr); var parts = []; var lastPart = 0; var matches = 0; for (var i = 0; i < buf.length; ++i) { if (buf[i] === chr.charCodeAt(matches)) ++matches; else if (buf[i] === chr.charCodeAt(0)) matches = 1; else matches = 0; if (matches >= chr.length) { var newPart = i + 1; parts.push(buf.slice(lastPart, newPart - matches)); lastPart = newPart; matches = 0; } } if (lastPart <= buf.length) parts.push(buf.slice(lastPart, buf.length)); return (parts); } function ecNormalize(buf, addZero) { assert.buffer(buf); if (buf[0] === 0x00 && buf[1] === 0x04) { if (addZero) return (buf); return (buf.slice(1)); } else if (buf[0] === 0x04) { if (!addZero) return (buf); } else { while (buf[0] === 0x00) buf = buf.slice(1); if (buf[0] === 0x02 || buf[0] === 0x03) throw (new Error('Compressed elliptic curve points ' + 'are not supported')); if (buf[0] !== 0x04) throw (new Error('Not a valid elliptic curve point')); if (!addZero) return (buf); } var b = Buffer.alloc(buf.length + 1); b[0] = 0x0; buf.copy(b, 1); return (b); } function readBitString(der, tag) { if (tag === undefined) tag = asn1.Ber.BitString; var buf = der.readString(tag, true); assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + 'not supported (0x' + buf[0].toString(16) + ')'); return (buf.slice(1)); } function writeBitString(der, buf, tag) { if (tag === undefined) tag = asn1.Ber.BitString; var b = Buffer.alloc(buf.length + 1); b[0] = 0x00; buf.copy(b, 1); der.writeBuffer(b, tag); } function mpNormalize(buf) { assert.buffer(buf); while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) buf = buf.slice(1); if ((buf[0] & 0x80) === 0x80) { var b = Buffer.alloc(buf.length + 1); b[0] = 0x00; buf.copy(b, 1); buf = b; } return (buf); } function mpDenormalize(buf) { assert.buffer(buf); while (buf.length > 1 && buf[0] === 0x00) buf = buf.slice(1); return (buf); } function zeroPadToLength(buf, len) { assert.buffer(buf); assert.number(len); while (buf.length > len) { assert.equal(buf[0], 0x00); buf = buf.slice(1); } while (buf.length < len) { var b = Buffer.alloc(buf.length + 1); b[0] = 0x00; buf.copy(b, 1); buf = b; } return (buf); } function bigintToMpBuf(bigint) { var buf = Buffer.from(bigint.toByteArray()); buf = mpNormalize(buf); return (buf); } function calculateDSAPublic(g, p, x) { assert.buffer(g); assert.buffer(p); assert.buffer(x); g = new jsbn(g); p = new jsbn(p); x = new jsbn(x); var y = g.modPow(x, p); var ybuf = bigintToMpBuf(y); return (ybuf); } function calculateED25519Public(k) { assert.buffer(k); var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); return (Buffer.from(kp.publicKey)); } function calculateX25519Public(k) { assert.buffer(k); var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); return (Buffer.from(kp.publicKey)); } function addRSAMissing(key) { assert.object(key); assertCompatible(key, PrivateKey, [1, 1]); var d = new jsbn(key.part.d.data); var buf; if (!key.part.dmodp) { var p = new jsbn(key.part.p.data); var dmodp = d.mod(p.subtract(1)); buf = bigintToMpBuf(dmodp); key.part.dmodp = {name: 'dmodp', data: buf}; key.parts.push(key.part.dmodp); } if (!key.part.dmodq) { var q = new jsbn(key.part.q.data); var dmodq = d.mod(q.subtract(1)); buf = bigintToMpBuf(dmodq); key.part.dmodq = {name: 'dmodq', data: buf}; key.parts.push(key.part.dmodq); } } function publicFromPrivateECDSA(curveName, priv) { assert.string(curveName, 'curveName'); assert.buffer(priv); var params = algs.curves[curveName]; var p = new jsbn(params.p); var a = new jsbn(params.a); var b = new jsbn(params.b); var curve = new ec.ECCurveFp(p, a, b); var G = curve.decodePointHex(params.G.toString('hex')); var d = new jsbn(mpNormalize(priv)); var pub = G.multiply(d); pub = Buffer.from(curve.encodePointHex(pub), 'hex'); var parts = []; parts.push({name: 'curve', data: Buffer.from(curveName)}); parts.push({name: 'Q', data: pub}); var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); return (key); } function opensshCipherInfo(cipher) { var inf = {}; switch (cipher) { case '3des-cbc': inf.keySize = 24; inf.blockSize = 8; inf.opensslName = 'des-ede3-cbc'; break; case 'blowfish-cbc': inf.keySize = 16; inf.blockSize = 8; inf.opensslName = 'bf-cbc'; break; case 'aes128-cbc': case 'aes128-ctr': case 'aes128-gcm@openssh.com': inf.keySize = 16; inf.blockSize = 16; inf.opensslName = 'aes-128-' + cipher.slice(7, 10); break; case 'aes192-cbc': case 'aes192-ctr': case 'aes192-gcm@openssh.com': inf.keySize = 24; inf.blockSize = 16; inf.opensslName = 'aes-192-' + cipher.slice(7, 10); break; case 'aes256-cbc': case 'aes256-ctr': case 'aes256-gcm@openssh.com': inf.keySize = 32; inf.blockSize = 16; inf.opensslName = 'aes-256-' + cipher.slice(7, 10); break; default: throw (new Error( 'Unsupported openssl cipher "' + cipher + '"')); } return (inf); } /***/ }), /***/ 91860: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Component = __webpack_require__(33314) class Client { constructor (options) { const backend = options.backend if (!backend) throw new Error('expected "backend"') const root = new Component({ splits: [], backend, getNames: options.getNames }) if (options.spec) root._addSpec(options.spec) return root } } module.exports = Client /***/ }), /***/ 96789: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Client = __webpack_require__(91860) const Component = __webpack_require__(33314) module.exports = { Client, Component } /***/ }), /***/ 33314: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* eslint-disable no-sync */ /** * @file Convert a OpenAPI/Swagger specification into a API client. * * Represent Swagger a Path Item Object [1] with chains of objects: * * /api/v1/namespaces -> api.v1.namespaces * * Associate operations on a Path Item Object with functions: * * GET /api/v1/namespaces -> api.v1.namespaces.get() * * Represent Path Templating [2] with function calls: * * /api/v1/namespaces/{namespace}/pods -> api.v1.namespaces(namespace).pods * * Iterate over a Paths Object [3] to generate whole API client. * * [1]: https://swagger.io/specification/#pathItemObject * [2]: https://swagger.io/specification/#pathTemplating * [3]: https://swagger.io/specification/#pathsObject */ const merge = __webpack_require__(56323) const isPlainObject = __webpack_require__(48840) class Endpoint { /** * Internal representation of a Swagger Path Item Object. * @param {object} options - Options object * @param {string} options.name - Path Item Object name * @param {array} options.splits - Pathname pieces split in '/' * @param {object} options.pathItem - Swagger Path Item Object. */ constructor (options) { this.name = options.name this.splits = options.splits this.pathItem = options.pathItem } } class Component { /** * Represents a single path split, child Components, and potentially a Path * Item Object. * @param {object} options - Options object * @param {object} options.http - Request object * @param {array} options.splits - Absolute pathname (split on '/') * @param {string} options.parameters - Path Template values for parents * @param {string} options.template - Optional Path Template (e.g., {name}) */ constructor (options) { options = Object.assign({ splits: [], parameters: [] }, options) let component // // Support Path Templating: use a function to create a a Component-like // object if required. Otherwise use a vanilla object (that isn't callable). // if (options.templated) { component = name => { const splits = component.splits.concat([name]) // // Assume that we'll never have a path with adjacent templates. // E.g., assume `/foo/{name}/{property}` cannot exist. // const namedComponent = new this.constructor({ backend: component.backend, getNames: options.getNames, splits: splits, parameters: options.parameters.concat([name]) }) component.templatedEndpoints.forEach(child => { namedComponent._addEndpoint(child) }) return namedComponent } component.templatedEndpoints = [] // // Attach methods // Object.setPrototypeOf(component, this.constructor.prototype) } else { component = this component.templatedEndpoints = null } component.parameters = options.parameters component.templated = options.templated component.splits = options.splits.slice() component.backend = options.backend component.getNames = options.getNames || (split => [split]) component.children = [] return component } /** * Get the path. * @returns {string} path with '/' as the separator. */ getPath () { return `/${this.splits.join('/')}` } /** * Return an object of pathname parameters. * @returns {object} object mapping each parameter name to its value. */ getPathnameParameters () { const pathnameParameterNames = this.swaggerName .split('/') .filter(component => component.startsWith('{')) .map(component => component.slice(1, -1)) return pathnameParameterNames.reduce((acc, value, index) => { acc[value] = this.parameters[index] return acc }, {}) } /** * Add endpoints defined by a swagger spec to this component. You would * typically call this only on the root component to add API resources. For * example, during client initialization, to extend the client with CRDs. * @param {object} spec - Swagger specification */ _addSpec (spec) { // // TODO(sbw): It's important to add endpoints with templating before adding // any endpoints with paths that are subpaths of templated paths. // // E.g., add /api/v1/namepaces/{namespace} before adding /api/v1/namepaces // // This is important because ._addEndpoint constructs Component objects on // demand, and Component requires specifying if it's templated or not. If we // cause ._addEndpoint to construct a un-templated Component, templated // operations that share the Components subpath will not work. // Object.keys(spec.paths) .map(name => { const leadingAndTrailingSlashes = /(^\/)|(\/$)/g const splits = name.replace(leadingAndTrailingSlashes, '').split('/') return new Endpoint({ name, splits, pathItem: spec.paths[name] }) }) .sort((endpoint0, endpoint1) => { return endpoint1.splits.length - endpoint0.splits.length }).forEach(endpoint => { this._addEndpoint(endpoint) }) } _addChild (split, component) { this.getNames(split, this.splits).forEach(name => { this[name] = component this.children.push(name) }) } _walkSplits (endpoint) { const splits = this.splits.slice() const nextSplits = endpoint.splits.slice() let parent = this while (nextSplits.length) { const split = nextSplits.shift() splits.push(split) let template = null if (nextSplits.length && nextSplits[0].startsWith('{')) { template = nextSplits.shift().slice(1, -1) } if (!(split in parent)) { const component = new this.constructor({ getNames: this.getNames, backend: this.backend, parameters: this.parameters, templated: Boolean(template), splits }) parent._addChild(split, component) } parent = parent[split] // // Path Template: save it and walk it once the user specifies // the value. // if (template) { if (!parent.templated) { throw new Error('Created Component, but require templated one. ' + 'This is a bug. Please report: ' + 'https://github.com/silasbw/fluent-openapi/issues') } parent.templatedEndpoints.push(new Endpoint({ name: endpoint.name, splits: nextSplits, pathItem: endpoint.pathItem })) return null } } return parent } /** * Add an Endpoint by creating an object chain according to its pathname * splits; and adding operations according to the pathItem. * @param {Endpoint} endpoint - Endpoint object. * @returns {Component} Component object endpoint was added to. */ _addEndpoint (endpoint) { const component = this._walkSplits(endpoint) if (!component) return null component.pathItemObject = endpoint.pathItem component.swaggerName = endpoint.name // // "Expose" operations by omitting the leading _ from the method name. // const supportedMethods = ['get', 'put', 'post', 'delete', 'patch'] supportedMethods .filter(method => endpoint.pathItem[method]) .forEach(method => { component[method] = component['_' + method] if (method === 'get') component.getStream = component._getStream }) return component } /** * Invoke a REST method * @param {string} method - HTTP method * @param {ApiRequestOptions} options - Options object * @returns {(Promise|Stream)} Promise */ _requestAsync (method, options) { return this.backend.http(Object.assign({ method, pathItemObject: this.pathItemObject, pathname: this.getPath(), pathnameParameters: this.getPathnameParameters() }, options)) } // // Supported operations. // /** * Invoke a GET request against the API server * @param {ApiRequestOptions} options - Options object. * @returns {Stream} Stream */ _getStream (options) { return this._requestAsync('GET', Object.assign({ stream: true }, options)) } /** * Invoke a GET request against the API server * @param {ApiRequestOptions} options - Options object. * @returns {Promise} Promise */ _get (options) { return this._requestAsync('GET', options) } /** * Invoke a DELETE request against the API server * @param {ApiRequestOptions} options - Options object. * @returns {Promise} Promise */ _delete (options) { return this._requestAsync('DELETE', options) } /** * Invoke a PATCH request against the API server * @param {ApiRequestOptions} options - Options object * @returns {Promise} Promise */ _patch (options) { return this._requestAsync('PATCH', merge({ headers: { 'content-type': 'application/strategic-merge-patch+json' } }, options, { isMergeableObject: isPlainObject })) } /** * Invoke a POST request against the API server * @param {ApiRequestOptions} options - Options object * @returns {Promise} Promise */ _post (options) { return this._requestAsync('POST', merge({ headers: { 'content-type': 'application/json' } }, options, { isMergeableObject: isPlainObject })) } /** * Invoke a PUT request against the API server * @param {ApiRequestOptions} options - Options object * @returns {Promise} Promise */ _put (options) { return this._requestAsync('PUT', merge({ headers: { 'content-type': 'application/json' } }, options, { isMergeableObject: isPlainObject })) } } module.exports = Component /***/ }), /***/ 53158: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Readable} = __webpack_require__(92413); module.exports = input => ( new Readable({ read() { this.push(input); this.push(null); } }) ); /***/ }), /***/ 47372: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /*! * Copyright (c) 2015, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Salesforce.com nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ var net = __webpack_require__(11631); var urlParse = __webpack_require__(78835).parse; var util = __webpack_require__(31669); var pubsuffix = __webpack_require__(94401); var Store = __webpack_require__(460)/* .Store */ .y; var MemoryCookieStore = __webpack_require__(52640)/* .MemoryCookieStore */ .m; var pathMatch = __webpack_require__(54336)/* .pathMatch */ .U; var VERSION = __webpack_require__(93199); var punycode; try { punycode = __webpack_require__(94213); } catch(e) { console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); } // From RFC6265 S4.1.1 // note that it excludes \x3B ";" var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; var CONTROL_CHARS = /[\x00-\x1F]/; // From Chromium // '\r', '\n' and '\0' should be treated as a terminator in // the "relaxed" mode, see: // https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 var TERMINATORS = ['\n', '\r', '\0']; // RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' // Note ';' is \x3B var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; // date-time parsing constants (RFC6265 S5.1.1) var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; var MONTH_TO_NUM = { jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 }; var NUM_TO_MONTH = [ 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' ]; var NUM_TO_DAY = [ 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' ]; var MAX_TIME = 2147483647000; // 31-bit max var MIN_TIME = 0; // 31-bit min /* * Parses a Natural number (i.e., non-negative integer) with either the * *DIGIT ( non-digit *OCTET ) * or * *DIGIT * grammar (RFC6265 S5.1.1). * * The "trailingOK" boolean controls if the grammar accepts a * "( non-digit *OCTET )" trailer. */ function parseDigits(token, minDigits, maxDigits, trailingOK) { var count = 0; while (count < token.length) { var c = token.charCodeAt(count); // "non-digit = %x00-2F / %x3A-FF" if (c <= 0x2F || c >= 0x3A) { break; } count++; } // constrain to a minimum and maximum number of digits. if (count < minDigits || count > maxDigits) { return null; } if (!trailingOK && count != token.length) { return null; } return parseInt(token.substr(0,count), 10); } function parseTime(token) { var parts = token.split(':'); var result = [0,0,0]; /* RF6256 S5.1.1: * time = hms-time ( non-digit *OCTET ) * hms-time = time-field ":" time-field ":" time-field * time-field = 1*2DIGIT */ if (parts.length !== 3) { return null; } for (var i = 0; i < 3; i++) { // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be // followed by "( non-digit *OCTET )" so therefore the last time-field can // have a trailer var trailingOK = (i == 2); var num = parseDigits(parts[i], 1, 2, trailingOK); if (num === null) { return null; } result[i] = num; } return result; } function parseMonth(token) { token = String(token).substr(0,3).toLowerCase(); var num = MONTH_TO_NUM[token]; return num >= 0 ? num : null; } /* * RFC6265 S5.1.1 date parser (see RFC for full grammar) */ function parseDate(str) { if (!str) { return; } /* RFC6265 S5.1.1: * 2. Process each date-token sequentially in the order the date-tokens * appear in the cookie-date */ var tokens = str.split(DATE_DELIM); if (!tokens) { return; } var hour = null; var minute = null; var second = null; var dayOfMonth = null; var month = null; var year = null; for (var i=0; i= 70 && year <= 99) { year += 1900; } else if (year >= 0 && year <= 69) { year += 2000; } } } } /* RFC 6265 S5.1.1 * "5. Abort these steps and fail to parse the cookie-date if: * * at least one of the found-day-of-month, found-month, found- * year, or found-time flags is not set, * * the day-of-month-value is less than 1 or greater than 31, * * the year-value is less than 1601, * * the hour-value is greater than 23, * * the minute-value is greater than 59, or * * the second-value is greater than 59. * (Note that leap seconds cannot be represented in this syntax.)" * * So, in order as above: */ if ( dayOfMonth === null || month === null || year === null || second === null || dayOfMonth < 1 || dayOfMonth > 31 || year < 1601 || hour > 23 || minute > 59 || second > 59 ) { return; } return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); } function formatDate(date) { var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; return NUM_TO_DAY[date.getUTCDay()] + ', ' + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ h+':'+m+':'+s+' GMT'; } // S5.1.2 Canonicalized Host Names function canonicalDomain(str) { if (str == null) { return null; } str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . // convert to IDN if any non-ASCII characters if (punycode && /[^\u0001-\u007f]/.test(str)) { str = punycode.toASCII(str); } return str.toLowerCase(); } // S5.1.3 Domain Matching function domainMatch(str, domStr, canonicalize) { if (str == null || domStr == null) { return null; } if (canonicalize !== false) { str = canonicalDomain(str); domStr = canonicalDomain(domStr); } /* * "The domain string and the string are identical. (Note that both the * domain string and the string will have been canonicalized to lower case at * this point)" */ if (str == domStr) { return true; } /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ /* "* The string is a host name (i.e., not an IP address)." */ if (net.isIP(str)) { return false; } /* "* The domain string is a suffix of the string" */ var idx = str.indexOf(domStr); if (idx <= 0) { return false; // it's a non-match (-1) or prefix (0) } // e.g "a.b.c".indexOf("b.c") === 2 // 5 === 3+2 if (str.length !== domStr.length + idx) { // it's not a suffix return false; } /* "* The last character of the string that is not included in the domain * string is a %x2E (".") character." */ if (str.substr(idx-1,1) !== '.') { return false; } return true; } // RFC6265 S5.1.4 Paths and Path-Match /* * "The user agent MUST use an algorithm equivalent to the following algorithm * to compute the default-path of a cookie:" * * Assumption: the path (and not query part or absolute uri) is passed in. */ function defaultPath(path) { // "2. If the uri-path is empty or if the first character of the uri-path is not // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. if (!path || path.substr(0,1) !== "/") { return "/"; } // "3. If the uri-path contains no more than one %x2F ("/") character, output // %x2F ("/") and skip the remaining step." if (path === "/") { return path; } var rightSlash = path.lastIndexOf("/"); if (rightSlash === 0) { return "/"; } // "4. Output the characters of the uri-path from the first character up to, // but not including, the right-most %x2F ("/")." return path.slice(0, rightSlash); } function trimTerminator(str) { for (var t = 0; t < TERMINATORS.length; t++) { var terminatorIdx = str.indexOf(TERMINATORS[t]); if (terminatorIdx !== -1) { str = str.substr(0,terminatorIdx); } } return str; } function parseCookiePair(cookiePair, looseMode) { cookiePair = trimTerminator(cookiePair); var firstEq = cookiePair.indexOf('='); if (looseMode) { if (firstEq === 0) { // '=' is immediately at start cookiePair = cookiePair.substr(1); firstEq = cookiePair.indexOf('='); // might still need to split on '=' } } else { // non-loose mode if (firstEq <= 0) { // no '=' or is at start return; // needs to have non-empty "cookie-name" } } var cookieName, cookieValue; if (firstEq <= 0) { cookieName = ""; cookieValue = cookiePair.trim(); } else { cookieName = cookiePair.substr(0, firstEq).trim(); cookieValue = cookiePair.substr(firstEq+1).trim(); } if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { return; } var c = new Cookie(); c.key = cookieName; c.value = cookieValue; return c; } function parse(str, options) { if (!options || typeof options !== 'object') { options = {}; } str = str.trim(); // We use a regex to parse the "name-value-pair" part of S5.2 var firstSemi = str.indexOf(';'); // S5.2 step 1 var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); var c = parseCookiePair(cookiePair, !!options.loose); if (!c) { return; } if (firstSemi === -1) { return c; } // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string // (including the %x3B (";") in question)." plus later on in the same section // "discard the first ";" and trim". var unparsed = str.slice(firstSemi + 1).trim(); // "If the unparsed-attributes string is empty, skip the rest of these // steps." if (unparsed.length === 0) { return c; } /* * S5.2 says that when looping over the items "[p]rocess the attribute-name * and attribute-value according to the requirements in the following * subsections" for every item. Plus, for many of the individual attributes * in S5.3 it says to use the "attribute-value of the last attribute in the * cookie-attribute-list". Therefore, in this implementation, we overwrite * the previous value. */ var cookie_avs = unparsed.split(';'); while (cookie_avs.length) { var av = cookie_avs.shift().trim(); if (av.length === 0) { // happens if ";;" appears continue; } var av_sep = av.indexOf('='); var av_key, av_value; if (av_sep === -1) { av_key = av; av_value = null; } else { av_key = av.substr(0,av_sep); av_value = av.substr(av_sep+1); } av_key = av_key.trim().toLowerCase(); if (av_value) { av_value = av_value.trim(); } switch(av_key) { case 'expires': // S5.2.1 if (av_value) { var exp = parseDate(av_value); // "If the attribute-value failed to parse as a cookie date, ignore the // cookie-av." if (exp) { // over and underflow not realistically a concern: V8's getTime() seems to // store something larger than a 32-bit time_t (even with 32-bit node) c.expires = exp; } } break; case 'max-age': // S5.2.2 if (av_value) { // "If the first character of the attribute-value is not a DIGIT or a "-" // character ...[or]... If the remainder of attribute-value contains a // non-DIGIT character, ignore the cookie-av." if (/^-?[0-9]+$/.test(av_value)) { var delta = parseInt(av_value, 10); // "If delta-seconds is less than or equal to zero (0), let expiry-time // be the earliest representable date and time." c.setMaxAge(delta); } } break; case 'domain': // S5.2.3 // "If the attribute-value is empty, the behavior is undefined. However, // the user agent SHOULD ignore the cookie-av entirely." if (av_value) { // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E // (".") character." var domain = av_value.trim().replace(/^\./, ''); if (domain) { // "Convert the cookie-domain to lower case." c.domain = domain.toLowerCase(); } } break; case 'path': // S5.2.4 /* * "If the attribute-value is empty or if the first character of the * attribute-value is not %x2F ("/"): * Let cookie-path be the default-path. * Otherwise: * Let cookie-path be the attribute-value." * * We'll represent the default-path as null since it depends on the * context of the parsing. */ c.path = av_value && av_value[0] === "/" ? av_value : null; break; case 'secure': // S5.2.5 /* * "If the attribute-name case-insensitively matches the string "Secure", * the user agent MUST append an attribute to the cookie-attribute-list * with an attribute-name of Secure and an empty attribute-value." */ c.secure = true; break; case 'httponly': // S5.2.6 -- effectively the same as 'secure' c.httpOnly = true; break; default: c.extensions = c.extensions || []; c.extensions.push(av); break; } } return c; } // avoid the V8 deoptimization monster! function jsonParse(str) { var obj; try { obj = JSON.parse(str); } catch (e) { return e; } return obj; } function fromJSON(str) { if (!str) { return null; } var obj; if (typeof str === 'string') { obj = jsonParse(str); if (obj instanceof Error) { return null; } } else { // assume it's an Object obj = str; } var c = new Cookie(); for (var i=0; i 1) { var lindex = path.lastIndexOf('/'); if (lindex === 0) { break; } path = path.substr(0,lindex); permutations.push(path); } permutations.push('/'); return permutations; } function getCookieContext(url) { if (url instanceof Object) { return url; } // NOTE: decodeURI will throw on malformed URIs (see GH-32). // Therefore, we will just skip decoding for such URIs. try { url = decodeURI(url); } catch(err) { // Silently swallow error } return urlParse(url); } function Cookie(options) { options = options || {}; Object.keys(options).forEach(function(prop) { if (Cookie.prototype.hasOwnProperty(prop) && Cookie.prototype[prop] !== options[prop] && prop.substr(0,1) !== '_') { this[prop] = options[prop]; } }, this); this.creation = this.creation || new Date(); // used to break creation ties in cookieCompare(): Object.defineProperty(this, 'creationIndex', { configurable: false, enumerable: false, // important for assert.deepEqual checks writable: true, value: ++Cookie.cookiesCreated }); } Cookie.cookiesCreated = 0; // incremented each time a cookie is created Cookie.parse = parse; Cookie.fromJSON = fromJSON; Cookie.prototype.key = ""; Cookie.prototype.value = ""; // the order in which the RFC has them: Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity Cookie.prototype.maxAge = null; // takes precedence over expires for TTL Cookie.prototype.domain = null; Cookie.prototype.path = null; Cookie.prototype.secure = false; Cookie.prototype.httpOnly = false; Cookie.prototype.extensions = null; // set by the CookieJar: Cookie.prototype.hostOnly = null; // boolean when set Cookie.prototype.pathIsDefault = null; // boolean when set Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse Cookie.prototype.lastAccessed = null; // Date when set Object.defineProperty(Cookie.prototype, 'creationIndex', { configurable: true, enumerable: false, writable: true, value: 0 }); Cookie.serializableProperties = Object.keys(Cookie.prototype) .filter(function(prop) { return !( Cookie.prototype[prop] instanceof Function || prop === 'creationIndex' || prop.substr(0,1) === '_' ); }); Cookie.prototype.inspect = function inspect() { var now = Date.now(); return 'Cookie="'+this.toString() + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + '"'; }; // Use the new custom inspection symbol to add the custom inspect function if // available. if (util.inspect.custom) { Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; } Cookie.prototype.toJSON = function() { var obj = {}; var props = Cookie.serializableProperties; for (var i=0; i { "use strict"; /*! * Copyright (c) 2015, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Salesforce.com nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ var Store = __webpack_require__(460)/* .Store */ .y; var permuteDomain = __webpack_require__(55986).permuteDomain; var pathMatch = __webpack_require__(54336)/* .pathMatch */ .U; var util = __webpack_require__(31669); function MemoryCookieStore() { Store.call(this); this.idx = {}; } util.inherits(MemoryCookieStore, Store); exports.m = MemoryCookieStore; MemoryCookieStore.prototype.idx = null; // Since it's just a struct in RAM, this Store is synchronous MemoryCookieStore.prototype.synchronous = true; // force a default depth: MemoryCookieStore.prototype.inspect = function() { return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; }; // Use the new custom inspection symbol to add the custom inspect function if // available. if (util.inspect.custom) { MemoryCookieStore.prototype[util.inspect.custom] = MemoryCookieStore.prototype.inspect; } MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) { if (!this.idx[domain]) { return cb(null,undefined); } if (!this.idx[domain][path]) { return cb(null,undefined); } return cb(null,this.idx[domain][path][key]||null); }; MemoryCookieStore.prototype.findCookies = function(domain, path, cb) { var results = []; if (!domain) { return cb(null,[]); } var pathMatcher; if (!path) { // null means "all paths" pathMatcher = function matchAll(domainIndex) { for (var curPath in domainIndex) { var pathIndex = domainIndex[curPath]; for (var key in pathIndex) { results.push(pathIndex[key]); } } }; } else { pathMatcher = function matchRFC(domainIndex) { //NOTE: we should use path-match algorithm from S5.1.4 here //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299) Object.keys(domainIndex).forEach(function (cookiePath) { if (pathMatch(path, cookiePath)) { var pathIndex = domainIndex[cookiePath]; for (var key in pathIndex) { results.push(pathIndex[key]); } } }); }; } var domains = permuteDomain(domain) || [domain]; var idx = this.idx; domains.forEach(function(curDomain) { var domainIndex = idx[curDomain]; if (!domainIndex) { return; } pathMatcher(domainIndex); }); cb(null,results); }; MemoryCookieStore.prototype.putCookie = function(cookie, cb) { if (!this.idx[cookie.domain]) { this.idx[cookie.domain] = {}; } if (!this.idx[cookie.domain][cookie.path]) { this.idx[cookie.domain][cookie.path] = {}; } this.idx[cookie.domain][cookie.path][cookie.key] = cookie; cb(null); }; MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) { // updateCookie() may avoid updating cookies that are identical. For example, // lastAccessed may not be important to some stores and an equality // comparison could exclude that field. this.putCookie(newCookie,cb); }; MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) { if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { delete this.idx[domain][path][key]; } cb(null); }; MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) { if (this.idx[domain]) { if (path) { delete this.idx[domain][path]; } else { delete this.idx[domain]; } } return cb(null); }; MemoryCookieStore.prototype.removeAllCookies = function(cb) { this.idx = {}; return cb(null); } MemoryCookieStore.prototype.getAllCookies = function(cb) { var cookies = []; var idx = this.idx; var domains = Object.keys(idx); domains.forEach(function(domain) { var paths = Object.keys(idx[domain]); paths.forEach(function(path) { var keys = Object.keys(idx[domain][path]); keys.forEach(function(key) { if (key !== null) { cookies.push(idx[domain][path][key]); } }); }); }); // Sort by creationIndex so deserializing retains the creation order. // When implementing your own store, this SHOULD retain the order too cookies.sort(function(a,b) { return (a.creationIndex||0) - (b.creationIndex||0); }); cb(null, cookies); }; /***/ }), /***/ 54336: /***/ ((__unused_webpack_module, exports) => { "use strict"; /*! * Copyright (c) 2015, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Salesforce.com nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * "A request-path path-matches a given cookie-path if at least one of the * following conditions holds:" */ function pathMatch (reqPath, cookiePath) { // "o The cookie-path and the request-path are identical." if (cookiePath === reqPath) { return true; } var idx = reqPath.indexOf(cookiePath); if (idx === 0) { // "o The cookie-path is a prefix of the request-path, and the last // character of the cookie-path is %x2F ("/")." if (cookiePath.substr(-1) === "/") { return true; } // " o The cookie-path is a prefix of the request-path, and the first // character of the request-path that is not included in the cookie- path // is a %x2F ("/") character." if (reqPath.substr(cookiePath.length, 1) === "/") { return true; } } return false; } exports.U = pathMatch; /***/ }), /***/ 55986: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /*! * Copyright (c) 2015, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Salesforce.com nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ var pubsuffix = __webpack_require__(94401); // Gives the permutation of all possible domainMatch()es of a given domain. The // array is in shortest-to-longest order. Handy for indexing. function permuteDomain (domain) { var pubSuf = pubsuffix.getPublicSuffix(domain); if (!pubSuf) { return null; } if (pubSuf == domain) { return [domain]; } var prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com" var parts = prefix.split('.').reverse(); var cur = pubSuf; var permutations = [cur]; while (parts.length) { cur = parts.shift() + '.' + cur; permutations.push(cur); } return permutations; } exports.permuteDomain = permuteDomain; /***/ }), /***/ 94401: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /*! * Copyright (c) 2018, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Salesforce.com nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ var psl = __webpack_require__(29975); function getPublicSuffix(domain) { return psl.get(domain); } exports.getPublicSuffix = getPublicSuffix; /***/ }), /***/ 460: /***/ ((__unused_webpack_module, exports) => { "use strict"; /*! * Copyright (c) 2015, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Salesforce.com nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*jshint unused:false */ function Store() { } exports.y = Store; // Stores may be synchronous, but are still required to use a // Continuation-Passing Style API. The CookieJar itself will expose a "*Sync" // API that converts from synchronous-callbacks to imperative style. Store.prototype.synchronous = false; Store.prototype.findCookie = function(domain, path, key, cb) { throw new Error('findCookie is not implemented'); }; Store.prototype.findCookies = function(domain, path, cb) { throw new Error('findCookies is not implemented'); }; Store.prototype.putCookie = function(cookie, cb) { throw new Error('putCookie is not implemented'); }; Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { // recommended default implementation: // return this.putCookie(newCookie, cb); throw new Error('updateCookie is not implemented'); }; Store.prototype.removeCookie = function(domain, path, key, cb) { throw new Error('removeCookie is not implemented'); }; Store.prototype.removeCookies = function(domain, path, cb) { throw new Error('removeCookies is not implemented'); }; Store.prototype.removeAllCookies = function(cb) { throw new Error('removeAllCookies is not implemented'); } Store.prototype.getAllCookies = function(cb) { throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); }; /***/ }), /***/ 93199: /***/ ((module) => { // generated by genversion module.exports = '2.5.0' /***/ }), /***/ 4351: /***/ ((module) => { /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global global, define, System, Reflect, Promise */ var __extends; var __assign; var __rest; var __decorate; var __param; var __metadata; var __awaiter; var __generator; var __exportStar; var __values; var __read; var __spread; var __spreadArrays; var __await; var __asyncGenerator; var __asyncDelegator; var __asyncValues; var __makeTemplateObject; var __importStar; var __importDefault; var __classPrivateFieldGet; var __classPrivateFieldSet; var __createBinding; (function (factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; if (typeof define === "function" && define.amd) { define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); } else if ( true && typeof module.exports === "object") { factory(createExporter(root, createExporter(module.exports))); } else { factory(createExporter(root)); } function createExporter(exports, previous) { if (exports !== root) { if (typeof Object.create === "function") { Object.defineProperty(exports, "__esModule", { value: true }); } else { exports.__esModule = true; } } return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } }) (function (exporter) { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; __extends = function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; __rest = function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; __decorate = function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; __param = function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; __metadata = function (metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); }; __awaiter = function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; __generator = function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; __createBinding = function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }; __exportStar = function (m, exports) { for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; }; __values = function (o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; __read = function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; __spread = function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; __spreadArrays = function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; __await = function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }; __asyncGenerator = function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } }; __asyncDelegator = function (o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } }; __asyncValues = function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; __makeTemplateObject = function (cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; __importStar = function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; __importDefault = function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; __classPrivateFieldGet = function (receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return privateMap.get(receiver); }; __classPrivateFieldSet = function (receiver, privateMap, value) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } privateMap.set(receiver, value); return value; }; exporter("__extends", __extends); exporter("__assign", __assign); exporter("__rest", __rest); exporter("__decorate", __decorate); exporter("__param", __param); exporter("__metadata", __metadata); exporter("__awaiter", __awaiter); exporter("__generator", __generator); exporter("__exportStar", __exportStar); exporter("__createBinding", __createBinding); exporter("__values", __values); exporter("__read", __read); exporter("__spread", __spread); exporter("__spreadArrays", __spreadArrays); exporter("__await", __await); exporter("__asyncGenerator", __asyncGenerator); exporter("__asyncDelegator", __asyncDelegator); exporter("__asyncValues", __asyncValues); exporter("__makeTemplateObject", __makeTemplateObject); exporter("__importStar", __importStar); exporter("__importDefault", __importDefault); exporter("__classPrivateFieldGet", __classPrivateFieldGet); exporter("__classPrivateFieldSet", __classPrivateFieldSet); }); /***/ }), /***/ 11137: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var net = __webpack_require__(11631) , tls = __webpack_require__(4016) , http = __webpack_require__(98605) , https = __webpack_require__(57211) , events = __webpack_require__(28614) , assert = __webpack_require__(42357) , util = __webpack_require__(31669) , Buffer = __webpack_require__(21867).Buffer ; exports.httpOverHttp = httpOverHttp exports.httpsOverHttp = httpsOverHttp exports.httpOverHttps = httpOverHttps exports.httpsOverHttps = httpsOverHttps function httpOverHttp(options) { var agent = new TunnelingAgent(options) agent.request = http.request return agent } function httpsOverHttp(options) { var agent = new TunnelingAgent(options) agent.request = http.request agent.createSocket = createSecureSocket agent.defaultPort = 443 return agent } function httpOverHttps(options) { var agent = new TunnelingAgent(options) agent.request = https.request return agent } function httpsOverHttps(options) { var agent = new TunnelingAgent(options) agent.request = https.request agent.createSocket = createSecureSocket agent.defaultPort = 443 return agent } function TunnelingAgent(options) { var self = this self.options = options || {} self.proxyOptions = self.options.proxy || {} self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets self.requests = [] self.sockets = [] self.on('free', function onFree(socket, host, port) { for (var i = 0, len = self.requests.length; i < len; ++i) { var pending = self.requests[i] if (pending.host === host && pending.port === port) { // Detect the request to connect same origin server, // reuse the connection. self.requests.splice(i, 1) pending.request.onSocket(socket) return } } socket.destroy() self.removeSocket(socket) }) } util.inherits(TunnelingAgent, events.EventEmitter) TunnelingAgent.prototype.addRequest = function addRequest(req, options) { var self = this // Legacy API: addRequest(req, host, port, path) if (typeof options === 'string') { options = { host: options, port: arguments[2], path: arguments[3] }; } if (self.sockets.length >= this.maxSockets) { // We are over limit so we'll add it to the queue. self.requests.push({host: options.host, port: options.port, request: req}) return } // If we are under maxSockets create a new one. self.createConnection({host: options.host, port: options.port, request: req}) } TunnelingAgent.prototype.createConnection = function createConnection(pending) { var self = this self.createSocket(pending, function(socket) { socket.on('free', onFree) socket.on('close', onCloseOrRemove) socket.on('agentRemove', onCloseOrRemove) pending.request.onSocket(socket) function onFree() { self.emit('free', socket, pending.host, pending.port) } function onCloseOrRemove(err) { self.removeSocket(socket) socket.removeListener('free', onFree) socket.removeListener('close', onCloseOrRemove) socket.removeListener('agentRemove', onCloseOrRemove) } }) } TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { var self = this var placeholder = {} self.sockets.push(placeholder) var connectOptions = mergeOptions({}, self.proxyOptions, { method: 'CONNECT' , path: options.host + ':' + options.port , agent: false } ) if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {} connectOptions.headers['Proxy-Authorization'] = 'Basic ' + Buffer.from(connectOptions.proxyAuth).toString('base64') } debug('making CONNECT request') var connectReq = self.request(connectOptions) connectReq.useChunkedEncodingByDefault = false // for v0.6 connectReq.once('response', onResponse) // for v0.6 connectReq.once('upgrade', onUpgrade) // for v0.6 connectReq.once('connect', onConnect) // for v0.7 or later connectReq.once('error', onError) connectReq.end() function onResponse(res) { // Very hacky. This is necessary to avoid http-parser leaks. res.upgrade = true } function onUpgrade(res, socket, head) { // Hacky. process.nextTick(function() { onConnect(res, socket, head) }) } function onConnect(res, socket, head) { connectReq.removeAllListeners() socket.removeAllListeners() if (res.statusCode === 200) { assert.equal(head.length, 0) debug('tunneling connection has established') self.sockets[self.sockets.indexOf(placeholder)] = socket cb(socket) } else { debug('tunneling socket could not be established, statusCode=%d', res.statusCode) var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) error.code = 'ECONNRESET' options.request.emit('error', error) self.removeSocket(placeholder) } } function onError(cause) { connectReq.removeAllListeners() debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) error.code = 'ECONNRESET' options.request.emit('error', error) self.removeSocket(placeholder) } } TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { var pos = this.sockets.indexOf(socket) if (pos === -1) return this.sockets.splice(pos, 1) var pending = this.requests.shift() if (pending) { // If we have pending requests and a socket gets closed a new one // needs to be created to take over in the pool for the one that closed. this.createConnection(pending) } } function createSecureSocket(options, cb) { var self = this TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { // 0 is dummy port for v0.6 var secureSocket = tls.connect(0, mergeOptions({}, self.options, { servername: options.host , socket: socket } )) self.sockets[self.sockets.indexOf(socket)] = secureSocket cb(secureSocket) }) } function mergeOptions(target) { for (var i = 1, len = arguments.length; i < len; ++i) { var overrides = arguments[i] if (typeof overrides === 'object') { var keys = Object.keys(overrides) for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { var k = keys[j] if (overrides[k] !== undefined) { target[k] = overrides[k] } } } } return target } var debug if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { debug = function() { var args = Array.prototype.slice.call(arguments) if (typeof args[0] === 'string') { args[0] = 'TUNNEL: ' + args[0] } else { args.unshift('TUNNEL:') } console.error.apply(console, args) } } else { debug = function() {} } exports.debug = debug // for test /***/ }), /***/ 68729: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { (function(nacl) { 'use strict'; // Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. // Public domain. // // Implementation derived from TweetNaCl version 20140427. // See for details: http://tweetnacl.cr.yp.to/ var gf = function(init) { var i, r = new Float64Array(16); if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; return r; }; // Pluggable, initialized in high-level API below. var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; var _0 = new Uint8Array(16); var _9 = new Uint8Array(32); _9[0] = 9; var gf0 = gf(), gf1 = gf([1]), _121665 = gf([0xdb41, 1]), D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); function ts64(x, i, h, l) { x[i] = (h >> 24) & 0xff; x[i+1] = (h >> 16) & 0xff; x[i+2] = (h >> 8) & 0xff; x[i+3] = h & 0xff; x[i+4] = (l >> 24) & 0xff; x[i+5] = (l >> 16) & 0xff; x[i+6] = (l >> 8) & 0xff; x[i+7] = l & 0xff; } function vn(x, xi, y, yi, n) { var i,d = 0; for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; return (1 & ((d - 1) >>> 8)) - 1; } function crypto_verify_16(x, xi, y, yi) { return vn(x,xi,y,yi,16); } function crypto_verify_32(x, xi, y, yi) { return vn(x,xi,y,yi,32); } function core_salsa20(o, p, k, c) { var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, x15 = j15, u; for (var i = 0; i < 20; i += 2) { u = x0 + x12 | 0; x4 ^= u<<7 | u>>>(32-7); u = x4 + x0 | 0; x8 ^= u<<9 | u>>>(32-9); u = x8 + x4 | 0; x12 ^= u<<13 | u>>>(32-13); u = x12 + x8 | 0; x0 ^= u<<18 | u>>>(32-18); u = x5 + x1 | 0; x9 ^= u<<7 | u>>>(32-7); u = x9 + x5 | 0; x13 ^= u<<9 | u>>>(32-9); u = x13 + x9 | 0; x1 ^= u<<13 | u>>>(32-13); u = x1 + x13 | 0; x5 ^= u<<18 | u>>>(32-18); u = x10 + x6 | 0; x14 ^= u<<7 | u>>>(32-7); u = x14 + x10 | 0; x2 ^= u<<9 | u>>>(32-9); u = x2 + x14 | 0; x6 ^= u<<13 | u>>>(32-13); u = x6 + x2 | 0; x10 ^= u<<18 | u>>>(32-18); u = x15 + x11 | 0; x3 ^= u<<7 | u>>>(32-7); u = x3 + x15 | 0; x7 ^= u<<9 | u>>>(32-9); u = x7 + x3 | 0; x11 ^= u<<13 | u>>>(32-13); u = x11 + x7 | 0; x15 ^= u<<18 | u>>>(32-18); u = x0 + x3 | 0; x1 ^= u<<7 | u>>>(32-7); u = x1 + x0 | 0; x2 ^= u<<9 | u>>>(32-9); u = x2 + x1 | 0; x3 ^= u<<13 | u>>>(32-13); u = x3 + x2 | 0; x0 ^= u<<18 | u>>>(32-18); u = x5 + x4 | 0; x6 ^= u<<7 | u>>>(32-7); u = x6 + x5 | 0; x7 ^= u<<9 | u>>>(32-9); u = x7 + x6 | 0; x4 ^= u<<13 | u>>>(32-13); u = x4 + x7 | 0; x5 ^= u<<18 | u>>>(32-18); u = x10 + x9 | 0; x11 ^= u<<7 | u>>>(32-7); u = x11 + x10 | 0; x8 ^= u<<9 | u>>>(32-9); u = x8 + x11 | 0; x9 ^= u<<13 | u>>>(32-13); u = x9 + x8 | 0; x10 ^= u<<18 | u>>>(32-18); u = x15 + x14 | 0; x12 ^= u<<7 | u>>>(32-7); u = x12 + x15 | 0; x13 ^= u<<9 | u>>>(32-9); u = x13 + x12 | 0; x14 ^= u<<13 | u>>>(32-13); u = x14 + x13 | 0; x15 ^= u<<18 | u>>>(32-18); } x0 = x0 + j0 | 0; x1 = x1 + j1 | 0; x2 = x2 + j2 | 0; x3 = x3 + j3 | 0; x4 = x4 + j4 | 0; x5 = x5 + j5 | 0; x6 = x6 + j6 | 0; x7 = x7 + j7 | 0; x8 = x8 + j8 | 0; x9 = x9 + j9 | 0; x10 = x10 + j10 | 0; x11 = x11 + j11 | 0; x12 = x12 + j12 | 0; x13 = x13 + j13 | 0; x14 = x14 + j14 | 0; x15 = x15 + j15 | 0; o[ 0] = x0 >>> 0 & 0xff; o[ 1] = x0 >>> 8 & 0xff; o[ 2] = x0 >>> 16 & 0xff; o[ 3] = x0 >>> 24 & 0xff; o[ 4] = x1 >>> 0 & 0xff; o[ 5] = x1 >>> 8 & 0xff; o[ 6] = x1 >>> 16 & 0xff; o[ 7] = x1 >>> 24 & 0xff; o[ 8] = x2 >>> 0 & 0xff; o[ 9] = x2 >>> 8 & 0xff; o[10] = x2 >>> 16 & 0xff; o[11] = x2 >>> 24 & 0xff; o[12] = x3 >>> 0 & 0xff; o[13] = x3 >>> 8 & 0xff; o[14] = x3 >>> 16 & 0xff; o[15] = x3 >>> 24 & 0xff; o[16] = x4 >>> 0 & 0xff; o[17] = x4 >>> 8 & 0xff; o[18] = x4 >>> 16 & 0xff; o[19] = x4 >>> 24 & 0xff; o[20] = x5 >>> 0 & 0xff; o[21] = x5 >>> 8 & 0xff; o[22] = x5 >>> 16 & 0xff; o[23] = x5 >>> 24 & 0xff; o[24] = x6 >>> 0 & 0xff; o[25] = x6 >>> 8 & 0xff; o[26] = x6 >>> 16 & 0xff; o[27] = x6 >>> 24 & 0xff; o[28] = x7 >>> 0 & 0xff; o[29] = x7 >>> 8 & 0xff; o[30] = x7 >>> 16 & 0xff; o[31] = x7 >>> 24 & 0xff; o[32] = x8 >>> 0 & 0xff; o[33] = x8 >>> 8 & 0xff; o[34] = x8 >>> 16 & 0xff; o[35] = x8 >>> 24 & 0xff; o[36] = x9 >>> 0 & 0xff; o[37] = x9 >>> 8 & 0xff; o[38] = x9 >>> 16 & 0xff; o[39] = x9 >>> 24 & 0xff; o[40] = x10 >>> 0 & 0xff; o[41] = x10 >>> 8 & 0xff; o[42] = x10 >>> 16 & 0xff; o[43] = x10 >>> 24 & 0xff; o[44] = x11 >>> 0 & 0xff; o[45] = x11 >>> 8 & 0xff; o[46] = x11 >>> 16 & 0xff; o[47] = x11 >>> 24 & 0xff; o[48] = x12 >>> 0 & 0xff; o[49] = x12 >>> 8 & 0xff; o[50] = x12 >>> 16 & 0xff; o[51] = x12 >>> 24 & 0xff; o[52] = x13 >>> 0 & 0xff; o[53] = x13 >>> 8 & 0xff; o[54] = x13 >>> 16 & 0xff; o[55] = x13 >>> 24 & 0xff; o[56] = x14 >>> 0 & 0xff; o[57] = x14 >>> 8 & 0xff; o[58] = x14 >>> 16 & 0xff; o[59] = x14 >>> 24 & 0xff; o[60] = x15 >>> 0 & 0xff; o[61] = x15 >>> 8 & 0xff; o[62] = x15 >>> 16 & 0xff; o[63] = x15 >>> 24 & 0xff; } function core_hsalsa20(o,p,k,c) { var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, x15 = j15, u; for (var i = 0; i < 20; i += 2) { u = x0 + x12 | 0; x4 ^= u<<7 | u>>>(32-7); u = x4 + x0 | 0; x8 ^= u<<9 | u>>>(32-9); u = x8 + x4 | 0; x12 ^= u<<13 | u>>>(32-13); u = x12 + x8 | 0; x0 ^= u<<18 | u>>>(32-18); u = x5 + x1 | 0; x9 ^= u<<7 | u>>>(32-7); u = x9 + x5 | 0; x13 ^= u<<9 | u>>>(32-9); u = x13 + x9 | 0; x1 ^= u<<13 | u>>>(32-13); u = x1 + x13 | 0; x5 ^= u<<18 | u>>>(32-18); u = x10 + x6 | 0; x14 ^= u<<7 | u>>>(32-7); u = x14 + x10 | 0; x2 ^= u<<9 | u>>>(32-9); u = x2 + x14 | 0; x6 ^= u<<13 | u>>>(32-13); u = x6 + x2 | 0; x10 ^= u<<18 | u>>>(32-18); u = x15 + x11 | 0; x3 ^= u<<7 | u>>>(32-7); u = x3 + x15 | 0; x7 ^= u<<9 | u>>>(32-9); u = x7 + x3 | 0; x11 ^= u<<13 | u>>>(32-13); u = x11 + x7 | 0; x15 ^= u<<18 | u>>>(32-18); u = x0 + x3 | 0; x1 ^= u<<7 | u>>>(32-7); u = x1 + x0 | 0; x2 ^= u<<9 | u>>>(32-9); u = x2 + x1 | 0; x3 ^= u<<13 | u>>>(32-13); u = x3 + x2 | 0; x0 ^= u<<18 | u>>>(32-18); u = x5 + x4 | 0; x6 ^= u<<7 | u>>>(32-7); u = x6 + x5 | 0; x7 ^= u<<9 | u>>>(32-9); u = x7 + x6 | 0; x4 ^= u<<13 | u>>>(32-13); u = x4 + x7 | 0; x5 ^= u<<18 | u>>>(32-18); u = x10 + x9 | 0; x11 ^= u<<7 | u>>>(32-7); u = x11 + x10 | 0; x8 ^= u<<9 | u>>>(32-9); u = x8 + x11 | 0; x9 ^= u<<13 | u>>>(32-13); u = x9 + x8 | 0; x10 ^= u<<18 | u>>>(32-18); u = x15 + x14 | 0; x12 ^= u<<7 | u>>>(32-7); u = x12 + x15 | 0; x13 ^= u<<9 | u>>>(32-9); u = x13 + x12 | 0; x14 ^= u<<13 | u>>>(32-13); u = x14 + x13 | 0; x15 ^= u<<18 | u>>>(32-18); } o[ 0] = x0 >>> 0 & 0xff; o[ 1] = x0 >>> 8 & 0xff; o[ 2] = x0 >>> 16 & 0xff; o[ 3] = x0 >>> 24 & 0xff; o[ 4] = x5 >>> 0 & 0xff; o[ 5] = x5 >>> 8 & 0xff; o[ 6] = x5 >>> 16 & 0xff; o[ 7] = x5 >>> 24 & 0xff; o[ 8] = x10 >>> 0 & 0xff; o[ 9] = x10 >>> 8 & 0xff; o[10] = x10 >>> 16 & 0xff; o[11] = x10 >>> 24 & 0xff; o[12] = x15 >>> 0 & 0xff; o[13] = x15 >>> 8 & 0xff; o[14] = x15 >>> 16 & 0xff; o[15] = x15 >>> 24 & 0xff; o[16] = x6 >>> 0 & 0xff; o[17] = x6 >>> 8 & 0xff; o[18] = x6 >>> 16 & 0xff; o[19] = x6 >>> 24 & 0xff; o[20] = x7 >>> 0 & 0xff; o[21] = x7 >>> 8 & 0xff; o[22] = x7 >>> 16 & 0xff; o[23] = x7 >>> 24 & 0xff; o[24] = x8 >>> 0 & 0xff; o[25] = x8 >>> 8 & 0xff; o[26] = x8 >>> 16 & 0xff; o[27] = x8 >>> 24 & 0xff; o[28] = x9 >>> 0 & 0xff; o[29] = x9 >>> 8 & 0xff; o[30] = x9 >>> 16 & 0xff; o[31] = x9 >>> 24 & 0xff; } function crypto_core_salsa20(out,inp,k,c) { core_salsa20(out,inp,k,c); } function crypto_core_hsalsa20(out,inp,k,c) { core_hsalsa20(out,inp,k,c); } var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); // "expand 32-byte k" function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { var z = new Uint8Array(16), x = new Uint8Array(64); var u, i; for (i = 0; i < 16; i++) z[i] = 0; for (i = 0; i < 8; i++) z[i] = n[i]; while (b >= 64) { crypto_core_salsa20(x,z,k,sigma); for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; u = 1; for (i = 8; i < 16; i++) { u = u + (z[i] & 0xff) | 0; z[i] = u & 0xff; u >>>= 8; } b -= 64; cpos += 64; mpos += 64; } if (b > 0) { crypto_core_salsa20(x,z,k,sigma); for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; } return 0; } function crypto_stream_salsa20(c,cpos,b,n,k) { var z = new Uint8Array(16), x = new Uint8Array(64); var u, i; for (i = 0; i < 16; i++) z[i] = 0; for (i = 0; i < 8; i++) z[i] = n[i]; while (b >= 64) { crypto_core_salsa20(x,z,k,sigma); for (i = 0; i < 64; i++) c[cpos+i] = x[i]; u = 1; for (i = 8; i < 16; i++) { u = u + (z[i] & 0xff) | 0; z[i] = u & 0xff; u >>>= 8; } b -= 64; cpos += 64; } if (b > 0) { crypto_core_salsa20(x,z,k,sigma); for (i = 0; i < b; i++) c[cpos+i] = x[i]; } return 0; } function crypto_stream(c,cpos,d,n,k) { var s = new Uint8Array(32); crypto_core_hsalsa20(s,n,k,sigma); var sn = new Uint8Array(8); for (var i = 0; i < 8; i++) sn[i] = n[i+16]; return crypto_stream_salsa20(c,cpos,d,sn,s); } function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { var s = new Uint8Array(32); crypto_core_hsalsa20(s,n,k,sigma); var sn = new Uint8Array(8); for (var i = 0; i < 8; i++) sn[i] = n[i+16]; return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); } /* * Port of Andrew Moon's Poly1305-donna-16. Public domain. * https://github.com/floodyberry/poly1305-donna */ var poly1305 = function(key) { this.buffer = new Uint8Array(16); this.r = new Uint16Array(10); this.h = new Uint16Array(10); this.pad = new Uint16Array(8); this.leftover = 0; this.fin = 0; var t0, t1, t2, t3, t4, t5, t6, t7; t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; this.r[5] = ((t4 >>> 1)) & 0x1ffe; t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; this.r[9] = ((t7 >>> 5)) & 0x007f; this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; }; poly1305.prototype.blocks = function(m, mpos, bytes) { var hibit = this.fin ? 0 : (1 << 11); var t0, t1, t2, t3, t4, t5, t6, t7, c; var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; var h0 = this.h[0], h1 = this.h[1], h2 = this.h[2], h3 = this.h[3], h4 = this.h[4], h5 = this.h[5], h6 = this.h[6], h7 = this.h[7], h8 = this.h[8], h9 = this.h[9]; var r0 = this.r[0], r1 = this.r[1], r2 = this.r[2], r3 = this.r[3], r4 = this.r[4], r5 = this.r[5], r6 = this.r[6], r7 = this.r[7], r8 = this.r[8], r9 = this.r[9]; while (bytes >= 16) { t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; h5 += ((t4 >>> 1)) & 0x1fff; t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; h9 += ((t7 >>> 5)) | hibit; c = 0; d0 = c; d0 += h0 * r0; d0 += h1 * (5 * r9); d0 += h2 * (5 * r8); d0 += h3 * (5 * r7); d0 += h4 * (5 * r6); c = (d0 >>> 13); d0 &= 0x1fff; d0 += h5 * (5 * r5); d0 += h6 * (5 * r4); d0 += h7 * (5 * r3); d0 += h8 * (5 * r2); d0 += h9 * (5 * r1); c += (d0 >>> 13); d0 &= 0x1fff; d1 = c; d1 += h0 * r1; d1 += h1 * r0; d1 += h2 * (5 * r9); d1 += h3 * (5 * r8); d1 += h4 * (5 * r7); c = (d1 >>> 13); d1 &= 0x1fff; d1 += h5 * (5 * r6); d1 += h6 * (5 * r5); d1 += h7 * (5 * r4); d1 += h8 * (5 * r3); d1 += h9 * (5 * r2); c += (d1 >>> 13); d1 &= 0x1fff; d2 = c; d2 += h0 * r2; d2 += h1 * r1; d2 += h2 * r0; d2 += h3 * (5 * r9); d2 += h4 * (5 * r8); c = (d2 >>> 13); d2 &= 0x1fff; d2 += h5 * (5 * r7); d2 += h6 * (5 * r6); d2 += h7 * (5 * r5); d2 += h8 * (5 * r4); d2 += h9 * (5 * r3); c += (d2 >>> 13); d2 &= 0x1fff; d3 = c; d3 += h0 * r3; d3 += h1 * r2; d3 += h2 * r1; d3 += h3 * r0; d3 += h4 * (5 * r9); c = (d3 >>> 13); d3 &= 0x1fff; d3 += h5 * (5 * r8); d3 += h6 * (5 * r7); d3 += h7 * (5 * r6); d3 += h8 * (5 * r5); d3 += h9 * (5 * r4); c += (d3 >>> 13); d3 &= 0x1fff; d4 = c; d4 += h0 * r4; d4 += h1 * r3; d4 += h2 * r2; d4 += h3 * r1; d4 += h4 * r0; c = (d4 >>> 13); d4 &= 0x1fff; d4 += h5 * (5 * r9); d4 += h6 * (5 * r8); d4 += h7 * (5 * r7); d4 += h8 * (5 * r6); d4 += h9 * (5 * r5); c += (d4 >>> 13); d4 &= 0x1fff; d5 = c; d5 += h0 * r5; d5 += h1 * r4; d5 += h2 * r3; d5 += h3 * r2; d5 += h4 * r1; c = (d5 >>> 13); d5 &= 0x1fff; d5 += h5 * r0; d5 += h6 * (5 * r9); d5 += h7 * (5 * r8); d5 += h8 * (5 * r7); d5 += h9 * (5 * r6); c += (d5 >>> 13); d5 &= 0x1fff; d6 = c; d6 += h0 * r6; d6 += h1 * r5; d6 += h2 * r4; d6 += h3 * r3; d6 += h4 * r2; c = (d6 >>> 13); d6 &= 0x1fff; d6 += h5 * r1; d6 += h6 * r0; d6 += h7 * (5 * r9); d6 += h8 * (5 * r8); d6 += h9 * (5 * r7); c += (d6 >>> 13); d6 &= 0x1fff; d7 = c; d7 += h0 * r7; d7 += h1 * r6; d7 += h2 * r5; d7 += h3 * r4; d7 += h4 * r3; c = (d7 >>> 13); d7 &= 0x1fff; d7 += h5 * r2; d7 += h6 * r1; d7 += h7 * r0; d7 += h8 * (5 * r9); d7 += h9 * (5 * r8); c += (d7 >>> 13); d7 &= 0x1fff; d8 = c; d8 += h0 * r8; d8 += h1 * r7; d8 += h2 * r6; d8 += h3 * r5; d8 += h4 * r4; c = (d8 >>> 13); d8 &= 0x1fff; d8 += h5 * r3; d8 += h6 * r2; d8 += h7 * r1; d8 += h8 * r0; d8 += h9 * (5 * r9); c += (d8 >>> 13); d8 &= 0x1fff; d9 = c; d9 += h0 * r9; d9 += h1 * r8; d9 += h2 * r7; d9 += h3 * r6; d9 += h4 * r5; c = (d9 >>> 13); d9 &= 0x1fff; d9 += h5 * r4; d9 += h6 * r3; d9 += h7 * r2; d9 += h8 * r1; d9 += h9 * r0; c += (d9 >>> 13); d9 &= 0x1fff; c = (((c << 2) + c)) | 0; c = (c + d0) | 0; d0 = c & 0x1fff; c = (c >>> 13); d1 += c; h0 = d0; h1 = d1; h2 = d2; h3 = d3; h4 = d4; h5 = d5; h6 = d6; h7 = d7; h8 = d8; h9 = d9; mpos += 16; bytes -= 16; } this.h[0] = h0; this.h[1] = h1; this.h[2] = h2; this.h[3] = h3; this.h[4] = h4; this.h[5] = h5; this.h[6] = h6; this.h[7] = h7; this.h[8] = h8; this.h[9] = h9; }; poly1305.prototype.finish = function(mac, macpos) { var g = new Uint16Array(10); var c, mask, f, i; if (this.leftover) { i = this.leftover; this.buffer[i++] = 1; for (; i < 16; i++) this.buffer[i] = 0; this.fin = 1; this.blocks(this.buffer, 0, 16); } c = this.h[1] >>> 13; this.h[1] &= 0x1fff; for (i = 2; i < 10; i++) { this.h[i] += c; c = this.h[i] >>> 13; this.h[i] &= 0x1fff; } this.h[0] += (c * 5); c = this.h[0] >>> 13; this.h[0] &= 0x1fff; this.h[1] += c; c = this.h[1] >>> 13; this.h[1] &= 0x1fff; this.h[2] += c; g[0] = this.h[0] + 5; c = g[0] >>> 13; g[0] &= 0x1fff; for (i = 1; i < 10; i++) { g[i] = this.h[i] + c; c = g[i] >>> 13; g[i] &= 0x1fff; } g[9] -= (1 << 13); mask = (c ^ 1) - 1; for (i = 0; i < 10; i++) g[i] &= mask; mask = ~mask; for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; f = this.h[0] + this.pad[0]; this.h[0] = f & 0xffff; for (i = 1; i < 8; i++) { f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; this.h[i] = f & 0xffff; } mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; mac[macpos+10] = (this.h[5] >>> 0) & 0xff; mac[macpos+11] = (this.h[5] >>> 8) & 0xff; mac[macpos+12] = (this.h[6] >>> 0) & 0xff; mac[macpos+13] = (this.h[6] >>> 8) & 0xff; mac[macpos+14] = (this.h[7] >>> 0) & 0xff; mac[macpos+15] = (this.h[7] >>> 8) & 0xff; }; poly1305.prototype.update = function(m, mpos, bytes) { var i, want; if (this.leftover) { want = (16 - this.leftover); if (want > bytes) want = bytes; for (i = 0; i < want; i++) this.buffer[this.leftover + i] = m[mpos+i]; bytes -= want; mpos += want; this.leftover += want; if (this.leftover < 16) return; this.blocks(this.buffer, 0, 16); this.leftover = 0; } if (bytes >= 16) { want = bytes - (bytes % 16); this.blocks(m, mpos, want); mpos += want; bytes -= want; } if (bytes) { for (i = 0; i < bytes; i++) this.buffer[this.leftover + i] = m[mpos+i]; this.leftover += bytes; } }; function crypto_onetimeauth(out, outpos, m, mpos, n, k) { var s = new poly1305(k); s.update(m, mpos, n); s.finish(out, outpos); return 0; } function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { var x = new Uint8Array(16); crypto_onetimeauth(x,0,m,mpos,n,k); return crypto_verify_16(h,hpos,x,0); } function crypto_secretbox(c,m,d,n,k) { var i; if (d < 32) return -1; crypto_stream_xor(c,0,m,0,d,n,k); crypto_onetimeauth(c, 16, c, 32, d - 32, c); for (i = 0; i < 16; i++) c[i] = 0; return 0; } function crypto_secretbox_open(m,c,d,n,k) { var i; var x = new Uint8Array(32); if (d < 32) return -1; crypto_stream(x,0,32,n,k); if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; crypto_stream_xor(m,0,c,0,d,n,k); for (i = 0; i < 32; i++) m[i] = 0; return 0; } function set25519(r, a) { var i; for (i = 0; i < 16; i++) r[i] = a[i]|0; } function car25519(o) { var i, v, c = 1; for (i = 0; i < 16; i++) { v = o[i] + c + 65535; c = Math.floor(v / 65536); o[i] = v - c * 65536; } o[0] += c-1 + 37 * (c-1); } function sel25519(p, q, b) { var t, c = ~(b-1); for (var i = 0; i < 16; i++) { t = c & (p[i] ^ q[i]); p[i] ^= t; q[i] ^= t; } } function pack25519(o, n) { var i, j, b; var m = gf(), t = gf(); for (i = 0; i < 16; i++) t[i] = n[i]; car25519(t); car25519(t); car25519(t); for (j = 0; j < 2; j++) { m[0] = t[0] - 0xffed; for (i = 1; i < 15; i++) { m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); m[i-1] &= 0xffff; } m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); b = (m[15]>>16) & 1; m[14] &= 0xffff; sel25519(t, m, 1-b); } for (i = 0; i < 16; i++) { o[2*i] = t[i] & 0xff; o[2*i+1] = t[i]>>8; } } function neq25519(a, b) { var c = new Uint8Array(32), d = new Uint8Array(32); pack25519(c, a); pack25519(d, b); return crypto_verify_32(c, 0, d, 0); } function par25519(a) { var d = new Uint8Array(32); pack25519(d, a); return d[0] & 1; } function unpack25519(o, n) { var i; for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); o[15] &= 0x7fff; } function A(o, a, b) { for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; } function Z(o, a, b) { for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; } function M(o, a, b) { var v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15]; v = a[0]; t0 += v * b0; t1 += v * b1; t2 += v * b2; t3 += v * b3; t4 += v * b4; t5 += v * b5; t6 += v * b6; t7 += v * b7; t8 += v * b8; t9 += v * b9; t10 += v * b10; t11 += v * b11; t12 += v * b12; t13 += v * b13; t14 += v * b14; t15 += v * b15; v = a[1]; t1 += v * b0; t2 += v * b1; t3 += v * b2; t4 += v * b3; t5 += v * b4; t6 += v * b5; t7 += v * b6; t8 += v * b7; t9 += v * b8; t10 += v * b9; t11 += v * b10; t12 += v * b11; t13 += v * b12; t14 += v * b13; t15 += v * b14; t16 += v * b15; v = a[2]; t2 += v * b0; t3 += v * b1; t4 += v * b2; t5 += v * b3; t6 += v * b4; t7 += v * b5; t8 += v * b6; t9 += v * b7; t10 += v * b8; t11 += v * b9; t12 += v * b10; t13 += v * b11; t14 += v * b12; t15 += v * b13; t16 += v * b14; t17 += v * b15; v = a[3]; t3 += v * b0; t4 += v * b1; t5 += v * b2; t6 += v * b3; t7 += v * b4; t8 += v * b5; t9 += v * b6; t10 += v * b7; t11 += v * b8; t12 += v * b9; t13 += v * b10; t14 += v * b11; t15 += v * b12; t16 += v * b13; t17 += v * b14; t18 += v * b15; v = a[4]; t4 += v * b0; t5 += v * b1; t6 += v * b2; t7 += v * b3; t8 += v * b4; t9 += v * b5; t10 += v * b6; t11 += v * b7; t12 += v * b8; t13 += v * b9; t14 += v * b10; t15 += v * b11; t16 += v * b12; t17 += v * b13; t18 += v * b14; t19 += v * b15; v = a[5]; t5 += v * b0; t6 += v * b1; t7 += v * b2; t8 += v * b3; t9 += v * b4; t10 += v * b5; t11 += v * b6; t12 += v * b7; t13 += v * b8; t14 += v * b9; t15 += v * b10; t16 += v * b11; t17 += v * b12; t18 += v * b13; t19 += v * b14; t20 += v * b15; v = a[6]; t6 += v * b0; t7 += v * b1; t8 += v * b2; t9 += v * b3; t10 += v * b4; t11 += v * b5; t12 += v * b6; t13 += v * b7; t14 += v * b8; t15 += v * b9; t16 += v * b10; t17 += v * b11; t18 += v * b12; t19 += v * b13; t20 += v * b14; t21 += v * b15; v = a[7]; t7 += v * b0; t8 += v * b1; t9 += v * b2; t10 += v * b3; t11 += v * b4; t12 += v * b5; t13 += v * b6; t14 += v * b7; t15 += v * b8; t16 += v * b9; t17 += v * b10; t18 += v * b11; t19 += v * b12; t20 += v * b13; t21 += v * b14; t22 += v * b15; v = a[8]; t8 += v * b0; t9 += v * b1; t10 += v * b2; t11 += v * b3; t12 += v * b4; t13 += v * b5; t14 += v * b6; t15 += v * b7; t16 += v * b8; t17 += v * b9; t18 += v * b10; t19 += v * b11; t20 += v * b12; t21 += v * b13; t22 += v * b14; t23 += v * b15; v = a[9]; t9 += v * b0; t10 += v * b1; t11 += v * b2; t12 += v * b3; t13 += v * b4; t14 += v * b5; t15 += v * b6; t16 += v * b7; t17 += v * b8; t18 += v * b9; t19 += v * b10; t20 += v * b11; t21 += v * b12; t22 += v * b13; t23 += v * b14; t24 += v * b15; v = a[10]; t10 += v * b0; t11 += v * b1; t12 += v * b2; t13 += v * b3; t14 += v * b4; t15 += v * b5; t16 += v * b6; t17 += v * b7; t18 += v * b8; t19 += v * b9; t20 += v * b10; t21 += v * b11; t22 += v * b12; t23 += v * b13; t24 += v * b14; t25 += v * b15; v = a[11]; t11 += v * b0; t12 += v * b1; t13 += v * b2; t14 += v * b3; t15 += v * b4; t16 += v * b5; t17 += v * b6; t18 += v * b7; t19 += v * b8; t20 += v * b9; t21 += v * b10; t22 += v * b11; t23 += v * b12; t24 += v * b13; t25 += v * b14; t26 += v * b15; v = a[12]; t12 += v * b0; t13 += v * b1; t14 += v * b2; t15 += v * b3; t16 += v * b4; t17 += v * b5; t18 += v * b6; t19 += v * b7; t20 += v * b8; t21 += v * b9; t22 += v * b10; t23 += v * b11; t24 += v * b12; t25 += v * b13; t26 += v * b14; t27 += v * b15; v = a[13]; t13 += v * b0; t14 += v * b1; t15 += v * b2; t16 += v * b3; t17 += v * b4; t18 += v * b5; t19 += v * b6; t20 += v * b7; t21 += v * b8; t22 += v * b9; t23 += v * b10; t24 += v * b11; t25 += v * b12; t26 += v * b13; t27 += v * b14; t28 += v * b15; v = a[14]; t14 += v * b0; t15 += v * b1; t16 += v * b2; t17 += v * b3; t18 += v * b4; t19 += v * b5; t20 += v * b6; t21 += v * b7; t22 += v * b8; t23 += v * b9; t24 += v * b10; t25 += v * b11; t26 += v * b12; t27 += v * b13; t28 += v * b14; t29 += v * b15; v = a[15]; t15 += v * b0; t16 += v * b1; t17 += v * b2; t18 += v * b3; t19 += v * b4; t20 += v * b5; t21 += v * b6; t22 += v * b7; t23 += v * b8; t24 += v * b9; t25 += v * b10; t26 += v * b11; t27 += v * b12; t28 += v * b13; t29 += v * b14; t30 += v * b15; t0 += 38 * t16; t1 += 38 * t17; t2 += 38 * t18; t3 += 38 * t19; t4 += 38 * t20; t5 += 38 * t21; t6 += 38 * t22; t7 += 38 * t23; t8 += 38 * t24; t9 += 38 * t25; t10 += 38 * t26; t11 += 38 * t27; t12 += 38 * t28; t13 += 38 * t29; t14 += 38 * t30; // t15 left as is // first car c = 1; v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; t0 += c-1 + 37 * (c-1); // second car c = 1; v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; t0 += c-1 + 37 * (c-1); o[ 0] = t0; o[ 1] = t1; o[ 2] = t2; o[ 3] = t3; o[ 4] = t4; o[ 5] = t5; o[ 6] = t6; o[ 7] = t7; o[ 8] = t8; o[ 9] = t9; o[10] = t10; o[11] = t11; o[12] = t12; o[13] = t13; o[14] = t14; o[15] = t15; } function S(o, a) { M(o, a, a); } function inv25519(o, i) { var c = gf(); var a; for (a = 0; a < 16; a++) c[a] = i[a]; for (a = 253; a >= 0; a--) { S(c, c); if(a !== 2 && a !== 4) M(c, c, i); } for (a = 0; a < 16; a++) o[a] = c[a]; } function pow2523(o, i) { var c = gf(); var a; for (a = 0; a < 16; a++) c[a] = i[a]; for (a = 250; a >= 0; a--) { S(c, c); if(a !== 1) M(c, c, i); } for (a = 0; a < 16; a++) o[a] = c[a]; } function crypto_scalarmult(q, n, p) { var z = new Uint8Array(32); var x = new Float64Array(80), r, i; var a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(); for (i = 0; i < 31; i++) z[i] = n[i]; z[31]=(n[31]&127)|64; z[0]&=248; unpack25519(x,p); for (i = 0; i < 16; i++) { b[i]=x[i]; d[i]=a[i]=c[i]=0; } a[0]=d[0]=1; for (i=254; i>=0; --i) { r=(z[i>>>3]>>>(i&7))&1; sel25519(a,b,r); sel25519(c,d,r); A(e,a,c); Z(a,a,c); A(c,b,d); Z(b,b,d); S(d,e); S(f,a); M(a,c,a); M(c,b,e); A(e,a,c); Z(a,a,c); S(b,a); Z(c,d,f); M(a,c,_121665); A(a,a,d); M(c,c,a); M(a,d,f); M(d,b,x); S(b,e); sel25519(a,b,r); sel25519(c,d,r); } for (i = 0; i < 16; i++) { x[i+16]=a[i]; x[i+32]=c[i]; x[i+48]=b[i]; x[i+64]=d[i]; } var x32 = x.subarray(32); var x16 = x.subarray(16); inv25519(x32,x32); M(x16,x16,x32); pack25519(q,x16); return 0; } function crypto_scalarmult_base(q, n) { return crypto_scalarmult(q, n, _9); } function crypto_box_keypair(y, x) { randombytes(x, 32); return crypto_scalarmult_base(y, x); } function crypto_box_beforenm(k, y, x) { var s = new Uint8Array(32); crypto_scalarmult(s, x, y); return crypto_core_hsalsa20(k, _0, s, sigma); } var crypto_box_afternm = crypto_secretbox; var crypto_box_open_afternm = crypto_secretbox_open; function crypto_box(c, m, d, n, y, x) { var k = new Uint8Array(32); crypto_box_beforenm(k, y, x); return crypto_box_afternm(c, m, d, n, k); } function crypto_box_open(m, c, d, n, y, x) { var k = new Uint8Array(32); crypto_box_beforenm(k, y, x); return crypto_box_open_afternm(m, c, d, n, k); } var K = [ 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 ]; function crypto_hashblocks_hl(hh, hl, m, n) { var wh = new Int32Array(16), wl = new Int32Array(16), bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, th, tl, i, j, h, l, a, b, c, d; var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7]; var pos = 0; while (n >= 128) { for (i = 0; i < 16; i++) { j = 8 * i + pos; wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; } for (i = 0; i < 80; i++) { bh0 = ah0; bh1 = ah1; bh2 = ah2; bh3 = ah3; bh4 = ah4; bh5 = ah5; bh6 = ah6; bh7 = ah7; bl0 = al0; bl1 = al1; bl2 = al2; bl3 = al3; bl4 = al4; bl5 = al5; bl6 = al6; bl7 = al7; // add h = ah7; l = al7; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; // Sigma1 h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; // Ch h = (ah4 & ah5) ^ (~ah4 & ah6); l = (al4 & al5) ^ (~al4 & al6); a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; // K h = K[i*2]; l = K[i*2+1]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; // w h = wh[i%16]; l = wl[i%16]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; th = c & 0xffff | d << 16; tl = a & 0xffff | b << 16; // add h = th; l = tl; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; // Sigma0 h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; // Maj h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; bh7 = (c & 0xffff) | (d << 16); bl7 = (a & 0xffff) | (b << 16); // add h = bh3; l = bl3; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = th; l = tl; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; bh3 = (c & 0xffff) | (d << 16); bl3 = (a & 0xffff) | (b << 16); ah1 = bh0; ah2 = bh1; ah3 = bh2; ah4 = bh3; ah5 = bh4; ah6 = bh5; ah7 = bh6; ah0 = bh7; al1 = bl0; al2 = bl1; al3 = bl2; al4 = bl3; al5 = bl4; al6 = bl5; al7 = bl6; al0 = bl7; if (i%16 === 15) { for (j = 0; j < 16; j++) { // add h = wh[j]; l = wl[j]; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = wh[(j+9)%16]; l = wl[(j+9)%16]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; // sigma0 th = wh[(j+1)%16]; tl = wl[(j+1)%16]; h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; // sigma1 th = wh[(j+14)%16]; tl = wl[(j+14)%16]; h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; wh[j] = (c & 0xffff) | (d << 16); wl[j] = (a & 0xffff) | (b << 16); } } } // add h = ah0; l = al0; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[0]; l = hl[0]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[0] = ah0 = (c & 0xffff) | (d << 16); hl[0] = al0 = (a & 0xffff) | (b << 16); h = ah1; l = al1; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[1]; l = hl[1]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[1] = ah1 = (c & 0xffff) | (d << 16); hl[1] = al1 = (a & 0xffff) | (b << 16); h = ah2; l = al2; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[2]; l = hl[2]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[2] = ah2 = (c & 0xffff) | (d << 16); hl[2] = al2 = (a & 0xffff) | (b << 16); h = ah3; l = al3; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[3]; l = hl[3]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[3] = ah3 = (c & 0xffff) | (d << 16); hl[3] = al3 = (a & 0xffff) | (b << 16); h = ah4; l = al4; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[4]; l = hl[4]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[4] = ah4 = (c & 0xffff) | (d << 16); hl[4] = al4 = (a & 0xffff) | (b << 16); h = ah5; l = al5; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[5]; l = hl[5]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[5] = ah5 = (c & 0xffff) | (d << 16); hl[5] = al5 = (a & 0xffff) | (b << 16); h = ah6; l = al6; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[6]; l = hl[6]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[6] = ah6 = (c & 0xffff) | (d << 16); hl[6] = al6 = (a & 0xffff) | (b << 16); h = ah7; l = al7; a = l & 0xffff; b = l >>> 16; c = h & 0xffff; d = h >>> 16; h = hh[7]; l = hl[7]; a += l & 0xffff; b += l >>> 16; c += h & 0xffff; d += h >>> 16; b += a >>> 16; c += b >>> 16; d += c >>> 16; hh[7] = ah7 = (c & 0xffff) | (d << 16); hl[7] = al7 = (a & 0xffff) | (b << 16); pos += 128; n -= 128; } return n; } function crypto_hash(out, m, n) { var hh = new Int32Array(8), hl = new Int32Array(8), x = new Uint8Array(256), i, b = n; hh[0] = 0x6a09e667; hh[1] = 0xbb67ae85; hh[2] = 0x3c6ef372; hh[3] = 0xa54ff53a; hh[4] = 0x510e527f; hh[5] = 0x9b05688c; hh[6] = 0x1f83d9ab; hh[7] = 0x5be0cd19; hl[0] = 0xf3bcc908; hl[1] = 0x84caa73b; hl[2] = 0xfe94f82b; hl[3] = 0x5f1d36f1; hl[4] = 0xade682d1; hl[5] = 0x2b3e6c1f; hl[6] = 0xfb41bd6b; hl[7] = 0x137e2179; crypto_hashblocks_hl(hh, hl, m, n); n %= 128; for (i = 0; i < n; i++) x[i] = m[b-n+i]; x[n] = 128; n = 256-128*(n<112?1:0); x[n-9] = 0; ts64(x, n-8, (b / 0x20000000) | 0, b << 3); crypto_hashblocks_hl(hh, hl, x, n); for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); return 0; } function add(p, q) { var a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf(); Z(a, p[1], p[0]); Z(t, q[1], q[0]); M(a, a, t); A(b, p[0], p[1]); A(t, q[0], q[1]); M(b, b, t); M(c, p[3], q[3]); M(c, c, D2); M(d, p[2], q[2]); A(d, d, d); Z(e, b, a); Z(f, d, c); A(g, d, c); A(h, b, a); M(p[0], e, f); M(p[1], h, g); M(p[2], g, f); M(p[3], e, h); } function cswap(p, q, b) { var i; for (i = 0; i < 4; i++) { sel25519(p[i], q[i], b); } } function pack(r, p) { var tx = gf(), ty = gf(), zi = gf(); inv25519(zi, p[2]); M(tx, p[0], zi); M(ty, p[1], zi); pack25519(r, ty); r[31] ^= par25519(tx) << 7; } function scalarmult(p, q, s) { var b, i; set25519(p[0], gf0); set25519(p[1], gf1); set25519(p[2], gf1); set25519(p[3], gf0); for (i = 255; i >= 0; --i) { b = (s[(i/8)|0] >> (i&7)) & 1; cswap(p, q, b); add(q, p); add(p, p); cswap(p, q, b); } } function scalarbase(p, s) { var q = [gf(), gf(), gf(), gf()]; set25519(q[0], X); set25519(q[1], Y); set25519(q[2], gf1); M(q[3], X, Y); scalarmult(p, q, s); } function crypto_sign_keypair(pk, sk, seeded) { var d = new Uint8Array(64); var p = [gf(), gf(), gf(), gf()]; var i; if (!seeded) randombytes(sk, 32); crypto_hash(d, sk, 32); d[0] &= 248; d[31] &= 127; d[31] |= 64; scalarbase(p, d); pack(pk, p); for (i = 0; i < 32; i++) sk[i+32] = pk[i]; return 0; } var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); function modL(r, x) { var carry, i, j, k; for (i = 63; i >= 32; --i) { carry = 0; for (j = i - 32, k = i - 12; j < k; ++j) { x[j] += carry - 16 * x[i] * L[j - (i - 32)]; carry = (x[j] + 128) >> 8; x[j] -= carry * 256; } x[j] += carry; x[i] = 0; } carry = 0; for (j = 0; j < 32; j++) { x[j] += carry - (x[31] >> 4) * L[j]; carry = x[j] >> 8; x[j] &= 255; } for (j = 0; j < 32; j++) x[j] -= carry * L[j]; for (i = 0; i < 32; i++) { x[i+1] += x[i] >> 8; r[i] = x[i] & 255; } } function reduce(r) { var x = new Float64Array(64), i; for (i = 0; i < 64; i++) x[i] = r[i]; for (i = 0; i < 64; i++) r[i] = 0; modL(r, x); } // Note: difference from C - smlen returned, not passed as argument. function crypto_sign(sm, m, n, sk) { var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); var i, j, x = new Float64Array(64); var p = [gf(), gf(), gf(), gf()]; crypto_hash(d, sk, 32); d[0] &= 248; d[31] &= 127; d[31] |= 64; var smlen = n + 64; for (i = 0; i < n; i++) sm[64 + i] = m[i]; for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; crypto_hash(r, sm.subarray(32), n+32); reduce(r); scalarbase(p, r); pack(sm, p); for (i = 32; i < 64; i++) sm[i] = sk[i]; crypto_hash(h, sm, n + 64); reduce(h); for (i = 0; i < 64; i++) x[i] = 0; for (i = 0; i < 32; i++) x[i] = r[i]; for (i = 0; i < 32; i++) { for (j = 0; j < 32; j++) { x[i+j] += h[i] * d[j]; } } modL(sm.subarray(32), x); return smlen; } function unpackneg(r, p) { var t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf(); set25519(r[2], gf1); unpack25519(r[1], p); S(num, r[1]); M(den, num, D); Z(num, num, r[2]); A(den, r[2], den); S(den2, den); S(den4, den2); M(den6, den4, den2); M(t, den6, num); M(t, t, den); pow2523(t, t); M(t, t, num); M(t, t, den); M(t, t, den); M(r[0], t, den); S(chk, r[0]); M(chk, chk, den); if (neq25519(chk, num)) M(r[0], r[0], I); S(chk, r[0]); M(chk, chk, den); if (neq25519(chk, num)) return -1; if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); M(r[3], r[0], r[1]); return 0; } function crypto_sign_open(m, sm, n, pk) { var i, mlen; var t = new Uint8Array(32), h = new Uint8Array(64); var p = [gf(), gf(), gf(), gf()], q = [gf(), gf(), gf(), gf()]; mlen = -1; if (n < 64) return -1; if (unpackneg(q, pk)) return -1; for (i = 0; i < n; i++) m[i] = sm[i]; for (i = 0; i < 32; i++) m[i+32] = pk[i]; crypto_hash(h, m, n); reduce(h); scalarmult(p, q, h); scalarbase(q, sm.subarray(32)); add(p, q); pack(t, p); n -= 64; if (crypto_verify_32(sm, 0, t, 0)) { for (i = 0; i < n; i++) m[i] = 0; return -1; } for (i = 0; i < n; i++) m[i] = sm[i + 64]; mlen = n; return mlen; } var crypto_secretbox_KEYBYTES = 32, crypto_secretbox_NONCEBYTES = 24, crypto_secretbox_ZEROBYTES = 32, crypto_secretbox_BOXZEROBYTES = 16, crypto_scalarmult_BYTES = 32, crypto_scalarmult_SCALARBYTES = 32, crypto_box_PUBLICKEYBYTES = 32, crypto_box_SECRETKEYBYTES = 32, crypto_box_BEFORENMBYTES = 32, crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, crypto_sign_BYTES = 64, crypto_sign_PUBLICKEYBYTES = 32, crypto_sign_SECRETKEYBYTES = 64, crypto_sign_SEEDBYTES = 32, crypto_hash_BYTES = 64; nacl.lowlevel = { crypto_core_hsalsa20: crypto_core_hsalsa20, crypto_stream_xor: crypto_stream_xor, crypto_stream: crypto_stream, crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, crypto_stream_salsa20: crypto_stream_salsa20, crypto_onetimeauth: crypto_onetimeauth, crypto_onetimeauth_verify: crypto_onetimeauth_verify, crypto_verify_16: crypto_verify_16, crypto_verify_32: crypto_verify_32, crypto_secretbox: crypto_secretbox, crypto_secretbox_open: crypto_secretbox_open, crypto_scalarmult: crypto_scalarmult, crypto_scalarmult_base: crypto_scalarmult_base, crypto_box_beforenm: crypto_box_beforenm, crypto_box_afternm: crypto_box_afternm, crypto_box: crypto_box, crypto_box_open: crypto_box_open, crypto_box_keypair: crypto_box_keypair, crypto_hash: crypto_hash, crypto_sign: crypto_sign, crypto_sign_keypair: crypto_sign_keypair, crypto_sign_open: crypto_sign_open, crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, crypto_sign_BYTES: crypto_sign_BYTES, crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, crypto_hash_BYTES: crypto_hash_BYTES }; /* High-level API */ function checkLengths(k, n) { if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); } function checkBoxLengths(pk, sk) { if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); } function checkArrayTypes() { var t, i; for (i = 0; i < arguments.length; i++) { if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') throw new TypeError('unexpected type ' + t + ', use Uint8Array'); } } function cleanup(arr) { for (var i = 0; i < arr.length; i++) arr[i] = 0; } // TODO: Completely remove this in v0.15. if (!nacl.util) { nacl.util = {}; nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); }; } nacl.randomBytes = function(n) { var b = new Uint8Array(n); randombytes(b, n); return b; }; nacl.secretbox = function(msg, nonce, key) { checkArrayTypes(msg, nonce, key); checkLengths(key, nonce); var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); var c = new Uint8Array(m.length); for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; crypto_secretbox(c, m, m.length, nonce, key); return c.subarray(crypto_secretbox_BOXZEROBYTES); }; nacl.secretbox.open = function(box, nonce, key) { checkArrayTypes(box, nonce, key); checkLengths(key, nonce); var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); var m = new Uint8Array(c.length); for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; if (c.length < 32) return false; if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; return m.subarray(crypto_secretbox_ZEROBYTES); }; nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; nacl.scalarMult = function(n, p) { checkArrayTypes(n, p); if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); var q = new Uint8Array(crypto_scalarmult_BYTES); crypto_scalarmult(q, n, p); return q; }; nacl.scalarMult.base = function(n) { checkArrayTypes(n); if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); var q = new Uint8Array(crypto_scalarmult_BYTES); crypto_scalarmult_base(q, n); return q; }; nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; nacl.box = function(msg, nonce, publicKey, secretKey) { var k = nacl.box.before(publicKey, secretKey); return nacl.secretbox(msg, nonce, k); }; nacl.box.before = function(publicKey, secretKey) { checkArrayTypes(publicKey, secretKey); checkBoxLengths(publicKey, secretKey); var k = new Uint8Array(crypto_box_BEFORENMBYTES); crypto_box_beforenm(k, publicKey, secretKey); return k; }; nacl.box.after = nacl.secretbox; nacl.box.open = function(msg, nonce, publicKey, secretKey) { var k = nacl.box.before(publicKey, secretKey); return nacl.secretbox.open(msg, nonce, k); }; nacl.box.open.after = nacl.secretbox.open; nacl.box.keyPair = function() { var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); crypto_box_keypair(pk, sk); return {publicKey: pk, secretKey: sk}; }; nacl.box.keyPair.fromSecretKey = function(secretKey) { checkArrayTypes(secretKey); if (secretKey.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); crypto_scalarmult_base(pk, secretKey); return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; }; nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; nacl.box.nonceLength = crypto_box_NONCEBYTES; nacl.box.overheadLength = nacl.secretbox.overheadLength; nacl.sign = function(msg, secretKey) { checkArrayTypes(msg, secretKey); if (secretKey.length !== crypto_sign_SECRETKEYBYTES) throw new Error('bad secret key size'); var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); crypto_sign(signedMsg, msg, msg.length, secretKey); return signedMsg; }; nacl.sign.open = function(signedMsg, publicKey) { if (arguments.length !== 2) throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); checkArrayTypes(signedMsg, publicKey); if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) throw new Error('bad public key size'); var tmp = new Uint8Array(signedMsg.length); var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); if (mlen < 0) return null; var m = new Uint8Array(mlen); for (var i = 0; i < m.length; i++) m[i] = tmp[i]; return m; }; nacl.sign.detached = function(msg, secretKey) { var signedMsg = nacl.sign(msg, secretKey); var sig = new Uint8Array(crypto_sign_BYTES); for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; return sig; }; nacl.sign.detached.verify = function(msg, sig, publicKey) { checkArrayTypes(msg, sig, publicKey); if (sig.length !== crypto_sign_BYTES) throw new Error('bad signature size'); if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) throw new Error('bad public key size'); var sm = new Uint8Array(crypto_sign_BYTES + msg.length); var m = new Uint8Array(crypto_sign_BYTES + msg.length); var i; for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); }; nacl.sign.keyPair = function() { var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); crypto_sign_keypair(pk, sk); return {publicKey: pk, secretKey: sk}; }; nacl.sign.keyPair.fromSecretKey = function(secretKey) { checkArrayTypes(secretKey); if (secretKey.length !== crypto_sign_SECRETKEYBYTES) throw new Error('bad secret key size'); var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; }; nacl.sign.keyPair.fromSeed = function(seed) { checkArrayTypes(seed); if (seed.length !== crypto_sign_SEEDBYTES) throw new Error('bad seed size'); var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); for (var i = 0; i < 32; i++) sk[i] = seed[i]; crypto_sign_keypair(pk, sk, true); return {publicKey: pk, secretKey: sk}; }; nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; nacl.sign.seedLength = crypto_sign_SEEDBYTES; nacl.sign.signatureLength = crypto_sign_BYTES; nacl.hash = function(msg) { checkArrayTypes(msg); var h = new Uint8Array(crypto_hash_BYTES); crypto_hash(h, msg, msg.length); return h; }; nacl.hash.hashLength = crypto_hash_BYTES; nacl.verify = function(x, y) { checkArrayTypes(x, y); // Zero length arguments are considered not equal. if (x.length === 0 || y.length === 0) return false; if (x.length !== y.length) return false; return (vn(x, 0, y, 0, x.length) === 0) ? true : false; }; nacl.setPRNG = function(fn) { randombytes = fn; }; (function() { // Initialize PRNG if environment provides CSPRNG. // If not, methods calling randombytes will throw. var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; if (crypto && crypto.getRandomValues) { // Browsers. var QUOTA = 65536; nacl.setPRNG(function(x, n) { var i, v = new Uint8Array(n); for (i = 0; i < n; i += QUOTA) { crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); } for (i = 0; i < n; i++) x[i] = v[i]; cleanup(v); }); } else if (true) { // Node.js. crypto = __webpack_require__(33373); if (crypto && crypto.randomBytes) { nacl.setPRNG(function(x, n) { var i, v = crypto.randomBytes(n); for (i = 0; i < n; i++) x[i] = v[i]; cleanup(v); }); } } })(); })( true && module.exports ? module.exports : (self.nacl = self.nacl || {})); /***/ }), /***/ 4987: /***/ (function(module) { (function (global, factory) { true ? module.exports = factory() : 0; }(this, (function () { // Underscore.js 1.10.2 // https://underscorejs.org // (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. // Baseline setup // -------------- // Establish the root object, `window` (`self`) in the browser, `global` // on the server, or `this` in some virtual machines. We use `self` // instead of `window` for `WebWorker` support. var root = typeof self == 'object' && self.self === self && self || typeof global == 'object' && global.global === global && global || Function('return this')() || {}; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype; var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; // Create quick reference variables for speed access to core prototypes. var push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. var nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeCreate = Object.create; // Create references to these builtin functions because we override them. var _isNaN = root.isNaN, _isFinite = root.isFinite; // Naked function reference for surrogate-prototype-swapping. var Ctor = function(){}; // The Underscore object. All exported functions below are added to it in the // modules/index-all.js using the mixin function. function _(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; } // Current version. var VERSION = _.VERSION = '1.10.2'; // Internal function that returns an efficient (for current engines) version // of the passed-in callback, to be repeatedly applied in other Underscore // functions. function optimizeCb(func, context, argCount) { if (context === void 0) return func; switch (argCount == null ? 3 : argCount) { case 1: return function(value) { return func.call(context, value); }; // The 2-argument case is omitted because we’re not using it. case 3: return function(value, index, collection) { return func.call(context, value, index, collection); }; case 4: return function(accumulator, value, index, collection) { return func.call(context, accumulator, value, index, collection); }; } return function() { return func.apply(context, arguments); }; } // An internal function to generate callbacks that can be applied to each // element in a collection, returning the desired result — either `identity`, // an arbitrary callback, a property matcher, or a property accessor. function baseIteratee(value, context, argCount) { if (value == null) return identity; if (isFunction(value)) return optimizeCb(value, context, argCount); if (isObject(value) && !isArray(value)) return matcher(value); return property(value); } // External wrapper for our callback generator. Users may customize // `_.iteratee` if they want additional predicate/iteratee shorthand styles. // This abstraction hides the internal-only argCount argument. _.iteratee = iteratee; function iteratee(value, context) { return baseIteratee(value, context, Infinity); } // The function we actually call internally. It invokes _.iteratee if // overridden, otherwise baseIteratee. function cb(value, context, argCount) { if (_.iteratee !== iteratee) return _.iteratee(value, context); return baseIteratee(value, context, argCount); } // Some functions take a variable number of arguments, or a few expected // arguments at the beginning and then a variable number of values to operate // on. This helper accumulates all remaining arguments past the function’s // argument length (or an explicit `startIndex`), into an array that becomes // the last argument. Similar to ES6’s "rest parameter". function restArguments(func, startIndex) { startIndex = startIndex == null ? func.length - 1 : +startIndex; return function() { var length = Math.max(arguments.length - startIndex, 0), rest = Array(length), index = 0; for (; index < length; index++) { rest[index] = arguments[index + startIndex]; } switch (startIndex) { case 0: return func.call(this, rest); case 1: return func.call(this, arguments[0], rest); case 2: return func.call(this, arguments[0], arguments[1], rest); } var args = Array(startIndex + 1); for (index = 0; index < startIndex; index++) { args[index] = arguments[index]; } args[startIndex] = rest; return func.apply(this, args); }; } // An internal function for creating a new object that inherits from another. function baseCreate(prototype) { if (!isObject(prototype)) return {}; if (nativeCreate) return nativeCreate(prototype); Ctor.prototype = prototype; var result = new Ctor; Ctor.prototype = null; return result; } function shallowProperty(key) { return function(obj) { return obj == null ? void 0 : obj[key]; }; } function _has(obj, path) { return obj != null && hasOwnProperty.call(obj, path); } function deepGet(obj, path) { var length = path.length; for (var i = 0; i < length; i++) { if (obj == null) return void 0; obj = obj[path[i]]; } return length ? obj : void 0; } // Helper for collection methods to determine whether a collection // should be iterated as an array or as an object. // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; var getLength = shallowProperty('length'); function isArrayLike(collection) { var length = getLength(collection); return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; } // Collection Functions // -------------------- // The cornerstone, an `each` implementation, aka `forEach`. // Handles raw objects in addition to array-likes. Treats all // sparse array-likes as if they were dense. function each(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; if (isArrayLike(obj)) { for (i = 0, length = obj.length; i < length; i++) { iteratee(obj[i], i, obj); } } else { var _keys = keys(obj); for (i = 0, length = _keys.length; i < length; i++) { iteratee(obj[_keys[i]], _keys[i], obj); } } return obj; } // Return the results of applying the iteratee to each element. function map(obj, iteratee, context) { iteratee = cb(iteratee, context); var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length, results = Array(length); for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; results[index] = iteratee(obj[currentKey], currentKey, obj); } return results; } // Create a reducing function iterating left or right. function createReduce(dir) { // Wrap code that reassigns argument variables in a separate function than // the one that accesses `arguments.length` to avoid a perf hit. (#1991) var reducer = function(obj, iteratee, memo, initial) { var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length, index = dir > 0 ? 0 : length - 1; if (!initial) { memo = obj[_keys ? _keys[index] : index]; index += dir; } for (; index >= 0 && index < length; index += dir) { var currentKey = _keys ? _keys[index] : index; memo = iteratee(memo, obj[currentKey], currentKey, obj); } return memo; }; return function(obj, iteratee, memo, context) { var initial = arguments.length >= 3; return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); }; } // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. var reduce = createReduce(1); // The right-associative version of reduce, also known as `foldr`. var reduceRight = createReduce(-1); // Return the first value which passes a truth test. function find(obj, predicate, context) { var keyFinder = isArrayLike(obj) ? findIndex : findKey; var key = keyFinder(obj, predicate, context); if (key !== void 0 && key !== -1) return obj[key]; } // Return all the elements that pass a truth test. function filter(obj, predicate, context) { var results = []; predicate = cb(predicate, context); each(obj, function(value, index, list) { if (predicate(value, index, list)) results.push(value); }); return results; } // Return all the elements for which a truth test fails. function reject(obj, predicate, context) { return filter(obj, negate(cb(predicate)), context); } // Determine whether all of the elements match a truth test. function every(obj, predicate, context) { predicate = cb(predicate, context); var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; if (!predicate(obj[currentKey], currentKey, obj)) return false; } return true; } // Determine if at least one element in the object matches a truth test. function some(obj, predicate, context) { predicate = cb(predicate, context); var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; if (predicate(obj[currentKey], currentKey, obj)) return true; } return false; } // Determine if the array or object contains a given item (using `===`). function contains(obj, item, fromIndex, guard) { if (!isArrayLike(obj)) obj = values(obj); if (typeof fromIndex != 'number' || guard) fromIndex = 0; return indexOf(obj, item, fromIndex) >= 0; } // Invoke a method (with arguments) on every item in a collection. var invoke = restArguments(function(obj, path, args) { var contextPath, func; if (isFunction(path)) { func = path; } else if (isArray(path)) { contextPath = path.slice(0, -1); path = path[path.length - 1]; } return map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); }); // Convenience version of a common use case of `map`: fetching a property. function pluck(obj, key) { return map(obj, property(key)); } // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. function where(obj, attrs) { return filter(obj, matcher(attrs)); } // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. function findWhere(obj, attrs) { return find(obj, matcher(attrs)); } // Return the maximum element (or element-based computation). function max(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value > result) { result = value; } } } else { iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed > lastComputed || computed === -Infinity && result === -Infinity) { result = v; lastComputed = computed; } }); } return result; } // Return the minimum element (or element-based computation). function min(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value < result) { result = value; } } } else { iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed < lastComputed || computed === Infinity && result === Infinity) { result = v; lastComputed = computed; } }); } return result; } // Shuffle a collection. function shuffle(obj) { return sample(obj, Infinity); } // Sample **n** random values from a collection using the modern version of the // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `map`. function sample(obj, n, guard) { if (n == null || guard) { if (!isArrayLike(obj)) obj = values(obj); return obj[random(obj.length - 1)]; } var sample = isArrayLike(obj) ? clone(obj) : values(obj); var length = getLength(sample); n = Math.max(Math.min(n, length), 0); var last = length - 1; for (var index = 0; index < n; index++) { var rand = random(index, last); var temp = sample[index]; sample[index] = sample[rand]; sample[rand] = temp; } return sample.slice(0, n); } // Sort the object's values by a criterion produced by an iteratee. function sortBy(obj, iteratee, context) { var index = 0; iteratee = cb(iteratee, context); return pluck(map(obj, function(value, key, list) { return { value: value, index: index++, criteria: iteratee(value, key, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index - right.index; }), 'value'); } // An internal function used for aggregate "group by" operations. function group(behavior, partition) { return function(obj, iteratee, context) { var result = partition ? [[], []] : {}; iteratee = cb(iteratee, context); each(obj, function(value, index) { var key = iteratee(value, index, obj); behavior(result, value, key); }); return result; }; } // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. var groupBy = group(function(result, value, key) { if (_has(result, key)) result[key].push(value); else result[key] = [value]; }); // Indexes the object's values by a criterion, similar to `groupBy`, but for // when you know that your index values will be unique. var indexBy = group(function(result, value, key) { result[key] = value; }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. var countBy = group(function(result, value, key) { if (_has(result, key)) result[key]++; else result[key] = 1; }); var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; // Safely create a real, live array from anything iterable. function toArray(obj) { if (!obj) return []; if (isArray(obj)) return slice.call(obj); if (isString(obj)) { // Keep surrogate pair characters together return obj.match(reStrSymbol); } if (isArrayLike(obj)) return map(obj, identity); return values(obj); } // Return the number of elements in an object. function size(obj) { if (obj == null) return 0; return isArrayLike(obj) ? obj.length : keys(obj).length; } // Split a collection into two arrays: one whose elements all satisfy the given // predicate, and one whose elements all do not satisfy the predicate. var partition = group(function(result, value, pass) { result[pass ? 0 : 1].push(value); }, true); // Array Functions // --------------- // Get the first element of an array. Passing **n** will return the first N // values in the array. The **guard** check allows it to work with `map`. function first(array, n, guard) { if (array == null || array.length < 1) return n == null ? void 0 : []; if (n == null || guard) return array[0]; return initial(array, array.length - n); } // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. function initial(array, n, guard) { return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); } // Get the last element of an array. Passing **n** will return the last N // values in the array. function last(array, n, guard) { if (array == null || array.length < 1) return n == null ? void 0 : []; if (n == null || guard) return array[array.length - 1]; return rest(array, Math.max(0, array.length - n)); } // Returns everything but the first entry of the array. Especially useful on // the arguments object. Passing an **n** will return the rest N values in the // array. function rest(array, n, guard) { return slice.call(array, n == null || guard ? 1 : n); } // Trim out all falsy values from an array. function compact(array) { return filter(array, Boolean); } // Internal implementation of a recursive `flatten` function. function _flatten(input, shallow, strict, output) { output = output || []; var idx = output.length; for (var i = 0, length = getLength(input); i < length; i++) { var value = input[i]; if (isArrayLike(value) && (isArray(value) || isArguments(value))) { // Flatten current level of array or arguments object. if (shallow) { var j = 0, len = value.length; while (j < len) output[idx++] = value[j++]; } else { _flatten(value, shallow, strict, output); idx = output.length; } } else if (!strict) { output[idx++] = value; } } return output; } // Flatten out an array, either recursively (by default), or just one level. function flatten(array, shallow) { return _flatten(array, shallow, false); } // Return a version of the array that does not contain the specified value(s). var without = restArguments(function(array, otherArrays) { return difference(array, otherArrays); }); // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // The faster algorithm will not work with an iteratee if the iteratee // is not a one-to-one function, so providing an iteratee will disable // the faster algorithm. function uniq(array, isSorted, iteratee, context) { if (!isBoolean(isSorted)) { context = iteratee; iteratee = isSorted; isSorted = false; } if (iteratee != null) iteratee = cb(iteratee, context); var result = []; var seen = []; for (var i = 0, length = getLength(array); i < length; i++) { var value = array[i], computed = iteratee ? iteratee(value, i, array) : value; if (isSorted && !iteratee) { if (!i || seen !== computed) result.push(value); seen = computed; } else if (iteratee) { if (!contains(seen, computed)) { seen.push(computed); result.push(value); } } else if (!contains(result, value)) { result.push(value); } } return result; } // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. var union = restArguments(function(arrays) { return uniq(_flatten(arrays, true, true)); }); // Produce an array that contains every item shared between all the // passed-in arrays. function intersection(array) { var result = []; var argsLength = arguments.length; for (var i = 0, length = getLength(array); i < length; i++) { var item = array[i]; if (contains(result, item)) continue; var j; for (j = 1; j < argsLength; j++) { if (!contains(arguments[j], item)) break; } if (j === argsLength) result.push(item); } return result; } // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. var difference = restArguments(function(array, rest) { rest = _flatten(rest, true, true); return filter(array, function(value){ return !contains(rest, value); }); }); // Complement of zip. Unzip accepts an array of arrays and groups // each array's elements on shared indices. function unzip(array) { var length = array && max(array, getLength).length || 0; var result = Array(length); for (var index = 0; index < length; index++) { result[index] = pluck(array, index); } return result; } // Zip together multiple lists into a single array -- elements that share // an index go together. var zip = restArguments(unzip); // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. Passing by pairs is the reverse of pairs. function object(list, values) { var result = {}; for (var i = 0, length = getLength(list); i < length; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; } // Generator function to create the findIndex and findLastIndex functions. function createPredicateIndexFinder(dir) { return function(array, predicate, context) { predicate = cb(predicate, context); var length = getLength(array); var index = dir > 0 ? 0 : length - 1; for (; index >= 0 && index < length; index += dir) { if (predicate(array[index], index, array)) return index; } return -1; }; } // Returns the first index on an array-like that passes a predicate test. var findIndex = createPredicateIndexFinder(1); var findLastIndex = createPredicateIndexFinder(-1); // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. function sortedIndex(array, obj, iteratee, context) { iteratee = cb(iteratee, context, 1); var value = iteratee(obj); var low = 0, high = getLength(array); while (low < high) { var mid = Math.floor((low + high) / 2); if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; } return low; } // Generator function to create the indexOf and lastIndexOf functions. function createIndexFinder(dir, predicateFind, sortedIndex) { return function(array, item, idx) { var i = 0, length = getLength(array); if (typeof idx == 'number') { if (dir > 0) { i = idx >= 0 ? idx : Math.max(idx + length, i); } else { length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; } } else if (sortedIndex && idx && length) { idx = sortedIndex(array, item); return array[idx] === item ? idx : -1; } if (item !== item) { idx = predicateFind(slice.call(array, i, length), isNaN); return idx >= 0 ? idx + i : -1; } for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { if (array[idx] === item) return idx; } return -1; }; } // Return the position of the first occurrence of an item in an array, // or -1 if the item is not included in the array. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. var indexOf = createIndexFinder(1, findIndex, sortedIndex); var lastIndexOf = createIndexFinder(-1, findLastIndex); // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](https://docs.python.org/library/functions.html#range). function range(start, stop, step) { if (stop == null) { stop = start || 0; start = 0; } if (!step) { step = stop < start ? -1 : 1; } var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); for (var idx = 0; idx < length; idx++, start += step) { range[idx] = start; } return range; } // Chunk a single array into multiple arrays, each containing `count` or fewer // items. function chunk(array, count) { if (count == null || count < 1) return []; var result = []; var i = 0, length = array.length; while (i < length) { result.push(slice.call(array, i, i += count)); } return result; } // Function (ahem) Functions // ------------------ // Determines whether to execute a function as a constructor // or a normal function with the provided arguments. function executeBound(sourceFunc, boundFunc, context, callingContext, args) { if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); var self = baseCreate(sourceFunc.prototype); var result = sourceFunc.apply(self, args); if (isObject(result)) return result; return self; } // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. var bind = restArguments(function(func, context, args) { if (!isFunction(func)) throw new TypeError('Bind must be called on a function'); var bound = restArguments(function(callArgs) { return executeBound(func, bound, context, this, args.concat(callArgs)); }); return bound; }); // Partially apply a function by creating a version that has had some of its // arguments pre-filled, without changing its dynamic `this` context. _ acts // as a placeholder by default, allowing any combination of arguments to be // pre-filled. Set `partial.placeholder` for a custom placeholder argument. var partial = restArguments(function(func, boundArgs) { var placeholder = partial.placeholder; var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); for (var i = 0; i < length; i++) { args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; } while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; return bound; }); partial.placeholder = _; // Bind a number of an object's methods to that object. Remaining arguments // are the method names to be bound. Useful for ensuring that all callbacks // defined on an object belong to it. var bindAll = restArguments(function(obj, _keys) { _keys = _flatten(_keys, false, false); var index = _keys.length; if (index < 1) throw new Error('bindAll must be passed function names'); while (index--) { var key = _keys[index]; obj[key] = bind(obj[key], obj); } }); // Memoize an expensive function by storing its results. function memoize(func, hasher) { var memoize = function(key) { var cache = memoize.cache; var address = '' + (hasher ? hasher.apply(this, arguments) : key); if (!_has(cache, address)) cache[address] = func.apply(this, arguments); return cache[address]; }; memoize.cache = {}; return memoize; } // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. var delay = restArguments(function(func, wait, args) { return setTimeout(function() { return func.apply(null, args); }, wait); }); // Defers a function, scheduling it to run after the current call stack has // cleared. var defer = partial(delay, _, 1); // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run // as much as it can, without ever going more than once per `wait` duration; // but if you'd like to disable the execution on the leading edge, pass // `{leading: false}`. To disable execution on the trailing edge, ditto. function throttle(func, wait, options) { var timeout, context, args, result; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; var throttled = function() { var _now = now(); if (!previous && options.leading === false) previous = _now; var remaining = wait - (_now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = _now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; throttled.cancel = function() { clearTimeout(timeout); previous = 0; timeout = context = args = null; }; return throttled; } // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. function debounce(func, wait, immediate) { var timeout, result; var later = function(context, args) { timeout = null; if (args) result = func.apply(context, args); }; var debounced = restArguments(function(args) { if (timeout) clearTimeout(timeout); if (immediate) { var callNow = !timeout; timeout = setTimeout(later, wait); if (callNow) result = func.apply(this, args); } else { timeout = delay(later, wait, this, args); } return result; }); debounced.cancel = function() { clearTimeout(timeout); timeout = null; }; return debounced; } // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. function wrap(func, wrapper) { return partial(wrapper, func); } // Returns a negated version of the passed-in predicate. function negate(predicate) { return function() { return !predicate.apply(this, arguments); }; } // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. function compose() { var args = arguments; var start = args.length - 1; return function() { var i = start; var result = args[start].apply(this, arguments); while (i--) result = args[i].call(this, result); return result; }; } // Returns a function that will only be executed on and after the Nth call. function after(times, func) { return function() { if (--times < 1) { return func.apply(this, arguments); } }; } // Returns a function that will only be executed up to (but not including) the Nth call. function before(times, func) { var memo; return function() { if (--times > 0) { memo = func.apply(this, arguments); } if (times <= 1) func = null; return memo; }; } // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. var once = partial(before, 2); // Object Functions // ---------------- // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; function collectNonEnumProps(obj, _keys) { var nonEnumIdx = nonEnumerableProps.length; var constructor = obj.constructor; var proto = isFunction(constructor) && constructor.prototype || ObjProto; // Constructor is a special case. var prop = 'constructor'; if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop); while (nonEnumIdx--) { prop = nonEnumerableProps[nonEnumIdx]; if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) { _keys.push(prop); } } } // Retrieve the names of an object's own properties. // Delegates to **ECMAScript 5**'s native `Object.keys`. function keys(obj) { if (!isObject(obj)) return []; if (nativeKeys) return nativeKeys(obj); var _keys = []; for (var key in obj) if (_has(obj, key)) _keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, _keys); return _keys; } // Retrieve all the property names of an object. function allKeys(obj) { if (!isObject(obj)) return []; var _keys = []; for (var key in obj) _keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, _keys); return _keys; } // Retrieve the values of an object's properties. function values(obj) { var _keys = keys(obj); var length = _keys.length; var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[_keys[i]]; } return values; } // Returns the results of applying the iteratee to each element of the object. // In contrast to map it returns an object. function mapObject(obj, iteratee, context) { iteratee = cb(iteratee, context); var _keys = keys(obj), length = _keys.length, results = {}; for (var index = 0; index < length; index++) { var currentKey = _keys[index]; results[currentKey] = iteratee(obj[currentKey], currentKey, obj); } return results; } // Convert an object into a list of `[key, value]` pairs. // The opposite of object. function pairs(obj) { var _keys = keys(obj); var length = _keys.length; var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [_keys[i], obj[_keys[i]]]; } return pairs; } // Invert the keys and values of an object. The values must be serializable. function invert(obj) { var result = {}; var _keys = keys(obj); for (var i = 0, length = _keys.length; i < length; i++) { result[obj[_keys[i]]] = _keys[i]; } return result; } // Return a sorted list of the function names available on the object. function functions(obj) { var names = []; for (var key in obj) { if (isFunction(obj[key])) names.push(key); } return names.sort(); } // An internal function for creating assigner functions. function createAssigner(keysFunc, defaults) { return function(obj) { var length = arguments.length; if (defaults) obj = Object(obj); if (length < 2 || obj == null) return obj; for (var index = 1; index < length; index++) { var source = arguments[index], _keys = keysFunc(source), l = _keys.length; for (var i = 0; i < l; i++) { var key = _keys[i]; if (!defaults || obj[key] === void 0) obj[key] = source[key]; } } return obj; }; } // Extend a given object with all the properties in passed-in object(s). var extend = createAssigner(allKeys); // Assigns a given object with all the own properties in the passed-in object(s). // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) var extendOwn = createAssigner(keys); // Returns the first key on an object that passes a predicate test. function findKey(obj, predicate, context) { predicate = cb(predicate, context); var _keys = keys(obj), key; for (var i = 0, length = _keys.length; i < length; i++) { key = _keys[i]; if (predicate(obj[key], key, obj)) return key; } } // Internal pick helper function to determine if `obj` has key `key`. function keyInObj(value, key, obj) { return key in obj; } // Return a copy of the object only containing the whitelisted properties. var pick = restArguments(function(obj, _keys) { var result = {}, iteratee = _keys[0]; if (obj == null) return result; if (isFunction(iteratee)) { if (_keys.length > 1) iteratee = optimizeCb(iteratee, _keys[1]); _keys = allKeys(obj); } else { iteratee = keyInObj; _keys = _flatten(_keys, false, false); obj = Object(obj); } for (var i = 0, length = _keys.length; i < length; i++) { var key = _keys[i]; var value = obj[key]; if (iteratee(value, key, obj)) result[key] = value; } return result; }); // Return a copy of the object without the blacklisted properties. var omit = restArguments(function(obj, _keys) { var iteratee = _keys[0], context; if (isFunction(iteratee)) { iteratee = negate(iteratee); if (_keys.length > 1) context = _keys[1]; } else { _keys = map(_flatten(_keys, false, false), String); iteratee = function(value, key) { return !contains(_keys, key); }; } return pick(obj, iteratee, context); }); // Fill in a given object with default properties. var defaults = createAssigner(allKeys, true); // Creates an object that inherits from the given prototype object. // If additional properties are provided then they will be added to the // created object. function create(prototype, props) { var result = baseCreate(prototype); if (props) extendOwn(result, props); return result; } // Create a (shallow-cloned) duplicate of an object. function clone(obj) { if (!isObject(obj)) return obj; return isArray(obj) ? obj.slice() : extend({}, obj); } // Invokes interceptor with the obj, and then returns obj. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. function tap(obj, interceptor) { interceptor(obj); return obj; } // Returns whether an object has a given set of `key:value` pairs. function isMatch(object, attrs) { var _keys = keys(attrs), length = _keys.length; if (object == null) return !length; var obj = Object(object); for (var i = 0; i < length; i++) { var key = _keys[i]; if (attrs[key] !== obj[key] || !(key in obj)) return false; } return true; } // Internal recursive comparison function for `isEqual`. function eq(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison). if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive. if (a !== a) return b !== b; // Exhaust primitive checks var type = typeof a; if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; return deepEq(a, b, aStack, bStack); } // Internal recursive comparison function for `isEqual`. function deepEq(a, b, aStack, bStack) { // Unwrap any wrapped objects. if (a instanceof _) a = a._wrapped; if (b instanceof _) b = b._wrapped; // Compare `[[Class]]` names. var className = toString.call(a); if (className !== toString.call(b)) return false; switch (className) { // Strings, numbers, regular expressions, dates, and booleans are compared by value. case '[object RegExp]': // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return '' + a === '' + b; case '[object Number]': // `NaN`s are equivalent, but non-reflexive. // Object(NaN) is equivalent to NaN. if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values. return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a === +b; case '[object Symbol]': return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); } var areArrays = className === '[object Array]'; if (!areArrays) { if (typeof a != 'object' || typeof b != 'object') return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } } // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. aStack = aStack || []; bStack = bStack || []; var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (aStack[length] === a) return bStack[length] === b; } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); // Recursively compare objects and arrays. if (areArrays) { // Compare array lengths to determine if a deep comparison is necessary. length = a.length; if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties. while (length--) { if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { // Deep compare objects. var _keys = keys(a), key; length = _keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality. if (keys(b).length !== length) return false; while (length--) { // Deep compare each member key = _keys[length]; if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); return true; } // Perform a deep comparison to check if two objects are equal. function isEqual(a, b) { return eq(a, b); } // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. function isEmpty(obj) { if (obj == null) return true; if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0; return keys(obj).length === 0; } // Is a given value a DOM element? function isElement(obj) { return !!(obj && obj.nodeType === 1); } // Internal function for creating a toString-based type tester. function tagTester(name) { return function(obj) { return toString.call(obj) === '[object ' + name + ']'; }; } // Is a given value an array? // Delegates to ECMA5's native Array.isArray var isArray = nativeIsArray || tagTester('Array'); // Is a given variable an object? function isObject(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; } // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet. var isArguments = tagTester('Arguments'); var isFunction = tagTester('Function'); var isString = tagTester('String'); var isNumber = tagTester('Number'); var isDate = tagTester('Date'); var isRegExp = tagTester('RegExp'); var isError = tagTester('Error'); var isSymbol = tagTester('Symbol'); var isMap = tagTester('Map'); var isWeakMap = tagTester('WeakMap'); var isSet = tagTester('Set'); var isWeakSet = tagTester('WeakSet'); // Define a fallback version of the method in browsers (ahem, IE < 9), where // there isn't any inspectable "Arguments" type. (function() { if (!isArguments(arguments)) { isArguments = function(obj) { return _has(obj, 'callee'); }; } }()); // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). var nodelist = root.document && root.document.childNodes; if ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') { isFunction = function(obj) { return typeof obj == 'function' || false; }; } // Is a given object a finite number? function isFinite(obj) { return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj)); } // Is the given value `NaN`? function isNaN(obj) { return isNumber(obj) && _isNaN(obj); } // Is a given value a boolean? function isBoolean(obj) { return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; } // Is a given value equal to null? function isNull(obj) { return obj === null; } // Is a given variable undefined? function isUndefined(obj) { return obj === void 0; } // Shortcut function for checking if an object has a given property directly // on itself (in other words, not on a prototype). function has(obj, path) { if (!isArray(path)) { return _has(obj, path); } var length = path.length; for (var i = 0; i < length; i++) { var key = path[i]; if (obj == null || !hasOwnProperty.call(obj, key)) { return false; } obj = obj[key]; } return !!length; } // Utility Functions // ----------------- // Keep the identity function around for default iteratees. function identity(value) { return value; } // Predicate-generating functions. Often useful outside of Underscore. function constant(value) { return function() { return value; }; } function noop(){} // Creates a function that, when passed an object, will traverse that object’s // properties down the given `path`, specified as an array of keys or indexes. function property(path) { if (!isArray(path)) { return shallowProperty(path); } return function(obj) { return deepGet(obj, path); }; } // Generates a function for a given object that returns a given property. function propertyOf(obj) { if (obj == null) { return function(){}; } return function(path) { return !isArray(path) ? obj[path] : deepGet(obj, path); }; } // Returns a predicate for checking whether an object has a given set of // `key:value` pairs. function matcher(attrs) { attrs = extendOwn({}, attrs); return function(obj) { return isMatch(obj, attrs); }; } // Run a function **n** times. function times(n, iteratee, context) { var accum = Array(Math.max(0, n)); iteratee = optimizeCb(iteratee, context, 1); for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; } // Return a random integer between min and max (inclusive). function random(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); } // A (possibly faster) way to get the current timestamp as an integer. var now = Date.now || function() { return new Date().getTime(); }; // List of HTML entities for escaping. var escapeMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' }; var unescapeMap = invert(escapeMap); // Functions for escaping and unescaping strings to/from HTML interpolation. function createEscaper(map) { var escaper = function(match) { return map[match]; }; // Regexes for identifying a key that needs to be escaped. var source = '(?:' + keys(map).join('|') + ')'; var testRegexp = RegExp(source); var replaceRegexp = RegExp(source, 'g'); return function(string) { string = string == null ? '' : '' + string; return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; }; } var escape = createEscaper(escapeMap); var unescape = createEscaper(unescapeMap); // Traverses the children of `obj` along `path`. If a child is a function, it // is invoked with its parent as context. Returns the value of the final // child, or `fallback` if any child is undefined. function result(obj, path, fallback) { if (!isArray(path)) path = [path]; var length = path.length; if (!length) { return isFunction(fallback) ? fallback.call(obj) : fallback; } for (var i = 0; i < length; i++) { var prop = obj == null ? void 0 : obj[path[i]]; if (prop === void 0) { prop = fallback; i = length; // Ensure we don't continue iterating. } obj = isFunction(prop) ? prop.call(obj) : prop; } return obj; } // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; function uniqueId(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; } // By default, Underscore uses ERB-style template delimiters, change the // following template settings to use alternative delimiters. var templateSettings = _.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }; // When customizing `templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\u2028': 'u2028', '\u2029': 'u2029' }; var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; var escapeChar = function(match) { return '\\' + escapes[match]; }; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. // NB: `oldSettings` only exists for backwards compatibility. function template(text, settings, oldSettings) { if (!settings && oldSettings) settings = oldSettings; settings = defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escapeRegExp, escapeChar); index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } // Adobe VMs need the match returned to produce the correct offset. return match; }); source += "';\n"; // If a variable is not specified, place data values in local scope. if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; var render; try { render = new Function(settings.variable || 'obj', '_', source); } catch (e) { e.source = source; throw e; } var template = function(data) { return render.call(this, data, _); }; // Provide the compiled source as a convenience for precompilation. var argument = settings.variable || 'obj'; template.source = 'function(' + argument + '){\n' + source + '}'; return template; } // Add a "chain" function. Start chaining a wrapped Underscore object. function chain(obj) { var instance = _(obj); instance._chain = true; return instance; } // OOP // --------------- // If Underscore is called as a function, it returns a wrapped object that // can be used OO-style. This wrapper holds altered versions of all the // underscore functions. Wrapped objects may be chained. // Helper function to continue chaining intermediate results. function chainResult(instance, obj) { return instance._chain ? _(obj).chain() : obj; } // Add your own custom functions to the Underscore object. function mixin(obj) { each(functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return chainResult(this, func.apply(_, args)); }; }); return _; } // Add all mutator Array functions to the wrapper. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { var obj = this._wrapped; method.apply(obj, arguments); if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; return chainResult(this, obj); }; }); // Add all accessor Array functions to the wrapper. each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { return chainResult(this, method.apply(this._wrapped, arguments)); }; }); // Extracts the result from a wrapped and chained object. _.prototype.value = function() { return this._wrapped; }; // Provide unwrapping proxy for some methods used in engine operations // such as arithmetic and JSON stringification. _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; _.prototype.toString = function() { return String(this._wrapped); }; var allExports = ({ 'default': _, VERSION: VERSION, iteratee: iteratee, restArguments: restArguments, each: each, forEach: each, map: map, collect: map, reduce: reduce, foldl: reduce, inject: reduce, reduceRight: reduceRight, foldr: reduceRight, find: find, detect: find, filter: filter, select: filter, reject: reject, every: every, all: every, some: some, any: some, contains: contains, includes: contains, include: contains, invoke: invoke, pluck: pluck, where: where, findWhere: findWhere, max: max, min: min, shuffle: shuffle, sample: sample, sortBy: sortBy, groupBy: groupBy, indexBy: indexBy, countBy: countBy, toArray: toArray, size: size, partition: partition, first: first, head: first, take: first, initial: initial, last: last, rest: rest, tail: rest, drop: rest, compact: compact, flatten: flatten, without: without, uniq: uniq, unique: uniq, union: union, intersection: intersection, difference: difference, unzip: unzip, zip: zip, object: object, findIndex: findIndex, findLastIndex: findLastIndex, sortedIndex: sortedIndex, indexOf: indexOf, lastIndexOf: lastIndexOf, range: range, chunk: chunk, bind: bind, partial: partial, bindAll: bindAll, memoize: memoize, delay: delay, defer: defer, throttle: throttle, debounce: debounce, wrap: wrap, negate: negate, compose: compose, after: after, before: before, once: once, keys: keys, allKeys: allKeys, values: values, mapObject: mapObject, pairs: pairs, invert: invert, functions: functions, methods: functions, extend: extend, extendOwn: extendOwn, assign: extendOwn, findKey: findKey, pick: pick, omit: omit, defaults: defaults, create: create, clone: clone, tap: tap, isMatch: isMatch, isEqual: isEqual, isEmpty: isEmpty, isElement: isElement, isArray: isArray, isObject: isObject, isArguments: isArguments, isFunction: isFunction, isString: isString, isNumber: isNumber, isDate: isDate, isRegExp: isRegExp, isError: isError, isSymbol: isSymbol, isMap: isMap, isWeakMap: isWeakMap, isSet: isSet, isWeakSet: isWeakSet, isFinite: isFinite, isNaN: isNaN, isBoolean: isBoolean, isNull: isNull, isUndefined: isUndefined, has: has, identity: identity, constant: constant, noop: noop, property: property, propertyOf: propertyOf, matcher: matcher, matches: matcher, times: times, random: random, now: now, escape: escape, unescape: unescape, result: result, uniqueId: uniqueId, templateSettings: templateSettings, template: template, chain: chain, mixin: mixin }); // Add all of the Underscore functions to the wrapper object. var _$1 = mixin(allExports); // Legacy Node.js API _$1._ = _$1; return _$1; }))); //# sourceMappingURL=underscore.js.map /***/ }), /***/ 70020: /***/ (function(__unused_webpack_module, exports) { /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ (function (global, factory) { true ? factory(exports) : 0; }(this, (function (exports) { 'use strict'; function merge() { for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { sets[_key] = arguments[_key]; } if (sets.length > 1) { sets[0] = sets[0].slice(0, -1); var xl = sets.length - 1; for (var x = 1; x < xl; ++x) { sets[x] = sets[x].slice(1, -1); } sets[xl] = sets[xl].slice(1); return sets.join(''); } else { return sets[0]; } } function subexp(str) { return "(?:" + str + ")"; } function typeOf(o) { return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); } function toUpperCase(str) { return str.toUpperCase(); } function toArray(obj) { return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; } function assign(target, source) { var obj = target; if (source) { for (var key in source) { obj[key] = source[key]; } } return obj; } function buildExps(isIRI) { var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16 IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::" IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; return { NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), UNRESERVED: new RegExp(UNRESERVED$$, "g"), OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules }; } var URI_PROTOCOL = buildExps(false); var IRI_PROTOCOL = buildExps(true); var slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }; /** Highest positive signed 32-bit float value */ var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ var base = 36; var tMin = 1; var tMax = 26; var skew = 38; var damp = 700; var initialBias = 72; var initialN = 128; // 0x80 var delimiter = '-'; // '\x2D' /** Regular expressions */ var regexPunycode = /^xn--/; var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators /** Error messages */ var errors = { 'overflow': 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }; /** Convenience shortcuts */ var baseMinusTMin = base - tMin; var floor = Math.floor; var stringFromCharCode = String.fromCharCode; /*--------------------------------------------------------------------------*/ /** * A generic error utility function. * @private * @param {String} type The error type. * @returns {Error} Throws a `RangeError` with the applicable error message. */ function error$1(type) { throw new RangeError(errors[type]); } /** * A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function. */ function map(array, fn) { var result = []; var length = array.length; while (length--) { result[length] = fn(array[length]); } return result; } /** * A simple `Array#map`-like wrapper to work with domain name strings or email * addresses. * @private * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8 compatibility. See #17. string = string.replace(regexSeparators, '\x2E'); var labels = string.split('.'); var encoded = map(labels, fn).join('.'); return result + encoded; } /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * @see `punycode.ucs2.encode` * @see * @memberOf punycode.ucs2 * @name decode * @param {String} string The Unicode input string (UCS-2). * @returns {Array} The new array of code points. */ function ucs2decode(string) { var output = []; var counter = 0; var length = string.length; while (counter < length) { var value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // It's a high surrogate, and there is a next character. var extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // It's an unmatched surrogate; only append this code unit, in case the // next code unit is the high surrogate of a surrogate pair. output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param {Array} codePoints The array of numeric code points. * @returns {String} The new Unicode string (UCS-2). */ var ucs2encode = function ucs2encode(array) { return String.fromCodePoint.apply(String, toConsumableArray(array)); }; /** * Converts a basic code point into a digit/integer. * @see `digitToBasic()` * @private * @param {Number} codePoint The basic numeric code point value. * @returns {Number} The numeric value of a basic code point (for use in * representing integers) in the range `0` to `base - 1`, or `base` if * the code point does not represent a value. */ var basicToDigit = function basicToDigit(codePoint) { if (codePoint - 0x30 < 0x0A) { return codePoint - 0x16; } if (codePoint - 0x41 < 0x1A) { return codePoint - 0x41; } if (codePoint - 0x61 < 0x1A) { return codePoint - 0x61; } return base; }; /** * Converts a digit/integer into a basic code point. * @see `basicToDigit()` * @private * @param {Number} digit The numeric value of a basic code point. * @returns {Number} The basic code point whose value (when used for * representing integers) is `digit`, which needs to be in the range * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is * used; else, the lowercase form is used. The behavior is undefined * if `flag` is non-zero and `digit` has no uppercase form. */ var digitToBasic = function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); }; /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 * @private */ var adapt = function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; /** * Converts a Punycode string of ASCII-only symbols to a string of Unicode * symbols. * @memberOf punycode * @param {String} input The Punycode string of ASCII-only symbols. * @returns {String} The resulting string of Unicode symbols. */ var decode = function decode(input) { // Don't use UCS-2. var output = []; var inputLength = input.length; var i = 0; var n = initialN; var bias = initialBias; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the output. var basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (var j = 0; j < basic; ++j) { // if it's not a basic code point if (input.charCodeAt(j) >= 0x80) { error$1('not-basic'); } output.push(input.charCodeAt(j)); } // Main decoding loop: start just after the last delimiter if any basic code // points were copied; start at the beginning otherwise. for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ // `index` is the index of the next character to be consumed. // Decode a generalized variable-length integer into `delta`, // which gets added to `i`. The overflow checking is easier // if we increase `i` as we go, then subtract off its starting // value at the end to obtain `delta`. var oldi = i; for (var w = 1, k = base;; /* no condition */k += base) { if (index >= inputLength) { error$1('invalid-input'); } var digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error$1('overflow'); } i += digit * w; var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (digit < t) { break; } var baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error$1('overflow'); } w *= baseMinusT; } var out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, // incrementing `n` each time, so we'll fix that now: if (floor(i / out) > maxInt - n) { error$1('overflow'); } n += floor(i / out); i %= out; // Insert `n` at position `i` of the output. output.splice(i++, 0, n); } return String.fromCodePoint.apply(String, output); }; /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. */ var encode = function encode(input) { var output = []; // Convert the input in UCS-2 to an array of Unicode code points. input = ucs2decode(input); // Cache the length. var inputLength = input.length; // Initialize the state. var n = initialN; var delta = 0; var bias = initialBias; // Handle the basic code points. var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _currentValue2 = _step.value; if (_currentValue2 < 0x80) { output.push(stringFromCharCode(_currentValue2)); } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } var basicLength = output.length; var handledCPCount = basicLength; // `handledCPCount` is the number of code points that have been handled; // `basicLength` is the number of basic code points. // Finish the basic string with a delimiter unless it's empty. if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next // larger one: var m = maxInt; var _iteratorNormalCompletion2 = true; var _didIteratorError2 = false; var _iteratorError2 = undefined; try { for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { var currentValue = _step2.value; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's state to , // but guard against overflow. } catch (err) { _didIteratorError2 = true; _iteratorError2 = err; } finally { try { if (!_iteratorNormalCompletion2 && _iterator2.return) { _iterator2.return(); } } finally { if (_didIteratorError2) { throw _iteratorError2; } } } var handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error$1('overflow'); } delta += (m - n) * handledCPCountPlusOne; n = m; var _iteratorNormalCompletion3 = true; var _didIteratorError3 = false; var _iteratorError3 = undefined; try { for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { var _currentValue = _step3.value; if (_currentValue < n && ++delta > maxInt) { error$1('overflow'); } if (_currentValue == n) { // Represent delta as a generalized variable-length integer. var q = delta; for (var k = base;; /* no condition */k += base) { var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) { break; } var qMinusT = q - t; var baseMinusT = base - t; output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } } catch (err) { _didIteratorError3 = true; _iteratorError3 = err; } finally { try { if (!_iteratorNormalCompletion3 && _iterator3.return) { _iterator3.return(); } } finally { if (_didIteratorError3) { throw _iteratorError3; } } } ++delta; ++n; } return output.join(''); }; /** * Converts a Punycode string representing a domain name or an email address * to Unicode. Only the Punycoded parts of the input will be converted, i.e. * it doesn't matter if you call it on a string that has already been * converted to Unicode. * @memberOf punycode * @param {String} input The Punycoded domain name or email address to * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ var toUnicode = function toUnicode(input) { return mapDomain(input, function (string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); }; /** * Converts a Unicode string representing a domain name or an email address to * Punycode. Only the non-ASCII parts of the domain name will be converted, * i.e. it doesn't matter if you call it with a domain that's already in * ASCII. * @memberOf punycode * @param {String} input The domain name or email address to convert, as a * Unicode string. * @returns {String} The Punycode representation of the given domain name or * email address. */ var toASCII = function toASCII(input) { return mapDomain(input, function (string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); }; /*--------------------------------------------------------------------------*/ /** Define the public API */ var punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ 'version': '2.1.0', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see * @memberOf punycode * @type Object */ 'ucs2': { 'decode': ucs2decode, 'encode': ucs2encode }, 'decode': decode, 'encode': encode, 'toASCII': toASCII, 'toUnicode': toUnicode }; /** * URI.js * * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. * @author Gary Court * @see http://github.com/garycourt/uri-js */ /** * Copyright 2011 Gary Court. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of Gary Court. */ var SCHEMES = {}; function pctEncChar(chr) { var c = chr.charCodeAt(0); var e = void 0; if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); return e; } function pctDecChars(str) { var newStr = ""; var i = 0; var il = str.length; while (i < il) { var c = parseInt(str.substr(i + 1, 2), 16); if (c < 128) { newStr += String.fromCharCode(c); i += 3; } else if (c >= 194 && c < 224) { if (il - i >= 6) { var c2 = parseInt(str.substr(i + 4, 2), 16); newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); } else { newStr += str.substr(i, 6); } i += 6; } else if (c >= 224) { if (il - i >= 9) { var _c = parseInt(str.substr(i + 4, 2), 16); var c3 = parseInt(str.substr(i + 7, 2), 16); newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); } else { newStr += str.substr(i, 9); } i += 9; } else { newStr += str.substr(i, 3); i += 3; } } return newStr; } function _normalizeComponentEncoding(components, protocol) { function decodeUnreserved(str) { var decStr = pctDecChars(str); return !decStr.match(protocol.UNRESERVED) ? str : decStr; } if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); return components; } function _stripLeadingZeros(str) { return str.replace(/^0*(.*)/, "$1") || "0"; } function _normalizeIPv4(host, protocol) { var matches = host.match(protocol.IPV4ADDRESS) || []; var _matches = slicedToArray(matches, 2), address = _matches[1]; if (address) { return address.split(".").map(_stripLeadingZeros).join("."); } else { return host; } } function _normalizeIPv6(host, protocol) { var matches = host.match(protocol.IPV6ADDRESS) || []; var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; if (address) { var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; var lastFields = last.split(":").map(_stripLeadingZeros); var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); var fieldCount = isLastFieldIPv4Address ? 7 : 8; var lastFieldsStart = lastFields.length - fieldCount; var fields = Array(fieldCount); for (var x = 0; x < fieldCount; ++x) { fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; } if (isLastFieldIPv4Address) { fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); } var allZeroFields = fields.reduce(function (acc, field, index) { if (!field || field === "0") { var lastLongest = acc[acc.length - 1]; if (lastLongest && lastLongest.index + lastLongest.length === index) { lastLongest.length++; } else { acc.push({ index: index, length: 1 }); } } return acc; }, []); var longestZeroFields = allZeroFields.sort(function (a, b) { return b.length - a.length; })[0]; var newHost = void 0; if (longestZeroFields && longestZeroFields.length > 1) { var newFirst = fields.slice(0, longestZeroFields.index); var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); newHost = newFirst.join(":") + "::" + newLast.join(":"); } else { newHost = fields.join(":"); } if (zone) { newHost += "%" + zone; } return newHost; } else { return host; } } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; function parse(uriString) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; var matches = uriString.match(URI_PARSE); if (matches) { if (NO_MATCH_IS_UNDEFINED) { //store each component components.scheme = matches[1]; components.userinfo = matches[3]; components.host = matches[4]; components.port = parseInt(matches[5], 10); components.path = matches[6] || ""; components.query = matches[7]; components.fragment = matches[8]; //fix port number if (isNaN(components.port)) { components.port = matches[5]; } } else { //IE FIX for improper RegExp matching //store each component components.scheme = matches[1] || undefined; components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; components.port = parseInt(matches[5], 10); components.path = matches[6] || ""; components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; //fix port number if (isNaN(components.port)) { components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; } } if (components.host) { //normalize IP hosts components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); } //determine reference type if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { components.reference = "same-document"; } else if (components.scheme === undefined) { components.reference = "relative"; } else if (components.fragment === undefined) { components.reference = "absolute"; } else { components.reference = "uri"; } //check for reference errors if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { components.error = components.error || "URI is not a " + options.reference + " reference."; } //find scheme handler var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; //check if scheme can't handle IRIs if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { //if host component is a domain name if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { //convert Unicode IDN -> ASCII IDN try { components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); } catch (e) { components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; } } //convert IRI -> URI _normalizeComponentEncoding(components, URI_PROTOCOL); } else { //normalize encodings _normalizeComponentEncoding(components, protocol); } //perform scheme specific parsing if (schemeHandler && schemeHandler.parse) { schemeHandler.parse(components, options); } } else { components.error = components.error || "URI can not be parsed."; } return components; } function _recomposeAuthority(components, options) { var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; var uriTokens = []; if (components.userinfo !== undefined) { uriTokens.push(components.userinfo); uriTokens.push("@"); } if (components.host !== undefined) { //normalize IP hosts, add brackets and escape zone separator for IPv6 uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; })); } if (typeof components.port === "number") { uriTokens.push(":"); uriTokens.push(components.port.toString(10)); } return uriTokens.length ? uriTokens.join("") : undefined; } var RDS1 = /^\.\.?\//; var RDS2 = /^\/\.(\/|$)/; var RDS3 = /^\/\.\.(\/|$)/; var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; function removeDotSegments(input) { var output = []; while (input.length) { if (input.match(RDS1)) { input = input.replace(RDS1, ""); } else if (input.match(RDS2)) { input = input.replace(RDS2, "/"); } else if (input.match(RDS3)) { input = input.replace(RDS3, "/"); output.pop(); } else if (input === "." || input === "..") { input = ""; } else { var im = input.match(RDS5); if (im) { var s = im[0]; input = input.slice(s.length); output.push(s); } else { throw new Error("Unexpected dot segment condition"); } } } return output.join(""); } function serialize(components) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; var uriTokens = []; //find scheme handler var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; //perform scheme specific serialization if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); if (components.host) { //if host component is an IPv6 address if (protocol.IPV6ADDRESS.test(components.host)) {} //TODO: normalize IPv6 address as per RFC 5952 //if host component is a domain name else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { //convert IDN via punycode try { components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); } catch (e) { components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; } } } //normalize encoding _normalizeComponentEncoding(components, protocol); if (options.reference !== "suffix" && components.scheme) { uriTokens.push(components.scheme); uriTokens.push(":"); } var authority = _recomposeAuthority(components, options); if (authority !== undefined) { if (options.reference !== "suffix") { uriTokens.push("//"); } uriTokens.push(authority); if (components.path && components.path.charAt(0) !== "/") { uriTokens.push("/"); } } if (components.path !== undefined) { var s = components.path; if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { s = removeDotSegments(s); } if (authority === undefined) { s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" } uriTokens.push(s); } if (components.query !== undefined) { uriTokens.push("?"); uriTokens.push(components.query); } if (components.fragment !== undefined) { uriTokens.push("#"); uriTokens.push(components.fragment); } return uriTokens.join(""); //merge tokens into a string } function resolveComponents(base, relative) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { base = parse(serialize(base, options), options); //normalize base components relative = parse(serialize(relative, options), options); //normalize relative components } options = options || {}; if (!options.tolerant && relative.scheme) { target.scheme = relative.scheme; //target.authority = relative.authority; target.userinfo = relative.userinfo; target.host = relative.host; target.port = relative.port; target.path = removeDotSegments(relative.path || ""); target.query = relative.query; } else { if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { //target.authority = relative.authority; target.userinfo = relative.userinfo; target.host = relative.host; target.port = relative.port; target.path = removeDotSegments(relative.path || ""); target.query = relative.query; } else { if (!relative.path) { target.path = base.path; if (relative.query !== undefined) { target.query = relative.query; } else { target.query = base.query; } } else { if (relative.path.charAt(0) === "/") { target.path = removeDotSegments(relative.path); } else { if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { target.path = "/" + relative.path; } else if (!base.path) { target.path = relative.path; } else { target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; } target.path = removeDotSegments(target.path); } target.query = relative.query; } //target.authority = base.authority; target.userinfo = base.userinfo; target.host = base.host; target.port = base.port; } target.scheme = base.scheme; } target.fragment = relative.fragment; return target; } function resolve(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: 'null' }, options); return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize(uri, options) { if (typeof uri === "string") { uri = serialize(parse(uri, options), options); } else if (typeOf(uri) === "object") { uri = parse(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { uriA = serialize(parse(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { uriB = serialize(parse(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } return uriA === uriB; } function escapeComponent(str, options) { return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); } function unescapeComponent(str, options) { return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); } var handler = { scheme: "http", domainHost: true, parse: function parse(components, options) { //report missing host if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } return components; }, serialize: function serialize(components, options) { //normalize the default port if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { components.port = undefined; } //normalize the empty path if (!components.path) { components.path = "/"; } //NOTE: We do not parse query strings for HTTP URIs //as WWW Form Url Encoded query strings are part of the HTML4+ spec, //and not the HTTP spec. return components; } }; var handler$1 = { scheme: "https", domainHost: handler.domainHost, parse: handler.parse, serialize: handler.serialize }; var O = {}; var isIRI = true; //RFC 3986 var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = //const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; //const WSP$$ = "[\\x20\\x09]"; //const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) //const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext //const VCHAR$$ = "[\\x21-\\x7E]"; //const WSP$$ = "[\\x20\\x09]"; //const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext //const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); //const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); //const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; var UNRESERVED = new RegExp(UNRESERVED$$, "g"); var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); var NOT_HFVALUE = NOT_HFNAME; function decodeUnreserved(str) { var decStr = pctDecChars(str); return !decStr.match(UNRESERVED) ? str : decStr; } var handler$2 = { scheme: "mailto", parse: function parse$$1(components, options) { var mailtoComponents = components; var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; mailtoComponents.path = undefined; if (mailtoComponents.query) { var unknownHeaders = false; var headers = {}; var hfields = mailtoComponents.query.split("&"); for (var x = 0, xl = hfields.length; x < xl; ++x) { var hfield = hfields[x].split("="); switch (hfield[0]) { case "to": var toAddrs = hfield[1].split(","); for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { to.push(toAddrs[_x]); } break; case "subject": mailtoComponents.subject = unescapeComponent(hfield[1], options); break; case "body": mailtoComponents.body = unescapeComponent(hfield[1], options); break; default: unknownHeaders = true; headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); break; } } if (unknownHeaders) mailtoComponents.headers = headers; } mailtoComponents.query = undefined; for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { var addr = to[_x2].split("@"); addr[0] = unescapeComponent(addr[0]); if (!options.unicodeSupport) { //convert Unicode IDN -> ASCII IDN try { addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); } catch (e) { mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; } } else { addr[1] = unescapeComponent(addr[1], options).toLowerCase(); } to[_x2] = addr.join("@"); } return mailtoComponents; }, serialize: function serialize$$1(mailtoComponents, options) { var components = mailtoComponents; var to = toArray(mailtoComponents.to); if (to) { for (var x = 0, xl = to.length; x < xl; ++x) { var toAddr = String(to[x]); var atIdx = toAddr.lastIndexOf("@"); var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); var domain = toAddr.slice(atIdx + 1); //convert IDN via punycode try { domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); } catch (e) { components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; } to[x] = localPart + "@" + domain; } components.path = to.join(","); } var headers = mailtoComponents.headers = mailtoComponents.headers || {}; if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; if (mailtoComponents.body) headers["body"] = mailtoComponents.body; var fields = []; for (var name in headers) { if (headers[name] !== O[name]) { fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); } } if (fields.length) { components.query = fields.join("&"); } return components; } }; var URN_PARSE = /^([^\:]+)\:(.*)/; //RFC 2141 var handler$3 = { scheme: "urn", parse: function parse$$1(components, options) { var matches = components.path && components.path.match(URN_PARSE); var urnComponents = components; if (matches) { var scheme = options.scheme || urnComponents.scheme || "urn"; var nid = matches[1].toLowerCase(); var nss = matches[2]; var urnScheme = scheme + ":" + (options.nid || nid); var schemeHandler = SCHEMES[urnScheme]; urnComponents.nid = nid; urnComponents.nss = nss; urnComponents.path = undefined; if (schemeHandler) { urnComponents = schemeHandler.parse(urnComponents, options); } } else { urnComponents.error = urnComponents.error || "URN can not be parsed."; } return urnComponents; }, serialize: function serialize$$1(urnComponents, options) { var scheme = options.scheme || urnComponents.scheme || "urn"; var nid = urnComponents.nid; var urnScheme = scheme + ":" + (options.nid || nid); var schemeHandler = SCHEMES[urnScheme]; if (schemeHandler) { urnComponents = schemeHandler.serialize(urnComponents, options); } var uriComponents = urnComponents; var nss = urnComponents.nss; uriComponents.path = (nid || options.nid) + ":" + nss; return uriComponents; } }; var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; //RFC 4122 var handler$4 = { scheme: "urn:uuid", parse: function parse(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = undefined; if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { uuidComponents.error = uuidComponents.error || "UUID is not valid."; } return uuidComponents; }, serialize: function serialize(uuidComponents, options) { var urnComponents = uuidComponents; //normalize UUID urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); return urnComponents; } }; SCHEMES[handler.scheme] = handler; SCHEMES[handler$1.scheme] = handler$1; SCHEMES[handler$2.scheme] = handler$2; SCHEMES[handler$3.scheme] = handler$3; SCHEMES[handler$4.scheme] = handler$4; exports.SCHEMES = SCHEMES; exports.pctEncChar = pctEncChar; exports.pctDecChars = pctDecChars; exports.parse = parse; exports.removeDotSegments = removeDotSegments; exports.serialize = serialize; exports.resolveComponents = resolveComponents; exports.resolve = resolve; exports.normalize = normalize; exports.equal = equal; exports.escapeComponent = escapeComponent; exports.unescapeComponent = unescapeComponent; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=uri.all.js.map /***/ }), /***/ 12821: /***/ (function(module) { (function (name, context, definition) { if ( true && module.exports) module.exports = definition(); else if (typeof define === 'function' && define.amd) define(definition); else context[name] = definition(); })('urljoin', this, function () { function normalize (strArray) { var resultArray = []; if (strArray.length === 0) { return ''; } if (typeof strArray[0] !== 'string') { throw new TypeError('Url must be a string. Received ' + strArray[0]); } // If the first part is a plain protocol, we combine it with the next part. if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) { var first = strArray.shift(); strArray[0] = first + strArray[0]; } // There must be two or three slashes in the file protocol, two slashes in anything else. if (strArray[0].match(/^file:\/\/\//)) { strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, '$1:///'); } else { strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, '$1://'); } for (var i = 0; i < strArray.length; i++) { var component = strArray[i]; if (typeof component !== 'string') { throw new TypeError('Url must be a string. Received ' + component); } if (component === '') { continue; } if (i > 0) { // Removing the starting slashes for each component but the first. component = component.replace(/^[\/]+/, ''); } if (i < strArray.length - 1) { // Removing the ending slashes for each component but the last. component = component.replace(/[\/]+$/, ''); } else { // For the last component we will combine multiple slashes to a single one. component = component.replace(/[\/]+$/, '/'); } resultArray.push(component); } var str = resultArray.join('/'); // Each input component is now separated by a single slash except the possible first plain protocol part. // remove trailing slash before parameters or hash str = str.replace(/\/(\?|&|#[^!])/g, '$1'); // replace ? in parameters with & var parts = str.split('?'); str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&'); return str; } return function () { var input; if (typeof arguments[0] === 'object') { input = arguments[0]; } else { input = [].slice.call(arguments); } return normalize(input); }; }); /***/ }), /***/ 13194: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const url = __webpack_require__(78835); const prependHttp = __webpack_require__(56143); module.exports = (input, options) => { if (typeof input !== 'string') { throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof input}\` instead.`); } const finalUrl = prependHttp(input, Object.assign({https: true}, options)); return url.parse(finalUrl); }; /***/ }), /***/ 92707: /***/ ((module) => { /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var i = 0; i < 256; ++i) { byteToHex[i] = (i + 0x100).toString(16).substr(1); } function bytesToUuid(buf, offset) { var i = offset || 0; var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 return ([ bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]] ]).join(''); } module.exports = bytesToUuid; /***/ }), /***/ 15859: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Unique ID creation requires a high quality random # generator. In node.js // this is pretty straight-forward - we use the crypto API. var crypto = __webpack_require__(33373); module.exports = function nodeRNG() { return crypto.randomBytes(16); }; /***/ }), /***/ 80824: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var rng = __webpack_require__(15859); var bytesToUuid = __webpack_require__(92707); function v4(options, buf, offset) { var i = buf && offset || 0; if (typeof(options) == 'string') { buf = options === 'binary' ? new Array(16) : null; options = null; } options = options || {}; var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = (rnds[6] & 0x0f) | 0x40; rnds[8] = (rnds[8] & 0x3f) | 0x80; // Copy bytes to buffer, if provided if (buf) { for (var ii = 0; ii < 16; ++ii) { buf[i + ii] = rnds[ii]; } } return buf || bytesToUuid(rnds); } module.exports = v4; /***/ }), /***/ 81692: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* * verror.js: richer JavaScript errors */ var mod_assertplus = __webpack_require__(66631); var mod_util = __webpack_require__(31669); var mod_extsprintf = __webpack_require__(41508); var mod_isError = __webpack_require__(95898)/* .isError */ .VZ; var sprintf = mod_extsprintf.sprintf; /* * Public interface */ /* So you can 'var VError = require('verror')' */ module.exports = VError; /* For compatibility */ VError.VError = VError; /* Other exported classes */ VError.SError = SError; VError.WError = WError; VError.MultiError = MultiError; /* * Common function used to parse constructor arguments for VError, WError, and * SError. Named arguments to this function: * * strict force strict interpretation of sprintf arguments, even * if the options in "argv" don't say so * * argv error's constructor arguments, which are to be * interpreted as described in README.md. For quick * reference, "argv" has one of the following forms: * * [ sprintf_args... ] (argv[0] is a string) * [ cause, sprintf_args... ] (argv[0] is an Error) * [ options, sprintf_args... ] (argv[0] is an object) * * This function normalizes these forms, producing an object with the following * properties: * * options equivalent to "options" in third form. This will never * be a direct reference to what the caller passed in * (i.e., it may be a shallow copy), so it can be freely * modified. * * shortmessage result of sprintf(sprintf_args), taking options.strict * into account as described in README.md. */ function parseConstructorArguments(args) { var argv, options, sprintf_args, shortmessage, k; mod_assertplus.object(args, 'args'); mod_assertplus.bool(args.strict, 'args.strict'); mod_assertplus.array(args.argv, 'args.argv'); argv = args.argv; /* * First, figure out which form of invocation we've been given. */ if (argv.length === 0) { options = {}; sprintf_args = []; } else if (mod_isError(argv[0])) { options = { 'cause': argv[0] }; sprintf_args = argv.slice(1); } else if (typeof (argv[0]) === 'object') { options = {}; for (k in argv[0]) { options[k] = argv[0][k]; } sprintf_args = argv.slice(1); } else { mod_assertplus.string(argv[0], 'first argument to VError, SError, or WError ' + 'constructor must be a string, object, or Error'); options = {}; sprintf_args = argv; } /* * Now construct the error's message. * * extsprintf (which we invoke here with our caller's arguments in order * to construct this Error's message) is strict in its interpretation of * values to be processed by the "%s" specifier. The value passed to * extsprintf must actually be a string or something convertible to a * String using .toString(). Passing other values (notably "null" and * "undefined") is considered a programmer error. The assumption is * that if you actually want to print the string "null" or "undefined", * then that's easy to do that when you're calling extsprintf; on the * other hand, if you did NOT want that (i.e., there's actually a bug * where the program assumes some variable is non-null and tries to * print it, which might happen when constructing a packet or file in * some specific format), then it's better to stop immediately than * produce bogus output. * * However, sometimes the bug is only in the code calling VError, and a * programmer might prefer to have the error message contain "null" or * "undefined" rather than have the bug in the error path crash the * program (making the first bug harder to identify). For that reason, * by default VError converts "null" or "undefined" arguments to their * string representations and passes those to extsprintf. Programmers * desiring the strict behavior can use the SError class or pass the * "strict" option to the VError constructor. */ mod_assertplus.object(options); if (!options.strict && !args.strict) { sprintf_args = sprintf_args.map(function (a) { return (a === null ? 'null' : a === undefined ? 'undefined' : a); }); } if (sprintf_args.length === 0) { shortmessage = ''; } else { shortmessage = sprintf.apply(null, sprintf_args); } return ({ 'options': options, 'shortmessage': shortmessage }); } /* * See README.md for reference documentation. */ function VError() { var args, obj, parsed, cause, ctor, message, k; args = Array.prototype.slice.call(arguments, 0); /* * This is a regrettable pattern, but JavaScript's built-in Error class * is defined to work this way, so we allow the constructor to be called * without "new". */ if (!(this instanceof VError)) { obj = Object.create(VError.prototype); VError.apply(obj, arguments); return (obj); } /* * For convenience and backwards compatibility, we support several * different calling forms. Normalize them here. */ parsed = parseConstructorArguments({ 'argv': args, 'strict': false }); /* * If we've been given a name, apply it now. */ if (parsed.options.name) { mod_assertplus.string(parsed.options.name, 'error\'s "name" must be a string'); this.name = parsed.options.name; } /* * For debugging, we keep track of the original short message (attached * this Error particularly) separately from the complete message (which * includes the messages of our cause chain). */ this.jse_shortmsg = parsed.shortmessage; message = parsed.shortmessage; /* * If we've been given a cause, record a reference to it and update our * message appropriately. */ cause = parsed.options.cause; if (cause) { mod_assertplus.ok(mod_isError(cause), 'cause is not an Error'); this.jse_cause = cause; if (!parsed.options.skipCauseMessage) { message += ': ' + cause.message; } } /* * If we've been given an object with properties, shallow-copy that * here. We don't want to use a deep copy in case there are non-plain * objects here, but we don't want to use the original object in case * the caller modifies it later. */ this.jse_info = {}; if (parsed.options.info) { for (k in parsed.options.info) { this.jse_info[k] = parsed.options.info[k]; } } this.message = message; Error.call(this, message); if (Error.captureStackTrace) { ctor = parsed.options.constructorOpt || this.constructor; Error.captureStackTrace(this, ctor); } return (this); } mod_util.inherits(VError, Error); VError.prototype.name = 'VError'; VError.prototype.toString = function ve_toString() { var str = (this.hasOwnProperty('name') && this.name || this.constructor.name || this.constructor.prototype.name); if (this.message) str += ': ' + this.message; return (str); }; /* * This method is provided for compatibility. New callers should use * VError.cause() instead. That method also uses the saner `null` return value * when there is no cause. */ VError.prototype.cause = function ve_cause() { var cause = VError.cause(this); return (cause === null ? undefined : cause); }; /* * Static methods * * These class-level methods are provided so that callers can use them on * instances of Errors that are not VErrors. New interfaces should be provided * only using static methods to eliminate the class of programming mistake where * people fail to check whether the Error object has the corresponding methods. */ VError.cause = function (err) { mod_assertplus.ok(mod_isError(err), 'err must be an Error'); return (mod_isError(err.jse_cause) ? err.jse_cause : null); }; VError.info = function (err) { var rv, cause, k; mod_assertplus.ok(mod_isError(err), 'err must be an Error'); cause = VError.cause(err); if (cause !== null) { rv = VError.info(cause); } else { rv = {}; } if (typeof (err.jse_info) == 'object' && err.jse_info !== null) { for (k in err.jse_info) { rv[k] = err.jse_info[k]; } } return (rv); }; VError.findCauseByName = function (err, name) { var cause; mod_assertplus.ok(mod_isError(err), 'err must be an Error'); mod_assertplus.string(name, 'name'); mod_assertplus.ok(name.length > 0, 'name cannot be empty'); for (cause = err; cause !== null; cause = VError.cause(cause)) { mod_assertplus.ok(mod_isError(cause)); if (cause.name == name) { return (cause); } } return (null); }; VError.hasCauseWithName = function (err, name) { return (VError.findCauseByName(err, name) !== null); }; VError.fullStack = function (err) { mod_assertplus.ok(mod_isError(err), 'err must be an Error'); var cause = VError.cause(err); if (cause) { return (err.stack + '\ncaused by: ' + VError.fullStack(cause)); } return (err.stack); }; VError.errorFromList = function (errors) { mod_assertplus.arrayOfObject(errors, 'errors'); if (errors.length === 0) { return (null); } errors.forEach(function (e) { mod_assertplus.ok(mod_isError(e)); }); if (errors.length == 1) { return (errors[0]); } return (new MultiError(errors)); }; VError.errorForEach = function (err, func) { mod_assertplus.ok(mod_isError(err), 'err must be an Error'); mod_assertplus.func(func, 'func'); if (err instanceof MultiError) { err.errors().forEach(function iterError(e) { func(e); }); } else { func(err); } }; /* * SError is like VError, but stricter about types. You cannot pass "null" or * "undefined" as string arguments to the formatter. */ function SError() { var args, obj, parsed, options; args = Array.prototype.slice.call(arguments, 0); if (!(this instanceof SError)) { obj = Object.create(SError.prototype); SError.apply(obj, arguments); return (obj); } parsed = parseConstructorArguments({ 'argv': args, 'strict': true }); options = parsed.options; VError.call(this, options, '%s', parsed.shortmessage); return (this); } /* * We don't bother setting SError.prototype.name because once constructed, * SErrors are just like VErrors. */ mod_util.inherits(SError, VError); /* * Represents a collection of errors for the purpose of consumers that generally * only deal with one error. Callers can extract the individual errors * contained in this object, but may also just treat it as a normal single * error, in which case a summary message will be printed. */ function MultiError(errors) { mod_assertplus.array(errors, 'list of errors'); mod_assertplus.ok(errors.length > 0, 'must be at least one error'); this.ase_errors = errors; VError.call(this, { 'cause': errors[0] }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); } mod_util.inherits(MultiError, VError); MultiError.prototype.name = 'MultiError'; MultiError.prototype.errors = function me_errors() { return (this.ase_errors.slice(0)); }; /* * See README.md for reference details. */ function WError() { var args, obj, parsed, options; args = Array.prototype.slice.call(arguments, 0); if (!(this instanceof WError)) { obj = Object.create(WError.prototype); WError.apply(obj, args); return (obj); } parsed = parseConstructorArguments({ 'argv': args, 'strict': false }); options = parsed.options; options['skipCauseMessage'] = true; VError.call(this, options, '%s', parsed.shortmessage); return (this); } mod_util.inherits(WError, VError); WError.prototype.name = 'WError'; WError.prototype.toString = function we_toString() { var str = (this.hasOwnProperty('name') && this.name || this.constructor.name || this.constructor.prototype.name); if (this.message) str += ': ' + this.message; if (this.jse_cause && this.jse_cause.message) str += '; caused by ' + this.jse_cause.toString(); return (str); }; /* * For purely historical reasons, WError's cause() function allows you to set * the cause. */ WError.prototype.cause = function we_cause(c) { if (mod_isError(c)) this.jse_cause = c; return (this.jse_cause); }; /***/ }), /***/ 41508: /***/ ((__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(ofmt) { 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); /* variadic arguments used to fill in conversion specifiers */ var args = Array.prototype.slice.call(arguments, 1); /* remaining format string */ var fmt = ofmt; /* components of the current conversion specifier */ var flags, width, precision, conversion; var left, pad, sign, arg, match; /* return value */ var ret = ''; /* current variadic argument (1-based) */ var argn = 1; /* 0-based position in the format string that we've read */ var posn = 0; /* 1-based position in the format string of the current conversion */ var convposn; /* current conversion specifier */ var curconv; mod_assert.equal('string', typeof (fmt), 'first argument must be a format string'); while ((match = re.exec(fmt)) !== null) { ret += match[1]; fmt = fmt.substring(match[0].length); /* * Update flags related to the current conversion specifier's * position so that we can report clear error messages. */ curconv = match[0].substring(match[1].length); convposn = posn + match[1].length + 1; posn += 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 (jsError(ofmt, convposn, curconv, 'has no matching argument ' + '(too few arguments passed)')); } arg = args.shift(); argn++; if (flags.match(/[\' #]/)) { throw (jsError(ofmt, convposn, curconv, 'uses unsupported flags')); } if (precision.length > 0) { throw (jsError(ofmt, convposn, curconv, 'uses 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 (jsError(ofmt, convposn, curconv, 'attempted to print undefined or null ' + 'as a string (argument ' + argn + ' to ' + 'sprintf)')); } 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 (jsError(ofmt, convposn, curconv, 'is not supported')); } } ret += fmt; return (ret); } function jsError(fmtstr, convposn, curconv, reason) { mod_assert.equal(typeof (fmtstr), 'string'); mod_assert.equal(typeof (curconv), 'string'); mod_assert.equal(typeof (convposn), 'number'); mod_assert.equal(typeof (reason), 'string'); return (new Error('format string "' + fmtstr + '": conversion specifier "' + curconv + '" at character ' + convposn + ' ' + reason)); } 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); } /***/ }), /***/ 62940: /***/ ((module) => { // Returns a wrapper function that returns a wrapped callback // The wrapper function should do some stuff, and return a // presumably different callback function. // This makes sure that own properties are retained, so that // decorations and such are not lost along the way. module.exports = wrappy function wrappy (fn, cb) { if (fn && cb) return wrappy(fn)(cb) if (typeof fn !== 'function') throw new TypeError('need wrapper function') Object.keys(fn).forEach(function (k) { wrapper[k] = fn[k] }) return wrapper function wrapper() { var args = new Array(arguments.length) for (var i = 0; i < args.length; i++) { args[i] = arguments[i] } var ret = fn.apply(this, args) var cb = args[args.length-1] if (typeof ret === 'function' && ret !== cb) { Object.keys(cb).forEach(function (k) { ret[k] = cb[k] }) } return ret } } /***/ }), /***/ 88867: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const WebSocket = __webpack_require__(91518); WebSocket.Server = __webpack_require__(58887); WebSocket.Receiver = __webpack_require__(25066); WebSocket.Sender = __webpack_require__(36947); module.exports = WebSocket; /***/ }), /***/ 9436: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { EMPTY_BUFFER } = __webpack_require__(15949); /** * Merges an array of buffers into a new buffer. * * @param {Buffer[]} list The array of buffers to concat * @param {Number} totalLength The total length of buffers in the list * @return {Buffer} The resulting buffer * @public */ function concat(list, totalLength) { if (list.length === 0) return EMPTY_BUFFER; if (list.length === 1) return list[0]; const target = Buffer.allocUnsafe(totalLength); var offset = 0; for (var i = 0; i < list.length; i++) { const buf = list[i]; buf.copy(target, offset); offset += buf.length; } return target; } /** * Masks a buffer using the given mask. * * @param {Buffer} source The buffer to mask * @param {Buffer} mask The mask to use * @param {Buffer} output The buffer where to store the result * @param {Number} offset The offset at which to start writing * @param {Number} length The number of bytes to mask. * @public */ function _mask(source, mask, output, offset, length) { for (var i = 0; i < length; i++) { output[offset + i] = source[i] ^ mask[i & 3]; } } /** * Unmasks a buffer using the given mask. * * @param {Buffer} buffer The buffer to unmask * @param {Buffer} mask The mask to use * @public */ function _unmask(buffer, mask) { // Required until https://github.com/nodejs/node/issues/9006 is resolved. const length = buffer.length; for (var i = 0; i < length; i++) { buffer[i] ^= mask[i & 3]; } } /** * Converts a buffer to an `ArrayBuffer`. * * @param {Buffer} buf The buffer to convert * @return {ArrayBuffer} Converted buffer * @public */ function toArrayBuffer(buf) { if (buf.byteLength === buf.buffer.byteLength) { return buf.buffer; } return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); } /** * Converts `data` to a `Buffer`. * * @param {*} data The data to convert * @return {Buffer} The buffer * @throws {TypeError} * @public */ function toBuffer(data) { toBuffer.readOnly = true; if (Buffer.isBuffer(data)) return data; var buf; if (data instanceof ArrayBuffer) { buf = Buffer.from(data); } else if (ArrayBuffer.isView(data)) { buf = viewToBuffer(data); } else { buf = Buffer.from(data); toBuffer.readOnly = false; } return buf; } /** * Converts an `ArrayBuffer` view into a buffer. * * @param {(DataView|TypedArray)} view The view to convert * @return {Buffer} Converted view * @private */ function viewToBuffer(view) { const buf = Buffer.from(view.buffer); if (view.byteLength !== view.buffer.byteLength) { return buf.slice(view.byteOffset, view.byteOffset + view.byteLength); } return buf; } try { const bufferUtil = __webpack_require__(71269); const bu = bufferUtil.BufferUtil || bufferUtil; module.exports = { concat, mask(source, mask, output, offset, length) { if (length < 48) _mask(source, mask, output, offset, length); else bu.mask(source, mask, output, offset, length); }, toArrayBuffer, toBuffer, unmask(buffer, mask) { if (buffer.length < 32) _unmask(buffer, mask); else bu.unmask(buffer, mask); } }; } catch (e) /* istanbul ignore next */ { module.exports = { concat, mask: _mask, toArrayBuffer, toBuffer, unmask: _unmask }; } /***/ }), /***/ 15949: /***/ ((module) => { "use strict"; module.exports = { BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'], GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', kStatusCode: Symbol('status-code'), kWebSocket: Symbol('websocket'), EMPTY_BUFFER: Buffer.alloc(0), NOOP: () => {} }; /***/ }), /***/ 64561: /***/ ((module) => { "use strict"; /** * Class representing an event. * * @private */ class Event { /** * Create a new `Event`. * * @param {String} type The name of the event * @param {Object} target A reference to the target to which the event was dispatched */ constructor(type, target) { this.target = target; this.type = type; } } /** * Class representing a message event. * * @extends Event * @private */ class MessageEvent extends Event { /** * Create a new `MessageEvent`. * * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(data, target) { super('message', target); this.data = data; } } /** * Class representing a close event. * * @extends Event * @private */ class CloseEvent extends Event { /** * Create a new `CloseEvent`. * * @param {Number} code The status code explaining why the connection is being closed * @param {String} reason A human-readable string explaining why the connection is closing * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(code, reason, target) { super('close', target); this.wasClean = target._closeFrameReceived && target._closeFrameSent; this.reason = reason; this.code = code; } } /** * Class representing an open event. * * @extends Event * @private */ class OpenEvent extends Event { /** * Create a new `OpenEvent`. * * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(target) { super('open', target); } } /** * Class representing an error event. * * @extends Event * @private */ class ErrorEvent extends Event { /** * Create a new `ErrorEvent`. * * @param {Object} error The error that generated this event * @param {WebSocket} target A reference to the target to which the event was dispatched */ constructor(error, target) { super('error', target); this.message = error.message; this.error = error; } } /** * This provides methods for emulating the `EventTarget` interface. It's not * meant to be used directly. * * @mixin */ const EventTarget = { /** * Register an event listener. * * @param {String} method A string representing the event type to listen for * @param {Function} listener The listener to add * @public */ addEventListener(method, listener) { if (typeof listener !== 'function') return; function onMessage(data) { listener.call(this, new MessageEvent(data, this)); } function onClose(code, message) { listener.call(this, new CloseEvent(code, message, this)); } function onError(error) { listener.call(this, new ErrorEvent(error, this)); } function onOpen() { listener.call(this, new OpenEvent(this)); } if (method === 'message') { onMessage._listener = listener; this.on(method, onMessage); } else if (method === 'close') { onClose._listener = listener; this.on(method, onClose); } else if (method === 'error') { onError._listener = listener; this.on(method, onError); } else if (method === 'open') { onOpen._listener = listener; this.on(method, onOpen); } else { this.on(method, listener); } }, /** * Remove an event listener. * * @param {String} method A string representing the event type to remove * @param {Function} listener The listener to remove * @public */ removeEventListener(method, listener) { const listeners = this.listeners(method); for (var i = 0; i < listeners.length; i++) { if (listeners[i] === listener || listeners[i]._listener === listener) { this.removeListener(method, listeners[i]); } } } }; module.exports = EventTarget; /***/ }), /***/ 92035: /***/ ((module) => { "use strict"; // // Allowed token characters: // // '!', '#', '$', '%', '&', ''', '*', '+', '-', // '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~' // // tokenChars[32] === 0 // ' ' // tokenChars[33] === 1 // '!' // tokenChars[34] === 0 // '"' // ... // // prettier-ignore const tokenChars = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127 ]; /** * Adds an offer to the map of extension offers or a parameter to the map of * parameters. * * @param {Object} dest The map of extension offers or parameters * @param {String} name The extension or parameter name * @param {(Object|Boolean|String)} elem The extension parameters or the * parameter value * @private */ function push(dest, name, elem) { if (Object.prototype.hasOwnProperty.call(dest, name)) dest[name].push(elem); else dest[name] = [elem]; } /** * Parses the `Sec-WebSocket-Extensions` header into an object. * * @param {String} header The field value of the header * @return {Object} The parsed object * @public */ function parse(header) { const offers = {}; if (header === undefined || header === '') return offers; var params = {}; var mustUnescape = false; var isEscaping = false; var inQuotes = false; var extensionName; var paramName; var start = -1; var end = -1; for (var i = 0; i < header.length; i++) { const code = header.charCodeAt(i); if (extensionName === undefined) { if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x20 /* ' ' */ || code === 0x09 /* '\t' */) { if (end === -1 && start !== -1) end = i; } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; const name = header.slice(start, end); if (code === 0x2c) { push(offers, name, params); params = {}; } else { extensionName = name; } start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else if (paramName === undefined) { if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x20 || code === 0x09) { if (end === -1 && start !== -1) end = i; } else if (code === 0x3b || code === 0x2c) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; push(params, header.slice(start, end), true); if (code === 0x2c) { push(offers, extensionName, params); params = {}; extensionName = undefined; } start = end = -1; } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) { paramName = header.slice(start, i); start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else { // // The value of a quoted-string after unescaping must conform to the // token ABNF, so only token characters are valid. // Ref: https://tools.ietf.org/html/rfc6455#section-9.1 // if (isEscaping) { if (tokenChars[code] !== 1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (start === -1) start = i; else if (!mustUnescape) mustUnescape = true; isEscaping = false; } else if (inQuotes) { if (tokenChars[code] === 1) { if (start === -1) start = i; } else if (code === 0x22 /* '"' */ && start !== -1) { inQuotes = false; end = i; } else if (code === 0x5c /* '\' */) { isEscaping = true; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { inQuotes = true; } else if (end === -1 && tokenChars[code] === 1) { if (start === -1) start = i; } else if (start !== -1 && (code === 0x20 || code === 0x09)) { if (end === -1) end = i; } else if (code === 0x3b || code === 0x2c) { if (start === -1) { throw new SyntaxError(`Unexpected character at index ${i}`); } if (end === -1) end = i; var value = header.slice(start, end); if (mustUnescape) { value = value.replace(/\\/g, ''); mustUnescape = false; } push(params, paramName, value); if (code === 0x2c) { push(offers, extensionName, params); params = {}; extensionName = undefined; } paramName = undefined; start = end = -1; } else { throw new SyntaxError(`Unexpected character at index ${i}`); } } } if (start === -1 || inQuotes) { throw new SyntaxError('Unexpected end of input'); } if (end === -1) end = i; const token = header.slice(start, end); if (extensionName === undefined) { push(offers, token, {}); } else { if (paramName === undefined) { push(params, token, true); } else if (mustUnescape) { push(params, paramName, token.replace(/\\/g, '')); } else { push(params, paramName, token); } push(offers, extensionName, params); } return offers; } /** * Builds the `Sec-WebSocket-Extensions` header field value. * * @param {Object} extensions The map of extensions and parameters to format * @return {String} A string representing the given object * @public */ function format(extensions) { return Object.keys(extensions) .map((extension) => { var configurations = extensions[extension]; if (!Array.isArray(configurations)) configurations = [configurations]; return configurations .map((params) => { return [extension] .concat( Object.keys(params).map((k) => { var values = params[k]; if (!Array.isArray(values)) values = [values]; return values .map((v) => (v === true ? k : `${k}=${v}`)) .join('; '); }) ) .join('; '); }) .join(', '); }) .join(', '); } module.exports = { format, parse }; /***/ }), /***/ 56684: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const Limiter = __webpack_require__(56964); const zlib = __webpack_require__(78761); const bufferUtil = __webpack_require__(9436); const { kStatusCode, NOOP } = __webpack_require__(15949); const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); const EMPTY_BLOCK = Buffer.from([0x00]); const kPerMessageDeflate = Symbol('permessage-deflate'); const kTotalLength = Symbol('total-length'); const kCallback = Symbol('callback'); const kBuffers = Symbol('buffers'); const kError = Symbol('error'); // // We limit zlib concurrency, which prevents severe memory fragmentation // as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913 // and https://github.com/websockets/ws/issues/1202 // // Intentionally global; it's the global thread pool that's an issue. // let zlibLimiter; /** * permessage-deflate implementation. */ class PerMessageDeflate { /** * Creates a PerMessageDeflate instance. * * @param {Object} options Configuration options * @param {Boolean} options.serverNoContextTakeover Request/accept disabling * of server context takeover * @param {Boolean} options.clientNoContextTakeover Advertise/acknowledge * disabling of client context takeover * @param {(Boolean|Number)} options.serverMaxWindowBits Request/confirm the * use of a custom server window size * @param {(Boolean|Number)} options.clientMaxWindowBits Advertise support * for, or request, a custom client window size * @param {Object} options.zlibDeflateOptions Options to pass to zlib on deflate * @param {Object} options.zlibInflateOptions Options to pass to zlib on inflate * @param {Number} options.threshold Size (in bytes) below which messages * should not be compressed * @param {Number} options.concurrencyLimit The number of concurrent calls to * zlib * @param {Boolean} isServer Create the instance in either server or client * mode * @param {Number} maxPayload The maximum allowed message length */ constructor(options, isServer, maxPayload) { this._maxPayload = maxPayload | 0; this._options = options || {}; this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024; this._isServer = !!isServer; this._deflate = null; this._inflate = null; this.params = null; if (!zlibLimiter) { const concurrency = this._options.concurrencyLimit !== undefined ? this._options.concurrencyLimit : 10; zlibLimiter = new Limiter({ concurrency }); } } /** * @type {String} */ static get extensionName() { return 'permessage-deflate'; } /** * Create an extension negotiation offer. * * @return {Object} Extension parameters * @public */ offer() { const params = {}; if (this._options.serverNoContextTakeover) { params.server_no_context_takeover = true; } if (this._options.clientNoContextTakeover) { params.client_no_context_takeover = true; } if (this._options.serverMaxWindowBits) { params.server_max_window_bits = this._options.serverMaxWindowBits; } if (this._options.clientMaxWindowBits) { params.client_max_window_bits = this._options.clientMaxWindowBits; } else if (this._options.clientMaxWindowBits == null) { params.client_max_window_bits = true; } return params; } /** * Accept an extension negotiation offer/response. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Object} Accepted configuration * @public */ accept(configurations) { configurations = this.normalizeParams(configurations); this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations); return this.params; } /** * Releases all resources used by the extension. * * @public */ cleanup() { if (this._inflate) { this._inflate.close(); this._inflate = null; } if (this._deflate) { this._deflate.close(); this._deflate = null; } } /** * Accept an extension negotiation offer. * * @param {Array} offers The extension negotiation offers * @return {Object} Accepted configuration * @private */ acceptAsServer(offers) { const opts = this._options; const accepted = offers.find((params) => { if ( (opts.serverNoContextTakeover === false && params.server_no_context_takeover) || (params.server_max_window_bits && (opts.serverMaxWindowBits === false || (typeof opts.serverMaxWindowBits === 'number' && opts.serverMaxWindowBits > params.server_max_window_bits))) || (typeof opts.clientMaxWindowBits === 'number' && !params.client_max_window_bits) ) { return false; } return true; }); if (!accepted) { throw new Error('None of the extension offers can be accepted'); } if (opts.serverNoContextTakeover) { accepted.server_no_context_takeover = true; } if (opts.clientNoContextTakeover) { accepted.client_no_context_takeover = true; } if (typeof opts.serverMaxWindowBits === 'number') { accepted.server_max_window_bits = opts.serverMaxWindowBits; } if (typeof opts.clientMaxWindowBits === 'number') { accepted.client_max_window_bits = opts.clientMaxWindowBits; } else if ( accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false ) { delete accepted.client_max_window_bits; } return accepted; } /** * Accept the extension negotiation response. * * @param {Array} response The extension negotiation response * @return {Object} Accepted configuration * @private */ acceptAsClient(response) { const params = response[0]; if ( this._options.clientNoContextTakeover === false && params.client_no_context_takeover ) { throw new Error('Unexpected parameter "client_no_context_takeover"'); } if (!params.client_max_window_bits) { if (typeof this._options.clientMaxWindowBits === 'number') { params.client_max_window_bits = this._options.clientMaxWindowBits; } } else if ( this._options.clientMaxWindowBits === false || (typeof this._options.clientMaxWindowBits === 'number' && params.client_max_window_bits > this._options.clientMaxWindowBits) ) { throw new Error( 'Unexpected or invalid parameter "client_max_window_bits"' ); } return params; } /** * Normalize parameters. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Array} The offers/response with normalized parameters * @private */ normalizeParams(configurations) { configurations.forEach((params) => { Object.keys(params).forEach((key) => { var value = params[key]; if (value.length > 1) { throw new Error(`Parameter "${key}" must have only a single value`); } value = value[0]; if (key === 'client_max_window_bits') { if (value !== true) { const num = +value; if (!Number.isInteger(num) || num < 8 || num > 15) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } value = num; } else if (!this._isServer) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } } else if (key === 'server_max_window_bits') { const num = +value; if (!Number.isInteger(num) || num < 8 || num > 15) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } value = num; } else if ( key === 'client_no_context_takeover' || key === 'server_no_context_takeover' ) { if (value !== true) { throw new TypeError( `Invalid value for parameter "${key}": ${value}` ); } } else { throw new Error(`Unknown parameter "${key}"`); } params[key] = value; }); }); return configurations; } /** * Decompress data. Concurrency limited by async-limiter. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ decompress(data, fin, callback) { zlibLimiter.push((done) => { this._decompress(data, fin, (err, result) => { done(); callback(err, result); }); }); } /** * Compress data. Concurrency limited by async-limiter. * * @param {Buffer} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ compress(data, fin, callback) { zlibLimiter.push((done) => { this._compress(data, fin, (err, result) => { done(); callback(err, result); }); }); } /** * Decompress data. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _decompress(data, fin, callback) { const endpoint = this._isServer ? 'client' : 'server'; if (!this._inflate) { const key = `${endpoint}_max_window_bits`; const windowBits = typeof this.params[key] !== 'number' ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; this._inflate = zlib.createInflateRaw( Object.assign({}, this._options.zlibInflateOptions, { windowBits }) ); this._inflate[kPerMessageDeflate] = this; this._inflate[kTotalLength] = 0; this._inflate[kBuffers] = []; this._inflate.on('error', inflateOnError); this._inflate.on('data', inflateOnData); } this._inflate[kCallback] = callback; this._inflate.write(data); if (fin) this._inflate.write(TRAILER); this._inflate.flush(() => { const err = this._inflate[kError]; if (err) { this._inflate.close(); this._inflate = null; callback(err); return; } const data = bufferUtil.concat( this._inflate[kBuffers], this._inflate[kTotalLength] ); if (fin && this.params[`${endpoint}_no_context_takeover`]) { this._inflate.close(); this._inflate = null; } else { this._inflate[kTotalLength] = 0; this._inflate[kBuffers] = []; } callback(null, data); }); } /** * Compress data. * * @param {Buffer} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _compress(data, fin, callback) { if (!data || data.length === 0) { process.nextTick(callback, null, EMPTY_BLOCK); return; } const endpoint = this._isServer ? 'server' : 'client'; if (!this._deflate) { const key = `${endpoint}_max_window_bits`; const windowBits = typeof this.params[key] !== 'number' ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; this._deflate = zlib.createDeflateRaw( Object.assign({}, this._options.zlibDeflateOptions, { windowBits }) ); this._deflate[kTotalLength] = 0; this._deflate[kBuffers] = []; // // An `'error'` event is emitted, only on Node.js < 10.0.0, if the // `zlib.DeflateRaw` instance is closed while data is being processed. // This can happen if `PerMessageDeflate#cleanup()` is called at the wrong // time due to an abnormal WebSocket closure. // this._deflate.on('error', NOOP); this._deflate.on('data', deflateOnData); } this._deflate.write(data); this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { if (!this._deflate) { // // This `if` statement is only needed for Node.js < 10.0.0 because as of // commit https://github.com/nodejs/node/commit/5e3f5164, the flush // callback is no longer called if the deflate stream is closed while // data is being processed. // return; } var data = bufferUtil.concat( this._deflate[kBuffers], this._deflate[kTotalLength] ); if (fin) data = data.slice(0, data.length - 4); if (fin && this.params[`${endpoint}_no_context_takeover`]) { this._deflate.close(); this._deflate = null; } else { this._deflate[kTotalLength] = 0; this._deflate[kBuffers] = []; } callback(null, data); }); } } module.exports = PerMessageDeflate; /** * The listener of the `zlib.DeflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function deflateOnData(chunk) { this[kBuffers].push(chunk); this[kTotalLength] += chunk.length; } /** * The listener of the `zlib.InflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function inflateOnData(chunk) { this[kTotalLength] += chunk.length; if ( this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload ) { this[kBuffers].push(chunk); return; } this[kError] = new RangeError('Max payload size exceeded'); this[kError][kStatusCode] = 1009; this.removeListener('data', inflateOnData); this.reset(); } /** * The listener of the `zlib.InflateRaw` stream `'error'` event. * * @param {Error} err The emitted error * @private */ function inflateOnError(err) { // // There is no need to call `Zlib#close()` as the handle is automatically // closed when an error is emitted. // this[kPerMessageDeflate]._inflate = null; err[kStatusCode] = 1007; this[kCallback](err); } /***/ }), /***/ 25066: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { Writable } = __webpack_require__(92413); const PerMessageDeflate = __webpack_require__(56684); const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__(15949); const { concat, toArrayBuffer, unmask } = __webpack_require__(9436); const { isValidStatusCode, isValidUTF8 } = __webpack_require__(86279); const GET_INFO = 0; const GET_PAYLOAD_LENGTH_16 = 1; const GET_PAYLOAD_LENGTH_64 = 2; const GET_MASK = 3; const GET_DATA = 4; const INFLATING = 5; /** * HyBi Receiver implementation. * * @extends stream.Writable */ class Receiver extends Writable { /** * Creates a Receiver instance. * * @param {String} binaryType The type for binary data * @param {Object} extensions An object containing the negotiated extensions * @param {Number} maxPayload The maximum allowed message length */ constructor(binaryType, extensions, maxPayload) { super(); this._binaryType = binaryType || BINARY_TYPES[0]; this[kWebSocket] = undefined; this._extensions = extensions || {}; this._maxPayload = maxPayload | 0; this._bufferedBytes = 0; this._buffers = []; this._compressed = false; this._payloadLength = 0; this._mask = undefined; this._fragmented = 0; this._masked = false; this._fin = false; this._opcode = 0; this._totalPayloadLength = 0; this._messageLength = 0; this._fragments = []; this._state = GET_INFO; this._loop = false; } /** * Implements `Writable.prototype._write()`. * * @param {Buffer} chunk The chunk of data to write * @param {String} encoding The character encoding of `chunk` * @param {Function} cb Callback */ _write(chunk, encoding, cb) { if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); this._bufferedBytes += chunk.length; this._buffers.push(chunk); this.startLoop(cb); } /** * Consumes `n` bytes from the buffered data. * * @param {Number} n The number of bytes to consume * @return {Buffer} The consumed bytes * @private */ consume(n) { this._bufferedBytes -= n; if (n === this._buffers[0].length) return this._buffers.shift(); if (n < this._buffers[0].length) { const buf = this._buffers[0]; this._buffers[0] = buf.slice(n); return buf.slice(0, n); } const dst = Buffer.allocUnsafe(n); do { const buf = this._buffers[0]; if (n >= buf.length) { this._buffers.shift().copy(dst, dst.length - n); } else { buf.copy(dst, dst.length - n, 0, n); this._buffers[0] = buf.slice(n); } n -= buf.length; } while (n > 0); return dst; } /** * Starts the parsing loop. * * @param {Function} cb Callback * @private */ startLoop(cb) { var err; this._loop = true; do { switch (this._state) { case GET_INFO: err = this.getInfo(); break; case GET_PAYLOAD_LENGTH_16: err = this.getPayloadLength16(); break; case GET_PAYLOAD_LENGTH_64: err = this.getPayloadLength64(); break; case GET_MASK: this.getMask(); break; case GET_DATA: err = this.getData(cb); break; default: // `INFLATING` this._loop = false; return; } } while (this._loop); cb(err); } /** * Reads the first two bytes of a frame. * * @return {(RangeError|undefined)} A possible error * @private */ getInfo() { if (this._bufferedBytes < 2) { this._loop = false; return; } const buf = this.consume(2); if ((buf[0] & 0x30) !== 0x00) { this._loop = false; return error(RangeError, 'RSV2 and RSV3 must be clear', true, 1002); } const compressed = (buf[0] & 0x40) === 0x40; if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { this._loop = false; return error(RangeError, 'RSV1 must be clear', true, 1002); } this._fin = (buf[0] & 0x80) === 0x80; this._opcode = buf[0] & 0x0f; this._payloadLength = buf[1] & 0x7f; if (this._opcode === 0x00) { if (compressed) { this._loop = false; return error(RangeError, 'RSV1 must be clear', true, 1002); } if (!this._fragmented) { this._loop = false; return error(RangeError, 'invalid opcode 0', true, 1002); } this._opcode = this._fragmented; } else if (this._opcode === 0x01 || this._opcode === 0x02) { if (this._fragmented) { this._loop = false; return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002); } this._compressed = compressed; } else if (this._opcode > 0x07 && this._opcode < 0x0b) { if (!this._fin) { this._loop = false; return error(RangeError, 'FIN must be set', true, 1002); } if (compressed) { this._loop = false; return error(RangeError, 'RSV1 must be clear', true, 1002); } if (this._payloadLength > 0x7d) { this._loop = false; return error( RangeError, `invalid payload length ${this._payloadLength}`, true, 1002 ); } } else { this._loop = false; return error(RangeError, `invalid opcode ${this._opcode}`, true, 1002); } if (!this._fin && !this._fragmented) this._fragmented = this._opcode; this._masked = (buf[1] & 0x80) === 0x80; if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; else return this.haveLength(); } /** * Gets extended payload length (7+16). * * @return {(RangeError|undefined)} A possible error * @private */ getPayloadLength16() { if (this._bufferedBytes < 2) { this._loop = false; return; } this._payloadLength = this.consume(2).readUInt16BE(0); return this.haveLength(); } /** * Gets extended payload length (7+64). * * @return {(RangeError|undefined)} A possible error * @private */ getPayloadLength64() { if (this._bufferedBytes < 8) { this._loop = false; return; } const buf = this.consume(8); const num = buf.readUInt32BE(0); // // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned // if payload length is greater than this number. // if (num > Math.pow(2, 53 - 32) - 1) { this._loop = false; return error( RangeError, 'Unsupported WebSocket frame: payload length > 2^53 - 1', false, 1009 ); } this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); return this.haveLength(); } /** * Payload length has been read. * * @return {(RangeError|undefined)} A possible error * @private */ haveLength() { if (this._payloadLength && this._opcode < 0x08) { this._totalPayloadLength += this._payloadLength; if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { this._loop = false; return error(RangeError, 'Max payload size exceeded', false, 1009); } } if (this._masked) this._state = GET_MASK; else this._state = GET_DATA; } /** * Reads mask bytes. * * @private */ getMask() { if (this._bufferedBytes < 4) { this._loop = false; return; } this._mask = this.consume(4); this._state = GET_DATA; } /** * Reads data bytes. * * @param {Function} cb Callback * @return {(Error|RangeError|undefined)} A possible error * @private */ getData(cb) { var data = EMPTY_BUFFER; if (this._payloadLength) { if (this._bufferedBytes < this._payloadLength) { this._loop = false; return; } data = this.consume(this._payloadLength); if (this._masked) unmask(data, this._mask); } if (this._opcode > 0x07) return this.controlMessage(data); if (this._compressed) { this._state = INFLATING; this.decompress(data, cb); return; } if (data.length) { // // This message is not compressed so its lenght is the sum of the payload // length of all fragments. // this._messageLength = this._totalPayloadLength; this._fragments.push(data); } return this.dataMessage(); } /** * Decompresses data. * * @param {Buffer} data Compressed data * @param {Function} cb Callback * @private */ decompress(data, cb) { const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; perMessageDeflate.decompress(data, this._fin, (err, buf) => { if (err) return cb(err); if (buf.length) { this._messageLength += buf.length; if (this._messageLength > this._maxPayload && this._maxPayload > 0) { return cb( error(RangeError, 'Max payload size exceeded', false, 1009) ); } this._fragments.push(buf); } const er = this.dataMessage(); if (er) return cb(er); this.startLoop(cb); }); } /** * Handles a data message. * * @return {(Error|undefined)} A possible error * @private */ dataMessage() { if (this._fin) { const messageLength = this._messageLength; const fragments = this._fragments; this._totalPayloadLength = 0; this._messageLength = 0; this._fragmented = 0; this._fragments = []; if (this._opcode === 2) { var data; if (this._binaryType === 'nodebuffer') { data = concat(fragments, messageLength); } else if (this._binaryType === 'arraybuffer') { data = toArrayBuffer(concat(fragments, messageLength)); } else { data = fragments; } this.emit('message', data); } else { const buf = concat(fragments, messageLength); if (!isValidUTF8(buf)) { this._loop = false; return error(Error, 'invalid UTF-8 sequence', true, 1007); } this.emit('message', buf.toString()); } } this._state = GET_INFO; } /** * Handles a control message. * * @param {Buffer} data Data to handle * @return {(Error|RangeError|undefined)} A possible error * @private */ controlMessage(data) { if (this._opcode === 0x08) { this._loop = false; if (data.length === 0) { this.emit('conclude', 1005, ''); this.end(); } else if (data.length === 1) { return error(RangeError, 'invalid payload length 1', true, 1002); } else { const code = data.readUInt16BE(0); if (!isValidStatusCode(code)) { return error(RangeError, `invalid status code ${code}`, true, 1002); } const buf = data.slice(2); if (!isValidUTF8(buf)) { return error(Error, 'invalid UTF-8 sequence', true, 1007); } this.emit('conclude', code, buf.toString()); this.end(); } } else if (this._opcode === 0x09) { this.emit('ping', data); } else { this.emit('pong', data); } this._state = GET_INFO; } } module.exports = Receiver; /** * Builds an error object. * * @param {(Error|RangeError)} ErrorCtor The error constructor * @param {String} message The error message * @param {Boolean} prefix Specifies whether or not to add a default prefix to * `message` * @param {Number} statusCode The status code * @return {(Error|RangeError)} The error * @private */ function error(ErrorCtor, message, prefix, statusCode) { const err = new ErrorCtor( prefix ? `Invalid WebSocket frame: ${message}` : message ); Error.captureStackTrace(err, error); err[kStatusCode] = statusCode; return err; } /***/ }), /***/ 36947: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { randomBytes } = __webpack_require__(33373); const PerMessageDeflate = __webpack_require__(56684); const { EMPTY_BUFFER } = __webpack_require__(15949); const { isValidStatusCode } = __webpack_require__(86279); const { mask: applyMask, toBuffer } = __webpack_require__(9436); /** * HyBi Sender implementation. */ class Sender { /** * Creates a Sender instance. * * @param {net.Socket} socket The connection socket * @param {Object} extensions An object containing the negotiated extensions */ constructor(socket, extensions) { this._extensions = extensions || {}; this._socket = socket; this._firstFragment = true; this._compress = false; this._bufferedBytes = 0; this._deflating = false; this._queue = []; } /** * Frames a piece of data according to the HyBi WebSocket protocol. * * @param {Buffer} data The data to frame * @param {Object} options Options object * @param {Number} options.opcode The opcode * @param {Boolean} options.readOnly Specifies whether `data` can be modified * @param {Boolean} options.fin Specifies whether or not to set the FIN bit * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Boolean} options.rsv1 Specifies whether or not to set the RSV1 bit * @return {Buffer[]} The framed data as a list of `Buffer` instances * @public */ static frame(data, options) { const merge = options.mask && options.readOnly; var offset = options.mask ? 6 : 2; var payloadLength = data.length; if (data.length >= 65536) { offset += 8; payloadLength = 127; } else if (data.length > 125) { offset += 2; payloadLength = 126; } const target = Buffer.allocUnsafe(merge ? data.length + offset : offset); target[0] = options.fin ? options.opcode | 0x80 : options.opcode; if (options.rsv1) target[0] |= 0x40; target[1] = payloadLength; if (payloadLength === 126) { target.writeUInt16BE(data.length, 2); } else if (payloadLength === 127) { target.writeUInt32BE(0, 2); target.writeUInt32BE(data.length, 6); } if (!options.mask) return [target, data]; const mask = randomBytes(4); target[1] |= 0x80; target[offset - 4] = mask[0]; target[offset - 3] = mask[1]; target[offset - 2] = mask[2]; target[offset - 1] = mask[3]; if (merge) { applyMask(data, mask, target, offset, data.length); return [target]; } applyMask(data, mask, data, 0, data.length); return [target, data]; } /** * Sends a close message to the other peer. * * @param {(Number|undefined)} code The status code component of the body * @param {String} data The message component of the body * @param {Boolean} mask Specifies whether or not to mask the message * @param {Function} cb Callback * @public */ close(code, data, mask, cb) { var buf; if (code === undefined) { buf = EMPTY_BUFFER; } else if (typeof code !== 'number' || !isValidStatusCode(code)) { throw new TypeError('First argument must be a valid error code number'); } else if (data === undefined || data === '') { buf = Buffer.allocUnsafe(2); buf.writeUInt16BE(code, 0); } else { buf = Buffer.allocUnsafe(2 + Buffer.byteLength(data)); buf.writeUInt16BE(code, 0); buf.write(data, 2); } if (this._deflating) { this.enqueue([this.doClose, buf, mask, cb]); } else { this.doClose(buf, mask, cb); } } /** * Frames and sends a close message. * * @param {Buffer} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @private */ doClose(data, mask, cb) { this.sendFrame( Sender.frame(data, { fin: true, rsv1: false, opcode: 0x08, mask, readOnly: false }), cb ); } /** * Sends a ping message to the other peer. * * @param {*} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @public */ ping(data, mask, cb) { const buf = toBuffer(data); if (this._deflating) { this.enqueue([this.doPing, buf, mask, toBuffer.readOnly, cb]); } else { this.doPing(buf, mask, toBuffer.readOnly, cb); } } /** * Frames and sends a ping message. * * @param {*} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Boolean} readOnly Specifies whether `data` can be modified * @param {Function} cb Callback * @private */ doPing(data, mask, readOnly, cb) { this.sendFrame( Sender.frame(data, { fin: true, rsv1: false, opcode: 0x09, mask, readOnly }), cb ); } /** * Sends a pong message to the other peer. * * @param {*} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @public */ pong(data, mask, cb) { const buf = toBuffer(data); if (this._deflating) { this.enqueue([this.doPong, buf, mask, toBuffer.readOnly, cb]); } else { this.doPong(buf, mask, toBuffer.readOnly, cb); } } /** * Frames and sends a pong message. * * @param {*} data The message to send * @param {Boolean} mask Specifies whether or not to mask `data` * @param {Boolean} readOnly Specifies whether `data` can be modified * @param {Function} cb Callback * @private */ doPong(data, mask, readOnly, cb) { this.sendFrame( Sender.frame(data, { fin: true, rsv1: false, opcode: 0x0a, mask, readOnly }), cb ); } /** * Sends a data message to the other peer. * * @param {*} data The message to send * @param {Object} options Options object * @param {Boolean} options.compress Specifies whether or not to compress `data` * @param {Boolean} options.binary Specifies whether `data` is binary or text * @param {Boolean} options.fin Specifies whether the fragment is the last one * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Function} cb Callback * @public */ send(data, options, cb) { const buf = toBuffer(data); const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; var opcode = options.binary ? 2 : 1; var rsv1 = options.compress; if (this._firstFragment) { this._firstFragment = false; if (rsv1 && perMessageDeflate) { rsv1 = buf.length >= perMessageDeflate._threshold; } this._compress = rsv1; } else { rsv1 = false; opcode = 0; } if (options.fin) this._firstFragment = true; if (perMessageDeflate) { const opts = { fin: options.fin, rsv1, opcode, mask: options.mask, readOnly: toBuffer.readOnly }; if (this._deflating) { this.enqueue([this.dispatch, buf, this._compress, opts, cb]); } else { this.dispatch(buf, this._compress, opts, cb); } } else { this.sendFrame( Sender.frame(buf, { fin: options.fin, rsv1: false, opcode, mask: options.mask, readOnly: toBuffer.readOnly }), cb ); } } /** * Dispatches a data message. * * @param {Buffer} data The message to send * @param {Boolean} compress Specifies whether or not to compress `data` * @param {Object} options Options object * @param {Number} options.opcode The opcode * @param {Boolean} options.readOnly Specifies whether `data` can be modified * @param {Boolean} options.fin Specifies whether or not to set the FIN bit * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Boolean} options.rsv1 Specifies whether or not to set the RSV1 bit * @param {Function} cb Callback * @private */ dispatch(data, compress, options, cb) { if (!compress) { this.sendFrame(Sender.frame(data, options), cb); return; } const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; this._deflating = true; perMessageDeflate.compress(data, options.fin, (_, buf) => { this._deflating = false; options.readOnly = false; this.sendFrame(Sender.frame(buf, options), cb); this.dequeue(); }); } /** * Executes queued send operations. * * @private */ dequeue() { while (!this._deflating && this._queue.length) { const params = this._queue.shift(); this._bufferedBytes -= params[1].length; params[0].apply(this, params.slice(1)); } } /** * Enqueues a send operation. * * @param {Array} params Send operation parameters. * @private */ enqueue(params) { this._bufferedBytes += params[1].length; this._queue.push(params); } /** * Sends a frame. * * @param {Buffer[]} list The frame to send * @param {Function} cb Callback * @private */ sendFrame(list, cb) { if (list.length === 2) { this._socket.cork(); this._socket.write(list[0]); this._socket.write(list[1], cb); this._socket.uncork(); } else { this._socket.write(list[0], cb); } } } module.exports = Sender; /***/ }), /***/ 86279: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; try { const isValidUTF8 = __webpack_require__(24592); exports.isValidUTF8 = typeof isValidUTF8 === 'object' ? isValidUTF8.Validation.isValidUTF8 // utf-8-validate@<3.0.0 : isValidUTF8; } catch (e) /* istanbul ignore next */ { exports.isValidUTF8 = () => true; } /** * Checks if a status code is allowed in a close frame. * * @param {Number} code The status code * @return {Boolean} `true` if the status code is valid, else `false` * @public */ exports.isValidStatusCode = (code) => { return ( (code >= 1000 && code <= 1013 && code !== 1004 && code !== 1005 && code !== 1006) || (code >= 3000 && code <= 4999) ); }; /***/ }), /***/ 58887: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const crypto = __webpack_require__(33373); const http = __webpack_require__(98605); const PerMessageDeflate = __webpack_require__(56684); const extension = __webpack_require__(92035); const WebSocket = __webpack_require__(91518); const { GUID } = __webpack_require__(15949); const keyRegex = /^[+/0-9A-Za-z]{22}==$/; /** * Class representing a WebSocket server. * * @extends EventEmitter */ class WebSocketServer extends EventEmitter { /** * Create a `WebSocketServer` instance. * * @param {Object} options Configuration options * @param {Number} options.backlog The maximum length of the queue of pending * connections * @param {Boolean} options.clientTracking Specifies whether or not to track * clients * @param {Function} options.handleProtocols An hook to handle protocols * @param {String} options.host The hostname where to bind the server * @param {Number} options.maxPayload The maximum allowed message size * @param {Boolean} options.noServer Enable no server mode * @param {String} options.path Accept only connections matching this path * @param {(Boolean|Object)} options.perMessageDeflate Enable/disable * permessage-deflate * @param {Number} options.port The port where to bind the server * @param {http.Server} options.server A pre-created HTTP/S server to use * @param {Function} options.verifyClient An hook to reject connections * @param {Function} callback A listener for the `listening` event */ constructor(options, callback) { super(); options = Object.assign( { maxPayload: 100 * 1024 * 1024, perMessageDeflate: false, handleProtocols: null, clientTracking: true, verifyClient: null, noServer: false, backlog: null, // use default (511 as implemented in net.js) server: null, host: null, path: null, port: null }, options ); if (options.port == null && !options.server && !options.noServer) { throw new TypeError( 'One of the "port", "server", or "noServer" options must be specified' ); } if (options.port != null) { this._server = http.createServer((req, res) => { const body = http.STATUS_CODES[426]; res.writeHead(426, { 'Content-Length': body.length, 'Content-Type': 'text/plain' }); res.end(body); }); this._server.listen( options.port, options.host, options.backlog, callback ); } else if (options.server) { this._server = options.server; } if (this._server) { this._removeListeners = addListeners(this._server, { listening: this.emit.bind(this, 'listening'), error: this.emit.bind(this, 'error'), upgrade: (req, socket, head) => { this.handleUpgrade(req, socket, head, (ws) => { this.emit('connection', ws, req); }); } }); } if (options.perMessageDeflate === true) options.perMessageDeflate = {}; if (options.clientTracking) this.clients = new Set(); this.options = options; } /** * Returns the bound address, the address family name, and port of the server * as reported by the operating system if listening on an IP socket. * If the server is listening on a pipe or UNIX domain socket, the name is * returned as a string. * * @return {(Object|String|null)} The address of the server * @public */ address() { if (this.options.noServer) { throw new Error('The server is operating in "noServer" mode'); } if (!this._server) return null; return this._server.address(); } /** * Close the server. * * @param {Function} cb Callback * @public */ close(cb) { if (cb) this.once('close', cb); // // Terminate all associated clients. // if (this.clients) { for (const client of this.clients) client.terminate(); } const server = this._server; if (server) { this._removeListeners(); this._removeListeners = this._server = null; // // Close the http server if it was internally created. // if (this.options.port != null) { server.close(() => this.emit('close')); return; } } process.nextTick(emitClose, this); } /** * See if a given request should be handled by this server instance. * * @param {http.IncomingMessage} req Request object to inspect * @return {Boolean} `true` if the request is valid, else `false` * @public */ shouldHandle(req) { if (this.options.path) { const index = req.url.indexOf('?'); const pathname = index !== -1 ? req.url.slice(0, index) : req.url; if (pathname !== this.options.path) return false; } return true; } /** * Handle a HTTP Upgrade request. * * @param {http.IncomingMessage} req The request object * @param {net.Socket} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @public */ handleUpgrade(req, socket, head, cb) { socket.on('error', socketOnError); const key = req.headers['sec-websocket-key'] !== undefined ? req.headers['sec-websocket-key'].trim() : false; const version = +req.headers['sec-websocket-version']; const extensions = {}; if ( req.method !== 'GET' || req.headers.upgrade.toLowerCase() !== 'websocket' || !key || !keyRegex.test(key) || (version !== 8 && version !== 13) || !this.shouldHandle(req) ) { return abortHandshake(socket, 400); } if (this.options.perMessageDeflate) { const perMessageDeflate = new PerMessageDeflate( this.options.perMessageDeflate, true, this.options.maxPayload ); try { const offers = extension.parse(req.headers['sec-websocket-extensions']); if (offers[PerMessageDeflate.extensionName]) { perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); extensions[PerMessageDeflate.extensionName] = perMessageDeflate; } } catch (err) { return abortHandshake(socket, 400); } } // // Optionally call external client verification handler. // if (this.options.verifyClient) { const info = { origin: req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], secure: !!(req.connection.authorized || req.connection.encrypted), req }; if (this.options.verifyClient.length === 2) { this.options.verifyClient(info, (verified, code, message, headers) => { if (!verified) { return abortHandshake(socket, code || 401, message, headers); } this.completeUpgrade(key, extensions, req, socket, head, cb); }); return; } if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); } this.completeUpgrade(key, extensions, req, socket, head, cb); } /** * Upgrade the connection to WebSocket. * * @param {String} key The value of the `Sec-WebSocket-Key` header * @param {Object} extensions The accepted extensions * @param {http.IncomingMessage} req The request object * @param {net.Socket} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @private */ completeUpgrade(key, extensions, req, socket, head, cb) { // // Destroy the socket if the client has already sent a FIN packet. // if (!socket.readable || !socket.writable) return socket.destroy(); const digest = crypto .createHash('sha1') .update(key + GUID) .digest('base64'); const headers = [ 'HTTP/1.1 101 Switching Protocols', 'Upgrade: websocket', 'Connection: Upgrade', `Sec-WebSocket-Accept: ${digest}` ]; const ws = new WebSocket(null); var protocol = req.headers['sec-websocket-protocol']; if (protocol) { protocol = protocol.trim().split(/ *, */); // // Optionally call external protocol selection handler. // if (this.options.handleProtocols) { protocol = this.options.handleProtocols(protocol, req); } else { protocol = protocol[0]; } if (protocol) { headers.push(`Sec-WebSocket-Protocol: ${protocol}`); ws.protocol = protocol; } } if (extensions[PerMessageDeflate.extensionName]) { const params = extensions[PerMessageDeflate.extensionName].params; const value = extension.format({ [PerMessageDeflate.extensionName]: [params] }); headers.push(`Sec-WebSocket-Extensions: ${value}`); ws._extensions = extensions; } // // Allow external modification/inspection of handshake headers. // this.emit('headers', headers, req); socket.write(headers.concat('\r\n').join('\r\n')); socket.removeListener('error', socketOnError); ws.setSocket(socket, head, this.options.maxPayload); if (this.clients) { this.clients.add(ws); ws.on('close', () => this.clients.delete(ws)); } cb(ws); } } module.exports = WebSocketServer; /** * Add event listeners on an `EventEmitter` using a map of * pairs. * * @param {EventEmitter} server The event emitter * @param {Object.} map The listeners to add * @return {Function} A function that will remove the added listeners when called * @private */ function addListeners(server, map) { for (const event of Object.keys(map)) server.on(event, map[event]); return function removeListeners() { for (const event of Object.keys(map)) { server.removeListener(event, map[event]); } }; } /** * Emit a `'close'` event on an `EventEmitter`. * * @param {EventEmitter} server The event emitter * @private */ function emitClose(server) { server.emit('close'); } /** * Handle premature socket errors. * * @private */ function socketOnError() { this.destroy(); } /** * Close the connection when preconditions are not fulfilled. * * @param {net.Socket} socket The socket of the upgrade request * @param {Number} code The HTTP response status code * @param {String} [message] The HTTP response body * @param {Object} [headers] Additional HTTP response headers * @private */ function abortHandshake(socket, code, message, headers) { if (socket.writable) { message = message || http.STATUS_CODES[code]; headers = Object.assign( { Connection: 'close', 'Content-type': 'text/html', 'Content-Length': Buffer.byteLength(message) }, headers ); socket.write( `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers) .map((h) => `${h}: ${headers[h]}`) .join('\r\n') + '\r\n\r\n' + message ); } socket.removeListener('error', socketOnError); socket.destroy(); } /***/ }), /***/ 91518: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const crypto = __webpack_require__(33373); const https = __webpack_require__(57211); const http = __webpack_require__(98605); const net = __webpack_require__(11631); const tls = __webpack_require__(4016); const url = __webpack_require__(78835); const PerMessageDeflate = __webpack_require__(56684); const EventTarget = __webpack_require__(64561); const extension = __webpack_require__(92035); const Receiver = __webpack_require__(25066); const Sender = __webpack_require__(36947); const { BINARY_TYPES, EMPTY_BUFFER, GUID, kStatusCode, kWebSocket, NOOP } = __webpack_require__(15949); const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; const protocolVersions = [8, 13]; const closeTimeout = 30 * 1000; /** * Class representing a WebSocket. * * @extends EventEmitter */ class WebSocket extends EventEmitter { /** * Create a new `WebSocket`. * * @param {(String|url.Url|url.URL)} address The URL to which to connect * @param {(String|String[])} protocols The subprotocols * @param {Object} options Connection options */ constructor(address, protocols, options) { super(); this.readyState = WebSocket.CONNECTING; this.protocol = ''; this._binaryType = BINARY_TYPES[0]; this._closeFrameReceived = false; this._closeFrameSent = false; this._closeMessage = ''; this._closeTimer = null; this._closeCode = 1006; this._extensions = {}; this._receiver = null; this._sender = null; this._socket = null; if (address !== null) { this._isServer = false; this._redirects = 0; if (Array.isArray(protocols)) { protocols = protocols.join(', '); } else if (typeof protocols === 'object' && protocols !== null) { options = protocols; protocols = undefined; } initAsClient(this, address, protocols, options); } else { this._isServer = true; } } get CONNECTING() { return WebSocket.CONNECTING; } get CLOSING() { return WebSocket.CLOSING; } get CLOSED() { return WebSocket.CLOSED; } get OPEN() { return WebSocket.OPEN; } /** * This deviates from the WHATWG interface since ws doesn't support the * required default "blob" type (instead we define a custom "nodebuffer" * type). * * @type {String} */ get binaryType() { return this._binaryType; } set binaryType(type) { if (!BINARY_TYPES.includes(type)) return; this._binaryType = type; // // Allow to change `binaryType` on the fly. // if (this._receiver) this._receiver._binaryType = type; } /** * @type {Number} */ get bufferedAmount() { if (!this._socket) return 0; // // `socket.bufferSize` is `undefined` if the socket is closed. // return (this._socket.bufferSize || 0) + this._sender._bufferedBytes; } /** * @type {String} */ get extensions() { return Object.keys(this._extensions).join(); } /** * Set up the socket and the internal resources. * * @param {net.Socket} socket The network socket between the server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Number} maxPayload The maximum allowed message size * @private */ setSocket(socket, head, maxPayload) { const receiver = new Receiver( this._binaryType, this._extensions, maxPayload ); this._sender = new Sender(socket, this._extensions); this._receiver = receiver; this._socket = socket; receiver[kWebSocket] = this; socket[kWebSocket] = this; receiver.on('conclude', receiverOnConclude); receiver.on('drain', receiverOnDrain); receiver.on('error', receiverOnError); receiver.on('message', receiverOnMessage); receiver.on('ping', receiverOnPing); receiver.on('pong', receiverOnPong); socket.setTimeout(0); socket.setNoDelay(); if (head.length > 0) socket.unshift(head); socket.on('close', socketOnClose); socket.on('data', socketOnData); socket.on('end', socketOnEnd); socket.on('error', socketOnError); this.readyState = WebSocket.OPEN; this.emit('open'); } /** * Emit the `'close'` event. * * @private */ emitClose() { this.readyState = WebSocket.CLOSED; if (!this._socket) { this.emit('close', this._closeCode, this._closeMessage); return; } if (this._extensions[PerMessageDeflate.extensionName]) { this._extensions[PerMessageDeflate.extensionName].cleanup(); } this._receiver.removeAllListeners(); this.emit('close', this._closeCode, this._closeMessage); } /** * Start a closing handshake. * * +----------+ +-----------+ +----------+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - * | +----------+ +-----------+ +----------+ | * +----------+ +-----------+ | * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING * +----------+ +-----------+ | * | | | +---+ | * +------------------------+-->|fin| - - - - * | +---+ | +---+ * - - - - -|fin|<---------------------+ * +---+ * * @param {Number} code Status code explaining why the connection is closing * @param {String} data A string explaining why the connection is closing * @public */ close(code, data) { if (this.readyState === WebSocket.CLOSED) return; if (this.readyState === WebSocket.CONNECTING) { const msg = 'WebSocket was closed before the connection was established'; return abortHandshake(this, this._req, msg); } if (this.readyState === WebSocket.CLOSING) { if (this._closeFrameSent && this._closeFrameReceived) this._socket.end(); return; } this.readyState = WebSocket.CLOSING; this._sender.close(code, data, !this._isServer, (err) => { // // This error is handled by the `'error'` listener on the socket. We only // want to know if the close frame has been sent here. // if (err) return; this._closeFrameSent = true; if (this._closeFrameReceived) this._socket.end(); }); // // Specify a timeout for the closing handshake to complete. // this._closeTimer = setTimeout( this._socket.destroy.bind(this._socket), closeTimeout ); } /** * Send a ping. * * @param {*} data The data to send * @param {Boolean} mask Indicates whether or not to mask `data` * @param {Function} cb Callback which is executed when the ping is sent * @public */ ping(data, mask, cb) { if (typeof data === 'function') { cb = data; data = mask = undefined; } else if (typeof mask === 'function') { cb = mask; mask = undefined; } if (this.readyState !== WebSocket.OPEN) { const err = new Error( `WebSocket is not open: readyState ${this.readyState} ` + `(${readyStates[this.readyState]})` ); if (cb) return cb(err); throw err; } if (typeof data === 'number') data = data.toString(); if (mask === undefined) mask = !this._isServer; this._sender.ping(data || EMPTY_BUFFER, mask, cb); } /** * Send a pong. * * @param {*} data The data to send * @param {Boolean} mask Indicates whether or not to mask `data` * @param {Function} cb Callback which is executed when the pong is sent * @public */ pong(data, mask, cb) { if (typeof data === 'function') { cb = data; data = mask = undefined; } else if (typeof mask === 'function') { cb = mask; mask = undefined; } if (this.readyState !== WebSocket.OPEN) { const err = new Error( `WebSocket is not open: readyState ${this.readyState} ` + `(${readyStates[this.readyState]})` ); if (cb) return cb(err); throw err; } if (typeof data === 'number') data = data.toString(); if (mask === undefined) mask = !this._isServer; this._sender.pong(data || EMPTY_BUFFER, mask, cb); } /** * Send a data message. * * @param {*} data The message to send * @param {Object} options Options object * @param {Boolean} options.compress Specifies whether or not to compress `data` * @param {Boolean} options.binary Specifies whether `data` is binary or text * @param {Boolean} options.fin Specifies whether the fragment is the last one * @param {Boolean} options.mask Specifies whether or not to mask `data` * @param {Function} cb Callback which is executed when data is written out * @public */ send(data, options, cb) { if (typeof options === 'function') { cb = options; options = {}; } if (this.readyState !== WebSocket.OPEN) { const err = new Error( `WebSocket is not open: readyState ${this.readyState} ` + `(${readyStates[this.readyState]})` ); if (cb) return cb(err); throw err; } if (typeof data === 'number') data = data.toString(); const opts = Object.assign( { binary: typeof data !== 'string', mask: !this._isServer, compress: true, fin: true }, options ); if (!this._extensions[PerMessageDeflate.extensionName]) { opts.compress = false; } this._sender.send(data || EMPTY_BUFFER, opts, cb); } /** * Forcibly close the connection. * * @public */ terminate() { if (this.readyState === WebSocket.CLOSED) return; if (this.readyState === WebSocket.CONNECTING) { const msg = 'WebSocket was closed before the connection was established'; return abortHandshake(this, this._req, msg); } if (this._socket) { this.readyState = WebSocket.CLOSING; this._socket.destroy(); } } } readyStates.forEach((readyState, i) => { WebSocket[readyState] = i; }); // // Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes. // See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface // ['open', 'error', 'close', 'message'].forEach((method) => { Object.defineProperty(WebSocket.prototype, `on${method}`, { /** * Return the listener of the event. * * @return {(Function|undefined)} The event listener or `undefined` * @public */ get() { const listeners = this.listeners(method); for (var i = 0; i < listeners.length; i++) { if (listeners[i]._listener) return listeners[i]._listener; } return undefined; }, /** * Add a listener for the event. * * @param {Function} listener The listener to add * @public */ set(listener) { const listeners = this.listeners(method); for (var i = 0; i < listeners.length; i++) { // // Remove only the listeners added via `addEventListener`. // if (listeners[i]._listener) this.removeListener(method, listeners[i]); } this.addEventListener(method, listener); } }); }); WebSocket.prototype.addEventListener = EventTarget.addEventListener; WebSocket.prototype.removeEventListener = EventTarget.removeEventListener; module.exports = WebSocket; /** * Initialize a WebSocket client. * * @param {WebSocket} websocket The client to initialize * @param {(String|url.Url|url.URL)} address The URL to which to connect * @param {String} protocols The subprotocols * @param {Object} options Connection options * @param {(Boolean|Object)} options.perMessageDeflate Enable/disable * permessage-deflate * @param {Number} options.handshakeTimeout Timeout in milliseconds for the * handshake request * @param {Number} options.protocolVersion Value of the `Sec-WebSocket-Version` * header * @param {String} options.origin Value of the `Origin` or * `Sec-WebSocket-Origin` header * @param {Number} options.maxPayload The maximum allowed message size * @param {Boolean} options.followRedirects Whether or not to follow redirects * @param {Number} options.maxRedirects The maximum number of redirects allowed * @private */ function initAsClient(websocket, address, protocols, options) { const opts = Object.assign( { protocolVersion: protocolVersions[1], maxPayload: 100 * 1024 * 1024, perMessageDeflate: true, followRedirects: false, maxRedirects: 10 }, options, { createConnection: undefined, socketPath: undefined, hostname: undefined, protocol: undefined, timeout: undefined, method: undefined, auth: undefined, host: undefined, path: undefined, port: undefined } ); if (!protocolVersions.includes(opts.protocolVersion)) { throw new RangeError( `Unsupported protocol version: ${opts.protocolVersion} ` + `(supported versions: ${protocolVersions.join(', ')})` ); } var parsedUrl; if (typeof address === 'object' && address.href !== undefined) { parsedUrl = address; websocket.url = address.href; } else { // // The WHATWG URL constructor is not available on Node.js < 6.13.0 // parsedUrl = url.URL ? new url.URL(address) : url.parse(address); websocket.url = address; } const isUnixSocket = parsedUrl.protocol === 'ws+unix:'; if (!parsedUrl.host && (!isUnixSocket || !parsedUrl.pathname)) { throw new Error(`Invalid URL: ${websocket.url}`); } const isSecure = parsedUrl.protocol === 'wss:' || parsedUrl.protocol === 'https:'; const defaultPort = isSecure ? 443 : 80; const key = crypto.randomBytes(16).toString('base64'); const get = isSecure ? https.get : http.get; const path = parsedUrl.search ? `${parsedUrl.pathname || '/'}${parsedUrl.search}` : parsedUrl.pathname || '/'; var perMessageDeflate; opts.createConnection = isSecure ? tlsConnect : netConnect; opts.defaultPort = opts.defaultPort || defaultPort; opts.port = parsedUrl.port || defaultPort; opts.host = parsedUrl.hostname.startsWith('[') ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname; opts.headers = Object.assign( { 'Sec-WebSocket-Version': opts.protocolVersion, 'Sec-WebSocket-Key': key, Connection: 'Upgrade', Upgrade: 'websocket' }, opts.headers ); opts.path = path; opts.timeout = opts.handshakeTimeout; if (opts.perMessageDeflate) { perMessageDeflate = new PerMessageDeflate( opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, false, opts.maxPayload ); opts.headers['Sec-WebSocket-Extensions'] = extension.format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() }); } if (protocols) { opts.headers['Sec-WebSocket-Protocol'] = protocols; } if (opts.origin) { if (opts.protocolVersion < 13) { opts.headers['Sec-WebSocket-Origin'] = opts.origin; } else { opts.headers.Origin = opts.origin; } } if (parsedUrl.auth) { opts.auth = parsedUrl.auth; } else if (parsedUrl.username || parsedUrl.password) { opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; } if (isUnixSocket) { const parts = path.split(':'); opts.socketPath = parts[0]; opts.path = parts[1]; } var req = (websocket._req = get(opts)); if (opts.timeout) { req.on('timeout', () => { abortHandshake(websocket, req, 'Opening handshake has timed out'); }); } req.on('error', (err) => { if (websocket._req.aborted) return; req = websocket._req = null; websocket.readyState = WebSocket.CLOSING; websocket.emit('error', err); websocket.emitClose(); }); req.on('response', (res) => { const location = res.headers.location; const statusCode = res.statusCode; if ( location && opts.followRedirects && statusCode >= 300 && statusCode < 400 ) { if (++websocket._redirects > opts.maxRedirects) { abortHandshake(websocket, req, 'Maximum redirects exceeded'); return; } req.abort(); const addr = url.URL ? new url.URL(location, address) : url.resolve(address, location); initAsClient(websocket, addr, protocols, options); } else if (!websocket.emit('unexpected-response', req, res)) { abortHandshake( websocket, req, `Unexpected server response: ${res.statusCode}` ); } }); req.on('upgrade', (res, socket, head) => { websocket.emit('upgrade', res); // // The user may have closed the connection from a listener of the `upgrade` // event. // if (websocket.readyState !== WebSocket.CONNECTING) return; req = websocket._req = null; const digest = crypto .createHash('sha1') .update(key + GUID) .digest('base64'); if (res.headers['sec-websocket-accept'] !== digest) { abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); return; } const serverProt = res.headers['sec-websocket-protocol']; const protList = (protocols || '').split(/, */); var protError; if (!protocols && serverProt) { protError = 'Server sent a subprotocol but none was requested'; } else if (protocols && !serverProt) { protError = 'Server sent no subprotocol'; } else if (serverProt && !protList.includes(serverProt)) { protError = 'Server sent an invalid subprotocol'; } if (protError) { abortHandshake(websocket, socket, protError); return; } if (serverProt) websocket.protocol = serverProt; if (perMessageDeflate) { try { const extensions = extension.parse( res.headers['sec-websocket-extensions'] ); if (extensions[PerMessageDeflate.extensionName]) { perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); websocket._extensions[ PerMessageDeflate.extensionName ] = perMessageDeflate; } } catch (err) { abortHandshake( websocket, socket, 'Invalid Sec-WebSocket-Extensions header' ); return; } } websocket.setSocket(socket, head, opts.maxPayload); }); } /** * Create a `net.Socket` and initiate a connection. * * @param {Object} options Connection options * @return {net.Socket} The newly created socket used to start the connection * @private */ function netConnect(options) { // // Override `options.path` only if `options` is a copy of the original options // object. This is always true on Node.js >= 8 but not on Node.js 6 where // `options.socketPath` might be `undefined` even if the `socketPath` option // was originally set. // if (options.protocolVersion) options.path = options.socketPath; return net.connect(options); } /** * Create a `tls.TLSSocket` and initiate a connection. * * @param {Object} options Connection options * @return {tls.TLSSocket} The newly created socket used to start the connection * @private */ function tlsConnect(options) { options.path = undefined; options.servername = options.servername || options.host; return tls.connect(options); } /** * Abort the handshake and emit an error. * * @param {WebSocket} websocket The WebSocket instance * @param {(http.ClientRequest|net.Socket)} stream The request to abort or the * socket to destroy * @param {String} message The error message * @private */ function abortHandshake(websocket, stream, message) { websocket.readyState = WebSocket.CLOSING; const err = new Error(message); Error.captureStackTrace(err, abortHandshake); if (stream.setHeader) { stream.abort(); stream.once('abort', websocket.emitClose.bind(websocket)); websocket.emit('error', err); } else { stream.destroy(err); stream.once('error', websocket.emit.bind(websocket, 'error')); stream.once('close', websocket.emitClose.bind(websocket)); } } /** * The listener of the `Receiver` `'conclude'` event. * * @param {Number} code The status code * @param {String} reason The reason for closing * @private */ function receiverOnConclude(code, reason) { const websocket = this[kWebSocket]; websocket._socket.removeListener('data', socketOnData); websocket._socket.resume(); websocket._closeFrameReceived = true; websocket._closeMessage = reason; websocket._closeCode = code; if (code === 1005) websocket.close(); else websocket.close(code, reason); } /** * The listener of the `Receiver` `'drain'` event. * * @private */ function receiverOnDrain() { this[kWebSocket]._socket.resume(); } /** * The listener of the `Receiver` `'error'` event. * * @param {(RangeError|Error)} err The emitted error * @private */ function receiverOnError(err) { const websocket = this[kWebSocket]; websocket._socket.removeListener('data', socketOnData); websocket.readyState = WebSocket.CLOSING; websocket._closeCode = err[kStatusCode]; websocket.emit('error', err); websocket._socket.destroy(); } /** * The listener of the `Receiver` `'finish'` event. * * @private */ function receiverOnFinish() { this[kWebSocket].emitClose(); } /** * The listener of the `Receiver` `'message'` event. * * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The message * @private */ function receiverOnMessage(data) { this[kWebSocket].emit('message', data); } /** * The listener of the `Receiver` `'ping'` event. * * @param {Buffer} data The data included in the ping frame * @private */ function receiverOnPing(data) { const websocket = this[kWebSocket]; websocket.pong(data, !websocket._isServer, NOOP); websocket.emit('ping', data); } /** * The listener of the `Receiver` `'pong'` event. * * @param {Buffer} data The data included in the pong frame * @private */ function receiverOnPong(data) { this[kWebSocket].emit('pong', data); } /** * The listener of the `net.Socket` `'close'` event. * * @private */ function socketOnClose() { const websocket = this[kWebSocket]; this.removeListener('close', socketOnClose); this.removeListener('end', socketOnEnd); websocket.readyState = WebSocket.CLOSING; // // The close frame might not have been received or the `'end'` event emitted, // for example, if the socket was destroyed due to an error. Ensure that the // `receiver` stream is closed after writing any remaining buffered data to // it. If the readable side of the socket is in flowing mode then there is no // buffered data as everything has been already written and `readable.read()` // will return `null`. If instead, the socket is paused, any possible buffered // data will be read as a single chunk and emitted synchronously in a single // `'data'` event. // websocket._socket.read(); websocket._receiver.end(); this.removeListener('data', socketOnData); this[kWebSocket] = undefined; clearTimeout(websocket._closeTimer); if ( websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted ) { websocket.emitClose(); } else { websocket._receiver.on('error', receiverOnFinish); websocket._receiver.on('finish', receiverOnFinish); } } /** * The listener of the `net.Socket` `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function socketOnData(chunk) { if (!this[kWebSocket]._receiver.write(chunk)) { this.pause(); } } /** * The listener of the `net.Socket` `'end'` event. * * @private */ function socketOnEnd() { const websocket = this[kWebSocket]; websocket.readyState = WebSocket.CLOSING; websocket._receiver.end(); this.end(); } /** * The listener of the `net.Socket` `'error'` event. * * @private */ function socketOnError() { const websocket = this[kWebSocket]; this.removeListener('error', socketOnError); this.on('error', NOOP); websocket.readyState = WebSocket.CLOSING; this.destroy(); } /***/ }), /***/ 4091: /***/ ((module) => { "use strict"; module.exports = function (Yallist) { Yallist.prototype[Symbol.iterator] = function* () { for (let walker = this.head; walker; walker = walker.next) { yield walker.value } } } /***/ }), /***/ 40665: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = Yallist Yallist.Node = Node Yallist.create = Yallist function Yallist (list) { var self = this if (!(self instanceof Yallist)) { self = new Yallist() } self.tail = null self.head = null self.length = 0 if (list && typeof list.forEach === 'function') { list.forEach(function (item) { self.push(item) }) } else if (arguments.length > 0) { for (var i = 0, l = arguments.length; i < l; i++) { self.push(arguments[i]) } } return self } Yallist.prototype.removeNode = function (node) { if (node.list !== this) { throw new Error('removing node which does not belong to this list') } var next = node.next var prev = node.prev if (next) { next.prev = prev } if (prev) { prev.next = next } if (node === this.head) { this.head = next } if (node === this.tail) { this.tail = prev } node.list.length-- node.next = null node.prev = null node.list = null return next } Yallist.prototype.unshiftNode = function (node) { if (node === this.head) { return } if (node.list) { node.list.removeNode(node) } var head = this.head node.list = this node.next = head if (head) { head.prev = node } this.head = node if (!this.tail) { this.tail = node } this.length++ } Yallist.prototype.pushNode = function (node) { if (node === this.tail) { return } if (node.list) { node.list.removeNode(node) } var tail = this.tail node.list = this node.prev = tail if (tail) { tail.next = node } this.tail = node if (!this.head) { this.head = node } this.length++ } Yallist.prototype.push = function () { for (var i = 0, l = arguments.length; i < l; i++) { push(this, arguments[i]) } return this.length } Yallist.prototype.unshift = function () { for (var i = 0, l = arguments.length; i < l; i++) { unshift(this, arguments[i]) } return this.length } Yallist.prototype.pop = function () { if (!this.tail) { return undefined } var res = this.tail.value this.tail = this.tail.prev if (this.tail) { this.tail.next = null } else { this.head = null } this.length-- return res } Yallist.prototype.shift = function () { if (!this.head) { return undefined } var res = this.head.value this.head = this.head.next if (this.head) { this.head.prev = null } else { this.tail = null } this.length-- return res } Yallist.prototype.forEach = function (fn, thisp) { thisp = thisp || this for (var walker = this.head, i = 0; walker !== null; i++) { fn.call(thisp, walker.value, i, this) walker = walker.next } } Yallist.prototype.forEachReverse = function (fn, thisp) { thisp = thisp || this for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { fn.call(thisp, walker.value, i, this) walker = walker.prev } } Yallist.prototype.get = function (n) { for (var i = 0, walker = this.head; walker !== null && i < n; i++) { // abort out of the list early if we hit a cycle walker = walker.next } if (i === n && walker !== null) { return walker.value } } Yallist.prototype.getReverse = function (n) { for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { // abort out of the list early if we hit a cycle walker = walker.prev } if (i === n && walker !== null) { return walker.value } } Yallist.prototype.map = function (fn, thisp) { thisp = thisp || this var res = new Yallist() for (var walker = this.head; walker !== null;) { res.push(fn.call(thisp, walker.value, this)) walker = walker.next } return res } Yallist.prototype.mapReverse = function (fn, thisp) { thisp = thisp || this var res = new Yallist() for (var walker = this.tail; walker !== null;) { res.push(fn.call(thisp, walker.value, this)) walker = walker.prev } return res } Yallist.prototype.reduce = function (fn, initial) { var acc var walker = this.head if (arguments.length > 1) { acc = initial } else if (this.head) { walker = this.head.next acc = this.head.value } else { throw new TypeError('Reduce of empty list with no initial value') } for (var i = 0; walker !== null; i++) { acc = fn(acc, walker.value, i) walker = walker.next } return acc } Yallist.prototype.reduceReverse = function (fn, initial) { var acc var walker = this.tail if (arguments.length > 1) { acc = initial } else if (this.tail) { walker = this.tail.prev acc = this.tail.value } else { throw new TypeError('Reduce of empty list with no initial value') } for (var i = this.length - 1; walker !== null; i--) { acc = fn(acc, walker.value, i) walker = walker.prev } return acc } Yallist.prototype.toArray = function () { var arr = new Array(this.length) for (var i = 0, walker = this.head; walker !== null; i++) { arr[i] = walker.value walker = walker.next } return arr } Yallist.prototype.toArrayReverse = function () { var arr = new Array(this.length) for (var i = 0, walker = this.tail; walker !== null; i++) { arr[i] = walker.value walker = walker.prev } return arr } Yallist.prototype.slice = function (from, to) { to = to || this.length if (to < 0) { to += this.length } from = from || 0 if (from < 0) { from += this.length } var ret = new Yallist() if (to < from || to < 0) { return ret } if (from < 0) { from = 0 } if (to > this.length) { to = this.length } for (var i = 0, walker = this.head; walker !== null && i < from; i++) { walker = walker.next } for (; walker !== null && i < to; i++, walker = walker.next) { ret.push(walker.value) } return ret } Yallist.prototype.sliceReverse = function (from, to) { to = to || this.length if (to < 0) { to += this.length } from = from || 0 if (from < 0) { from += this.length } var ret = new Yallist() if (to < from || to < 0) { return ret } if (from < 0) { from = 0 } if (to > this.length) { to = this.length } for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { walker = walker.prev } for (; walker !== null && i > from; i--, walker = walker.prev) { ret.push(walker.value) } return ret } Yallist.prototype.splice = function (start, deleteCount, ...nodes) { if (start > this.length) { start = this.length - 1 } if (start < 0) { start = this.length + start; } for (var i = 0, walker = this.head; walker !== null && i < start; i++) { walker = walker.next } var ret = [] for (var i = 0; walker && i < deleteCount; i++) { ret.push(walker.value) walker = this.removeNode(walker) } if (walker === null) { walker = this.tail } if (walker !== this.head && walker !== this.tail) { walker = walker.prev } for (var i = 0; i < nodes.length; i++) { walker = insert(this, walker, nodes[i]) } return ret; } Yallist.prototype.reverse = function () { var head = this.head var tail = this.tail for (var walker = head; walker !== null; walker = walker.prev) { var p = walker.prev walker.prev = walker.next walker.next = p } this.head = tail this.tail = head return this } function insert (self, node, value) { var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self) if (inserted.next === null) { self.tail = inserted } if (inserted.prev === null) { self.head = inserted } self.length++ return inserted } function push (self, item) { self.tail = new Node(item, self.tail, null, self) if (!self.head) { self.head = self.tail } self.length++ } function unshift (self, item) { self.head = new Node(item, null, self.head, self) if (!self.tail) { self.tail = self.head } self.length++ } function Node (value, prev, next, list) { if (!(this instanceof Node)) { return new Node(value, prev, next, list) } this.list = list this.value = value if (prev) { prev.next = this this.prev = prev } else { this.prev = null } if (next) { next.prev = this this.next = next } else { this.next = null } } try { // add if support for Symbol.iterator is present __webpack_require__(4091)(Yallist) } catch (er) {} /***/ }), /***/ 71269: /***/ ((module) => { module.exports = eval("require")("bufferutil"); /***/ }), /***/ 24592: /***/ ((module) => { module.exports = eval("require")("utf-8-validate"); /***/ }), /***/ 66835: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\"description\":\"Meta-schema for $data reference (JSON Schema extension proposal)\",\"type\":\"object\",\"required\":[\"$data\"],\"properties\":{\"$data\":{\"type\":\"string\",\"anyOf\":[{\"format\":\"relative-json-pointer\"},{\"format\":\"json-pointer\"}]}},\"additionalProperties\":false}"); /***/ }), /***/ 81030: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"$id\":\"http://json-schema.org/draft-06/schema#\",\"title\":\"Core schema meta-schema\",\"definitions\":{\"schemaArray\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#\"}},\"nonNegativeInteger\":{\"type\":\"integer\",\"minimum\":0},\"nonNegativeIntegerDefault0\":{\"allOf\":[{\"$ref\":\"#/definitions/nonNegativeInteger\"},{\"default\":0}]},\"simpleTypes\":{\"enum\":[\"array\",\"boolean\",\"integer\",\"null\",\"number\",\"object\",\"string\"]},\"stringArray\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true,\"default\":[]}},\"type\":[\"object\",\"boolean\"],\"properties\":{\"$id\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$schema\":{\"type\":\"string\",\"format\":\"uri\"},\"$ref\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"title\":{\"type\":\"string\"},\"description\":{\"type\":\"string\"},\"default\":{},\"examples\":{\"type\":\"array\",\"items\":{}},\"multipleOf\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"maximum\":{\"type\":\"number\"},\"exclusiveMaximum\":{\"type\":\"number\"},\"minimum\":{\"type\":\"number\"},\"exclusiveMinimum\":{\"type\":\"number\"},\"maxLength\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minLength\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"pattern\":{\"type\":\"string\",\"format\":\"regex\"},\"additionalItems\":{\"$ref\":\"#\"},\"items\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/schemaArray\"}],\"default\":{}},\"maxItems\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minItems\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"uniqueItems\":{\"type\":\"boolean\",\"default\":false},\"contains\":{\"$ref\":\"#\"},\"maxProperties\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minProperties\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"required\":{\"$ref\":\"#/definitions/stringArray\"},\"additionalProperties\":{\"$ref\":\"#\"},\"definitions\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"properties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"patternProperties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"dependencies\":{\"type\":\"object\",\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/stringArray\"}]}},\"propertyNames\":{\"$ref\":\"#\"},\"const\":{},\"enum\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true},\"type\":{\"anyOf\":[{\"$ref\":\"#/definitions/simpleTypes\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/simpleTypes\"},\"minItems\":1,\"uniqueItems\":true}]},\"format\":{\"type\":\"string\"},\"allOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"anyOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"oneOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"not\":{\"$ref\":\"#\"}},\"default\":{}}"); /***/ }), /***/ 40038: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Core schema meta-schema\",\"definitions\":{\"schemaArray\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#\"}},\"nonNegativeInteger\":{\"type\":\"integer\",\"minimum\":0},\"nonNegativeIntegerDefault0\":{\"allOf\":[{\"$ref\":\"#/definitions/nonNegativeInteger\"},{\"default\":0}]},\"simpleTypes\":{\"enum\":[\"array\",\"boolean\",\"integer\",\"null\",\"number\",\"object\",\"string\"]},\"stringArray\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true,\"default\":[]}},\"type\":[\"object\",\"boolean\"],\"properties\":{\"$id\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$schema\":{\"type\":\"string\",\"format\":\"uri\"},\"$ref\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$comment\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"description\":{\"type\":\"string\"},\"default\":true,\"readOnly\":{\"type\":\"boolean\",\"default\":false},\"examples\":{\"type\":\"array\",\"items\":true},\"multipleOf\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"maximum\":{\"type\":\"number\"},\"exclusiveMaximum\":{\"type\":\"number\"},\"minimum\":{\"type\":\"number\"},\"exclusiveMinimum\":{\"type\":\"number\"},\"maxLength\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minLength\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"pattern\":{\"type\":\"string\",\"format\":\"regex\"},\"additionalItems\":{\"$ref\":\"#\"},\"items\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/schemaArray\"}],\"default\":true},\"maxItems\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minItems\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"uniqueItems\":{\"type\":\"boolean\",\"default\":false},\"contains\":{\"$ref\":\"#\"},\"maxProperties\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minProperties\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"required\":{\"$ref\":\"#/definitions/stringArray\"},\"additionalProperties\":{\"$ref\":\"#\"},\"definitions\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"properties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"patternProperties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"propertyNames\":{\"format\":\"regex\"},\"default\":{}},\"dependencies\":{\"type\":\"object\",\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/stringArray\"}]}},\"propertyNames\":{\"$ref\":\"#\"},\"const\":true,\"enum\":{\"type\":\"array\",\"items\":true,\"minItems\":1,\"uniqueItems\":true},\"type\":{\"anyOf\":[{\"$ref\":\"#/definitions/simpleTypes\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/simpleTypes\"},\"minItems\":1,\"uniqueItems\":true}]},\"format\":{\"type\":\"string\"},\"contentMediaType\":{\"type\":\"string\"},\"contentEncoding\":{\"type\":\"string\"},\"if\":{\"$ref\":\"#\"},\"then\":{\"$ref\":\"#\"},\"else\":{\"$ref\":\"#\"},\"allOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"anyOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"oneOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"not\":{\"$ref\":\"#\"}},\"default\":true}"); /***/ }), /***/ 9248: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"name\":\"got\",\"version\":\"9.6.0\",\"description\":\"Simplified HTTP requests\",\"license\":\"MIT\",\"repository\":\"sindresorhus/got\",\"main\":\"source\",\"engines\":{\"node\":\">=8.6\"},\"scripts\":{\"test\":\"xo && nyc ava\",\"release\":\"np\"},\"files\":[\"source\"],\"keywords\":[\"http\",\"https\",\"get\",\"got\",\"url\",\"uri\",\"request\",\"util\",\"utility\",\"simple\",\"curl\",\"wget\",\"fetch\",\"net\",\"network\",\"electron\"],\"dependencies\":{\"@sindresorhus/is\":\"^0.14.0\",\"@szmarczak/http-timer\":\"^1.1.2\",\"cacheable-request\":\"^6.0.0\",\"decompress-response\":\"^3.3.0\",\"duplexer3\":\"^0.1.4\",\"get-stream\":\"^4.1.0\",\"lowercase-keys\":\"^1.0.1\",\"mimic-response\":\"^1.0.1\",\"p-cancelable\":\"^1.0.0\",\"to-readable-stream\":\"^1.0.0\",\"url-parse-lax\":\"^3.0.0\"},\"devDependencies\":{\"ava\":\"^1.1.0\",\"coveralls\":\"^3.0.0\",\"delay\":\"^4.1.0\",\"form-data\":\"^2.3.3\",\"get-port\":\"^4.0.0\",\"np\":\"^3.1.0\",\"nyc\":\"^13.1.0\",\"p-event\":\"^2.1.0\",\"pem\":\"^1.13.2\",\"proxyquire\":\"^2.0.1\",\"sinon\":\"^7.2.2\",\"slow-stream\":\"0.0.4\",\"tempfile\":\"^2.0.0\",\"tempy\":\"^0.2.1\",\"tough-cookie\":\"^3.0.0\",\"xo\":\"^0.24.0\"},\"ava\":{\"concurrency\":4},\"browser\":{\"decompress-response\":false,\"electron\":false}}"); /***/ }), /***/ 24391: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"afterRequest.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"optional\":true,\"required\":[\"lastAccess\",\"eTag\",\"hitCount\"],\"properties\":{\"expires\":{\"type\":\"string\",\"pattern\":\"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?\"},\"lastAccess\":{\"type\":\"string\",\"pattern\":\"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?\"},\"eTag\":{\"type\":\"string\"},\"hitCount\":{\"type\":\"integer\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 94440: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"beforeRequest.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"optional\":true,\"required\":[\"lastAccess\",\"eTag\",\"hitCount\"],\"properties\":{\"expires\":{\"type\":\"string\",\"pattern\":\"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?\"},\"lastAccess\":{\"type\":\"string\",\"pattern\":\"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?\"},\"eTag\":{\"type\":\"string\"},\"hitCount\":{\"type\":\"integer\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 99850: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"browser.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"name\",\"version\"],\"properties\":{\"name\":{\"type\":\"string\"},\"version\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 77654: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"cache.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"properties\":{\"beforeRequest\":{\"oneOf\":[{\"type\":\"null\"},{\"$ref\":\"beforeRequest.json#\"}]},\"afterRequest\":{\"oneOf\":[{\"type\":\"null\"},{\"$ref\":\"afterRequest.json#\"}]},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 73656: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"content.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"size\",\"mimeType\"],\"properties\":{\"size\":{\"type\":\"integer\"},\"compression\":{\"type\":\"integer\"},\"mimeType\":{\"type\":\"string\"},\"text\":{\"type\":\"string\"},\"encoding\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 67948: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"cookie.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"name\",\"value\"],\"properties\":{\"name\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"path\":{\"type\":\"string\"},\"domain\":{\"type\":\"string\"},\"expires\":{\"type\":[\"string\",\"null\"],\"format\":\"date-time\"},\"httpOnly\":{\"type\":\"boolean\"},\"secure\":{\"type\":\"boolean\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 33412: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"creator.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"name\",\"version\"],\"properties\":{\"name\":{\"type\":\"string\"},\"version\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 32525: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"entry.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"optional\":true,\"required\":[\"startedDateTime\",\"time\",\"request\",\"response\",\"cache\",\"timings\"],\"properties\":{\"pageref\":{\"type\":\"string\"},\"startedDateTime\":{\"type\":\"string\",\"format\":\"date-time\",\"pattern\":\"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))\"},\"time\":{\"type\":\"number\",\"min\":0},\"request\":{\"$ref\":\"request.json#\"},\"response\":{\"$ref\":\"response.json#\"},\"cache\":{\"$ref\":\"cache.json#\"},\"timings\":{\"$ref\":\"timings.json#\"},\"serverIPAddress\":{\"type\":\"string\",\"oneOf\":[{\"format\":\"ipv4\"},{\"format\":\"ipv6\"}]},\"connection\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 84943: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"har.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"log\"],\"properties\":{\"log\":{\"$ref\":\"log.json#\"}}}"); /***/ }), /***/ 68344: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"header.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"name\",\"value\"],\"properties\":{\"name\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 69142: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"log.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"version\",\"creator\",\"entries\"],\"properties\":{\"version\":{\"type\":\"string\"},\"creator\":{\"$ref\":\"creator.json#\"},\"browser\":{\"$ref\":\"browser.json#\"},\"pages\":{\"type\":\"array\",\"items\":{\"$ref\":\"page.json#\"}},\"entries\":{\"type\":\"array\",\"items\":{\"$ref\":\"entry.json#\"}},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 29075: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"page.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"optional\":true,\"required\":[\"startedDateTime\",\"id\",\"title\",\"pageTimings\"],\"properties\":{\"startedDateTime\":{\"type\":\"string\",\"format\":\"date-time\",\"pattern\":\"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))\"},\"id\":{\"type\":\"string\",\"unique\":true},\"title\":{\"type\":\"string\"},\"pageTimings\":{\"$ref\":\"pageTimings.json#\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 15096: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"pageTimings.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"properties\":{\"onContentLoad\":{\"type\":\"number\",\"min\":-1},\"onLoad\":{\"type\":\"number\",\"min\":-1},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 73697: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"postData.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"optional\":true,\"required\":[\"mimeType\"],\"properties\":{\"mimeType\":{\"type\":\"string\"},\"text\":{\"type\":\"string\"},\"params\":{\"type\":\"array\",\"required\":[\"name\"],\"properties\":{\"name\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"fileName\":{\"type\":\"string\"},\"contentType\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 70877: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"query.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"name\",\"value\"],\"properties\":{\"name\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 92084: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"request.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"method\",\"url\",\"httpVersion\",\"cookies\",\"headers\",\"queryString\",\"headersSize\",\"bodySize\"],\"properties\":{\"method\":{\"type\":\"string\"},\"url\":{\"type\":\"string\",\"format\":\"uri\"},\"httpVersion\":{\"type\":\"string\"},\"cookies\":{\"type\":\"array\",\"items\":{\"$ref\":\"cookie.json#\"}},\"headers\":{\"type\":\"array\",\"items\":{\"$ref\":\"header.json#\"}},\"queryString\":{\"type\":\"array\",\"items\":{\"$ref\":\"query.json#\"}},\"postData\":{\"$ref\":\"postData.json#\"},\"headersSize\":{\"type\":\"integer\"},\"bodySize\":{\"type\":\"integer\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 20702: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"response.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"type\":\"object\",\"required\":[\"status\",\"statusText\",\"httpVersion\",\"cookies\",\"headers\",\"content\",\"redirectURL\",\"headersSize\",\"bodySize\"],\"properties\":{\"status\":{\"type\":\"integer\"},\"statusText\":{\"type\":\"string\"},\"httpVersion\":{\"type\":\"string\"},\"cookies\":{\"type\":\"array\",\"items\":{\"$ref\":\"cookie.json#\"}},\"headers\":{\"type\":\"array\",\"items\":{\"$ref\":\"header.json#\"}},\"content\":{\"$ref\":\"content.json#\"},\"redirectURL\":{\"type\":\"string\"},\"headersSize\":{\"type\":\"integer\"},\"bodySize\":{\"type\":\"integer\"},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 36941: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"$id\":\"timings.json#\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"required\":[\"send\",\"wait\",\"receive\"],\"properties\":{\"dns\":{\"type\":\"number\",\"min\":-1},\"connect\":{\"type\":\"number\",\"min\":-1},\"blocked\":{\"type\":\"number\",\"min\":-1},\"send\":{\"type\":\"number\",\"min\":-1},\"wait\":{\"type\":\"number\",\"min\":-1},\"receive\":{\"type\":\"number\",\"min\":-1},\"ssl\":{\"type\":\"number\",\"min\":-1},\"comment\":{\"type\":\"string\"}}}"); /***/ }), /***/ 73313: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"application/3gpdash-qoe-report+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/3gpp-ims+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/a2l\":{\"source\":\"iana\"},\"application/activemessage\":{\"source\":\"iana\"},\"application/activity+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-directory+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcost+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcostparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointprop+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointpropparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-error+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamcontrol+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/aml\":{\"source\":\"iana\"},\"application/andrew-inset\":{\"source\":\"iana\",\"extensions\":[\"ez\"]},\"application/applefile\":{\"source\":\"iana\"},\"application/applixware\":{\"source\":\"apache\",\"extensions\":[\"aw\"]},\"application/atf\":{\"source\":\"iana\"},\"application/atfx\":{\"source\":\"iana\"},\"application/atom+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atom\"]},\"application/atomcat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomcat\"]},\"application/atomdeleted+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomdeleted\"]},\"application/atomicmail\":{\"source\":\"iana\"},\"application/atomsvc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomsvc\"]},\"application/atsc-dwd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dwd\"]},\"application/atsc-dynamic-event-message\":{\"source\":\"iana\"},\"application/atsc-held+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"held\"]},\"application/atsc-rdt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/atsc-rsat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsat\"]},\"application/atxml\":{\"source\":\"iana\"},\"application/auth-policy+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/bacnet-xdd+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/batch-smtp\":{\"source\":\"iana\"},\"application/bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/beep+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/calendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/calendar+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xcs\"]},\"application/call-completion\":{\"source\":\"iana\"},\"application/cals-1840\":{\"source\":\"iana\"},\"application/cap+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/cbor\":{\"source\":\"iana\"},\"application/cbor-seq\":{\"source\":\"iana\"},\"application/cccex\":{\"source\":\"iana\"},\"application/ccmp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ccxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ccxml\"]},\"application/cdfx+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdfx\"]},\"application/cdmi-capability\":{\"source\":\"iana\",\"extensions\":[\"cdmia\"]},\"application/cdmi-container\":{\"source\":\"iana\",\"extensions\":[\"cdmic\"]},\"application/cdmi-domain\":{\"source\":\"iana\",\"extensions\":[\"cdmid\"]},\"application/cdmi-object\":{\"source\":\"iana\",\"extensions\":[\"cdmio\"]},\"application/cdmi-queue\":{\"source\":\"iana\",\"extensions\":[\"cdmiq\"]},\"application/cdni\":{\"source\":\"iana\"},\"application/cea\":{\"source\":\"iana\"},\"application/cea-2018+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cellml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cfw\":{\"source\":\"iana\"},\"application/clue+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/clue_info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cms\":{\"source\":\"iana\"},\"application/cnrp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-group+json\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-payload\":{\"source\":\"iana\"},\"application/commonground\":{\"source\":\"iana\"},\"application/conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cose\":{\"source\":\"iana\"},\"application/cose-key\":{\"source\":\"iana\"},\"application/cose-key-set\":{\"source\":\"iana\"},\"application/cpl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csrattrs\":{\"source\":\"iana\"},\"application/csta+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cstadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csvm+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cu-seeme\":{\"source\":\"apache\",\"extensions\":[\"cu\"]},\"application/cwt\":{\"source\":\"iana\"},\"application/cybercash\":{\"source\":\"iana\"},\"application/dart\":{\"compressible\":true},\"application/dash+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpd\"]},\"application/dashdelta\":{\"source\":\"iana\"},\"application/davmount+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"davmount\"]},\"application/dca-rft\":{\"source\":\"iana\"},\"application/dcd\":{\"source\":\"iana\"},\"application/dec-dx\":{\"source\":\"iana\"},\"application/dialog-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom\":{\"source\":\"iana\"},\"application/dicom+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dii\":{\"source\":\"iana\"},\"application/dit\":{\"source\":\"iana\"},\"application/dns\":{\"source\":\"iana\"},\"application/dns+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dns-message\":{\"source\":\"iana\"},\"application/docbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dbk\"]},\"application/dots+cbor\":{\"source\":\"iana\"},\"application/dskpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dssc+der\":{\"source\":\"iana\",\"extensions\":[\"dssc\"]},\"application/dssc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdssc\"]},\"application/dvcs\":{\"source\":\"iana\"},\"application/ecmascript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ecma\",\"es\"]},\"application/edi-consent\":{\"source\":\"iana\"},\"application/edi-x12\":{\"source\":\"iana\",\"compressible\":false},\"application/edifact\":{\"source\":\"iana\",\"compressible\":false},\"application/efi\":{\"source\":\"iana\"},\"application/emergencycalldata.comment+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.deviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.ecall.msd\":{\"source\":\"iana\"},\"application/emergencycalldata.providerinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.serviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.subscriberinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.veds+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emma+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emma\"]},\"application/emotionml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emotionml\"]},\"application/encaprtp\":{\"source\":\"iana\"},\"application/epp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/epub+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"epub\"]},\"application/eshop\":{\"source\":\"iana\"},\"application/exi\":{\"source\":\"iana\",\"extensions\":[\"exi\"]},\"application/expect-ct-report+json\":{\"source\":\"iana\",\"compressible\":true},\"application/fastinfoset\":{\"source\":\"iana\"},\"application/fastsoap\":{\"source\":\"iana\"},\"application/fdt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fdt\"]},\"application/fhir+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fhir+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fido.trusted-apps+json\":{\"compressible\":true},\"application/fits\":{\"source\":\"iana\"},\"application/flexfec\":{\"source\":\"iana\"},\"application/font-sfnt\":{\"source\":\"iana\"},\"application/font-tdpfr\":{\"source\":\"iana\",\"extensions\":[\"pfr\"]},\"application/font-woff\":{\"source\":\"iana\",\"compressible\":false},\"application/framework-attributes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/geo+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"geojson\"]},\"application/geo+json-seq\":{\"source\":\"iana\"},\"application/geopackage+sqlite3\":{\"source\":\"iana\"},\"application/geoxacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/gltf-buffer\":{\"source\":\"iana\"},\"application/gml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gml\"]},\"application/gpx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"gpx\"]},\"application/gxf\":{\"source\":\"apache\",\"extensions\":[\"gxf\"]},\"application/gzip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gz\"]},\"application/h224\":{\"source\":\"iana\"},\"application/held+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/hjson\":{\"extensions\":[\"hjson\"]},\"application/http\":{\"source\":\"iana\"},\"application/hyperstudio\":{\"source\":\"iana\",\"extensions\":[\"stk\"]},\"application/ibe-key-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pkg-reply+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pp-data\":{\"source\":\"iana\"},\"application/iges\":{\"source\":\"iana\"},\"application/im-iscomposing+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/index\":{\"source\":\"iana\"},\"application/index.cmd\":{\"source\":\"iana\"},\"application/index.obj\":{\"source\":\"iana\"},\"application/index.response\":{\"source\":\"iana\"},\"application/index.vnd\":{\"source\":\"iana\"},\"application/inkml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ink\",\"inkml\"]},\"application/iotp\":{\"source\":\"iana\"},\"application/ipfix\":{\"source\":\"iana\",\"extensions\":[\"ipfix\"]},\"application/ipp\":{\"source\":\"iana\"},\"application/isup\":{\"source\":\"iana\"},\"application/its+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"its\"]},\"application/java-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jar\",\"war\",\"ear\"]},\"application/java-serialized-object\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"ser\"]},\"application/java-vm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"class\"]},\"application/javascript\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"js\",\"mjs\"]},\"application/jf2feed+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jose\":{\"source\":\"iana\"},\"application/jose+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jrd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"json\",\"map\"]},\"application/json-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json-seq\":{\"source\":\"iana\"},\"application/json5\":{\"extensions\":[\"json5\"]},\"application/jsonml+json\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"jsonml\"]},\"application/jwk+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwk-set+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwt\":{\"source\":\"iana\"},\"application/kpml-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/kpml-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ld+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"jsonld\"]},\"application/lgr+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lgr\"]},\"application/link-format\":{\"source\":\"iana\"},\"application/load-control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lost+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lostxml\"]},\"application/lostsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lpf+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/lxf\":{\"source\":\"iana\"},\"application/mac-binhex40\":{\"source\":\"iana\",\"extensions\":[\"hqx\"]},\"application/mac-compactpro\":{\"source\":\"apache\",\"extensions\":[\"cpt\"]},\"application/macwriteii\":{\"source\":\"iana\"},\"application/mads+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mads\"]},\"application/manifest+json\":{\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"webmanifest\"]},\"application/marc\":{\"source\":\"iana\",\"extensions\":[\"mrc\"]},\"application/marcxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mrcx\"]},\"application/mathematica\":{\"source\":\"iana\",\"extensions\":[\"ma\",\"nb\",\"mb\"]},\"application/mathml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mathml\"]},\"application/mathml-content+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mathml-presentation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-associated-procedure-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-deregister+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-envelope+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-protection-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-reception-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-schedule+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-user-service-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbox\":{\"source\":\"iana\",\"extensions\":[\"mbox\"]},\"application/media-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/media_control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mediaservercontrol+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mscml\"]},\"application/merge-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/metalink+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"metalink\"]},\"application/metalink4+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"meta4\"]},\"application/mets+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mets\"]},\"application/mf4\":{\"source\":\"iana\"},\"application/mikey\":{\"source\":\"iana\"},\"application/mipc\":{\"source\":\"iana\"},\"application/mmt-aei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"maei\"]},\"application/mmt-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musd\"]},\"application/mods+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mods\"]},\"application/moss-keys\":{\"source\":\"iana\"},\"application/moss-signature\":{\"source\":\"iana\"},\"application/mosskey-data\":{\"source\":\"iana\"},\"application/mosskey-request\":{\"source\":\"iana\"},\"application/mp21\":{\"source\":\"iana\",\"extensions\":[\"m21\",\"mp21\"]},\"application/mp4\":{\"source\":\"iana\",\"extensions\":[\"mp4s\",\"m4p\"]},\"application/mpeg4-generic\":{\"source\":\"iana\"},\"application/mpeg4-iod\":{\"source\":\"iana\"},\"application/mpeg4-iod-xmt\":{\"source\":\"iana\"},\"application/mrb-consumer+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/mrb-publish+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/msc-ivr+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msc-mixer+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msword\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"doc\",\"dot\"]},\"application/mud+json\":{\"source\":\"iana\",\"compressible\":true},\"application/multipart-core\":{\"source\":\"iana\"},\"application/mxf\":{\"source\":\"iana\",\"extensions\":[\"mxf\"]},\"application/n-quads\":{\"source\":\"iana\",\"extensions\":[\"nq\"]},\"application/n-triples\":{\"source\":\"iana\",\"extensions\":[\"nt\"]},\"application/nasdata\":{\"source\":\"iana\"},\"application/news-checkgroups\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-groupinfo\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-transmission\":{\"source\":\"iana\"},\"application/nlsml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/node\":{\"source\":\"iana\",\"extensions\":[\"cjs\"]},\"application/nss\":{\"source\":\"iana\"},\"application/ocsp-request\":{\"source\":\"iana\"},\"application/ocsp-response\":{\"source\":\"iana\"},\"application/octet-stream\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"bin\",\"dms\",\"lrf\",\"mar\",\"so\",\"dist\",\"distz\",\"pkg\",\"bpk\",\"dump\",\"elc\",\"deploy\",\"exe\",\"dll\",\"deb\",\"dmg\",\"iso\",\"img\",\"msi\",\"msp\",\"msm\",\"buffer\"]},\"application/oda\":{\"source\":\"iana\",\"extensions\":[\"oda\"]},\"application/odm+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/odx\":{\"source\":\"iana\"},\"application/oebps-package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"opf\"]},\"application/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogx\"]},\"application/omdoc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"omdoc\"]},\"application/onenote\":{\"source\":\"apache\",\"extensions\":[\"onetoc\",\"onetoc2\",\"onetmp\",\"onepkg\"]},\"application/oscore\":{\"source\":\"iana\"},\"application/oxps\":{\"source\":\"iana\",\"extensions\":[\"oxps\"]},\"application/p2p-overlay+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"relo\"]},\"application/parityfec\":{\"source\":\"iana\"},\"application/passport\":{\"source\":\"iana\"},\"application/patch-ops-error+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xer\"]},\"application/pdf\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pdf\"]},\"application/pdx\":{\"source\":\"iana\"},\"application/pem-certificate-chain\":{\"source\":\"iana\"},\"application/pgp-encrypted\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pgp\"]},\"application/pgp-keys\":{\"source\":\"iana\"},\"application/pgp-signature\":{\"source\":\"iana\",\"extensions\":[\"asc\",\"sig\"]},\"application/pics-rules\":{\"source\":\"apache\",\"extensions\":[\"prf\"]},\"application/pidf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pidf-diff+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pkcs10\":{\"source\":\"iana\",\"extensions\":[\"p10\"]},\"application/pkcs12\":{\"source\":\"iana\"},\"application/pkcs7-mime\":{\"source\":\"iana\",\"extensions\":[\"p7m\",\"p7c\"]},\"application/pkcs7-signature\":{\"source\":\"iana\",\"extensions\":[\"p7s\"]},\"application/pkcs8\":{\"source\":\"iana\",\"extensions\":[\"p8\"]},\"application/pkcs8-encrypted\":{\"source\":\"iana\"},\"application/pkix-attr-cert\":{\"source\":\"iana\",\"extensions\":[\"ac\"]},\"application/pkix-cert\":{\"source\":\"iana\",\"extensions\":[\"cer\"]},\"application/pkix-crl\":{\"source\":\"iana\",\"extensions\":[\"crl\"]},\"application/pkix-pkipath\":{\"source\":\"iana\",\"extensions\":[\"pkipath\"]},\"application/pkixcmp\":{\"source\":\"iana\",\"extensions\":[\"pki\"]},\"application/pls+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pls\"]},\"application/poc-settings+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/postscript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ai\",\"eps\",\"ps\"]},\"application/ppsp-tracker+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/provenance+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"provx\"]},\"application/prs.alvestrand.titrax-sheet\":{\"source\":\"iana\"},\"application/prs.cww\":{\"source\":\"iana\",\"extensions\":[\"cww\"]},\"application/prs.hpub+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/prs.nprend\":{\"source\":\"iana\"},\"application/prs.plucker\":{\"source\":\"iana\"},\"application/prs.rdf-xml-crypt\":{\"source\":\"iana\"},\"application/prs.xsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/pskc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pskcxml\"]},\"application/pvd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/qsig\":{\"source\":\"iana\"},\"application/raml+yaml\":{\"compressible\":true,\"extensions\":[\"raml\"]},\"application/raptorfec\":{\"source\":\"iana\"},\"application/rdap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/rdf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rdf\",\"owl\"]},\"application/reginfo+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rif\"]},\"application/relax-ng-compact-syntax\":{\"source\":\"iana\",\"extensions\":[\"rnc\"]},\"application/remote-printing\":{\"source\":\"iana\"},\"application/reputon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/resource-lists+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rl\"]},\"application/resource-lists-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rld\"]},\"application/rfc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/riscos\":{\"source\":\"iana\"},\"application/rlmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/rls-services+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rs\"]},\"application/route-apd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rapd\"]},\"application/route-s-tsid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sls\"]},\"application/route-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rusd\"]},\"application/rpki-ghostbusters\":{\"source\":\"iana\",\"extensions\":[\"gbr\"]},\"application/rpki-manifest\":{\"source\":\"iana\",\"extensions\":[\"mft\"]},\"application/rpki-publication\":{\"source\":\"iana\"},\"application/rpki-roa\":{\"source\":\"iana\",\"extensions\":[\"roa\"]},\"application/rpki-updown\":{\"source\":\"iana\"},\"application/rsd+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rsd\"]},\"application/rss+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rss\"]},\"application/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"application/rtploopback\":{\"source\":\"iana\"},\"application/rtx\":{\"source\":\"iana\"},\"application/samlassertion+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/samlmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sbe\":{\"source\":\"iana\"},\"application/sbml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sbml\"]},\"application/scaip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/scim+json\":{\"source\":\"iana\",\"compressible\":true},\"application/scvp-cv-request\":{\"source\":\"iana\",\"extensions\":[\"scq\"]},\"application/scvp-cv-response\":{\"source\":\"iana\",\"extensions\":[\"scs\"]},\"application/scvp-vp-request\":{\"source\":\"iana\",\"extensions\":[\"spq\"]},\"application/scvp-vp-response\":{\"source\":\"iana\",\"extensions\":[\"spp\"]},\"application/sdp\":{\"source\":\"iana\",\"extensions\":[\"sdp\"]},\"application/secevent+jwt\":{\"source\":\"iana\"},\"application/senml+cbor\":{\"source\":\"iana\"},\"application/senml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"senmlx\"]},\"application/senml-etch+cbor\":{\"source\":\"iana\"},\"application/senml-etch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml-exi\":{\"source\":\"iana\"},\"application/sensml+cbor\":{\"source\":\"iana\"},\"application/sensml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sensml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sensmlx\"]},\"application/sensml-exi\":{\"source\":\"iana\"},\"application/sep+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sep-exi\":{\"source\":\"iana\"},\"application/session-info\":{\"source\":\"iana\"},\"application/set-payment\":{\"source\":\"iana\"},\"application/set-payment-initiation\":{\"source\":\"iana\",\"extensions\":[\"setpay\"]},\"application/set-registration\":{\"source\":\"iana\"},\"application/set-registration-initiation\":{\"source\":\"iana\",\"extensions\":[\"setreg\"]},\"application/sgml\":{\"source\":\"iana\"},\"application/sgml-open-catalog\":{\"source\":\"iana\"},\"application/shf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"shf\"]},\"application/sieve\":{\"source\":\"iana\",\"extensions\":[\"siv\",\"sieve\"]},\"application/simple-filter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/simple-message-summary\":{\"source\":\"iana\"},\"application/simplesymbolcontainer\":{\"source\":\"iana\"},\"application/sipc\":{\"source\":\"iana\"},\"application/slate\":{\"source\":\"iana\"},\"application/smil\":{\"source\":\"iana\"},\"application/smil+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"smi\",\"smil\"]},\"application/smpte336m\":{\"source\":\"iana\"},\"application/soap+fastinfoset\":{\"source\":\"iana\"},\"application/soap+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sparql-query\":{\"source\":\"iana\",\"extensions\":[\"rq\"]},\"application/sparql-results+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"srx\"]},\"application/spirits-event+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sql\":{\"source\":\"iana\"},\"application/srgs\":{\"source\":\"iana\",\"extensions\":[\"gram\"]},\"application/srgs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"grxml\"]},\"application/sru+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sru\"]},\"application/ssdl+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ssdl\"]},\"application/ssml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ssml\"]},\"application/stix+json\":{\"source\":\"iana\",\"compressible\":true},\"application/swid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"swidtag\"]},\"application/tamp-apex-update\":{\"source\":\"iana\"},\"application/tamp-apex-update-confirm\":{\"source\":\"iana\"},\"application/tamp-community-update\":{\"source\":\"iana\"},\"application/tamp-community-update-confirm\":{\"source\":\"iana\"},\"application/tamp-error\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust-confirm\":{\"source\":\"iana\"},\"application/tamp-status-query\":{\"source\":\"iana\"},\"application/tamp-status-response\":{\"source\":\"iana\"},\"application/tamp-update\":{\"source\":\"iana\"},\"application/tamp-update-confirm\":{\"source\":\"iana\"},\"application/tar\":{\"compressible\":true},\"application/taxii+json\":{\"source\":\"iana\",\"compressible\":true},\"application/td+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tei\",\"teicorpus\"]},\"application/tetra_isi\":{\"source\":\"iana\"},\"application/thraud+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tfi\"]},\"application/timestamp-query\":{\"source\":\"iana\"},\"application/timestamp-reply\":{\"source\":\"iana\"},\"application/timestamped-data\":{\"source\":\"iana\",\"extensions\":[\"tsd\"]},\"application/tlsrpt+gzip\":{\"source\":\"iana\"},\"application/tlsrpt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tnauthlist\":{\"source\":\"iana\"},\"application/toml\":{\"compressible\":true,\"extensions\":[\"toml\"]},\"application/trickle-ice-sdpfrag\":{\"source\":\"iana\"},\"application/trig\":{\"source\":\"iana\"},\"application/ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttml\"]},\"application/tve-trigger\":{\"source\":\"iana\"},\"application/tzif\":{\"source\":\"iana\"},\"application/tzif-leap\":{\"source\":\"iana\"},\"application/ulpfec\":{\"source\":\"iana\"},\"application/urc-grpsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/urc-ressheet+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsheet\"]},\"application/urc-targetdesc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/urc-uisocketdesc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vemmi\":{\"source\":\"iana\"},\"application/vividence.scriptfile\":{\"source\":\"apache\"},\"application/vnd.1000minds.decision-model+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"1km\"]},\"application/vnd.3gpp-prose+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-prose-pc3ch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-v2x-local-service-information\":{\"source\":\"iana\"},\"application/vnd.3gpp.access-transfer-events+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.bsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.gmop+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mc-signalling-ear\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-payload\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-signalling\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-floor-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-signed+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-init-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-transmission-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mid-call+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.pic-bw-large\":{\"source\":\"iana\",\"extensions\":[\"plb\"]},\"application/vnd.3gpp.pic-bw-small\":{\"source\":\"iana\",\"extensions\":[\"psb\"]},\"application/vnd.3gpp.pic-bw-var\":{\"source\":\"iana\",\"extensions\":[\"pvb\"]},\"application/vnd.3gpp.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-ext+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.state-and-event-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.ussd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.bcmcsinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp2.tcap\":{\"source\":\"iana\",\"extensions\":[\"tcap\"]},\"application/vnd.3lightssoftware.imagescal\":{\"source\":\"iana\"},\"application/vnd.3m.post-it-notes\":{\"source\":\"iana\",\"extensions\":[\"pwn\"]},\"application/vnd.accpac.simply.aso\":{\"source\":\"iana\",\"extensions\":[\"aso\"]},\"application/vnd.accpac.simply.imp\":{\"source\":\"iana\",\"extensions\":[\"imp\"]},\"application/vnd.acucobol\":{\"source\":\"iana\",\"extensions\":[\"acu\"]},\"application/vnd.acucorp\":{\"source\":\"iana\",\"extensions\":[\"atc\",\"acutc\"]},\"application/vnd.adobe.air-application-installer-package+zip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"air\"]},\"application/vnd.adobe.flash.movie\":{\"source\":\"iana\"},\"application/vnd.adobe.formscentral.fcdt\":{\"source\":\"iana\",\"extensions\":[\"fcdt\"]},\"application/vnd.adobe.fxp\":{\"source\":\"iana\",\"extensions\":[\"fxp\",\"fxpl\"]},\"application/vnd.adobe.partial-upload\":{\"source\":\"iana\"},\"application/vnd.adobe.xdp+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdp\"]},\"application/vnd.adobe.xfdf\":{\"source\":\"iana\",\"extensions\":[\"xfdf\"]},\"application/vnd.aether.imp\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata-pagedef\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-charset\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codedfont\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codepage\":{\"source\":\"iana\"},\"application/vnd.afpc.modca\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-formdef\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-mediummap\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-objectcontainer\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-overlay\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-pagesegment\":{\"source\":\"iana\"},\"application/vnd.ah-barcode\":{\"source\":\"iana\"},\"application/vnd.ahead.space\":{\"source\":\"iana\",\"extensions\":[\"ahead\"]},\"application/vnd.airzip.filesecure.azf\":{\"source\":\"iana\",\"extensions\":[\"azf\"]},\"application/vnd.airzip.filesecure.azs\":{\"source\":\"iana\",\"extensions\":[\"azs\"]},\"application/vnd.amadeus+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.amazon.ebook\":{\"source\":\"apache\",\"extensions\":[\"azw\"]},\"application/vnd.amazon.mobi8-ebook\":{\"source\":\"iana\"},\"application/vnd.americandynamics.acc\":{\"source\":\"iana\",\"extensions\":[\"acc\"]},\"application/vnd.amiga.ami\":{\"source\":\"iana\",\"extensions\":[\"ami\"]},\"application/vnd.amundsen.maze+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.android.ota\":{\"source\":\"iana\"},\"application/vnd.android.package-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"apk\"]},\"application/vnd.anki\":{\"source\":\"iana\"},\"application/vnd.anser-web-certificate-issue-initiation\":{\"source\":\"iana\",\"extensions\":[\"cii\"]},\"application/vnd.anser-web-funds-transfer-initiation\":{\"source\":\"apache\",\"extensions\":[\"fti\"]},\"application/vnd.antix.game-component\":{\"source\":\"iana\",\"extensions\":[\"atx\"]},\"application/vnd.apache.thrift.binary\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.compact\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.json\":{\"source\":\"iana\"},\"application/vnd.api+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.aplextor.warrp+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apothekende.reservation+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apple.installer+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpkg\"]},\"application/vnd.apple.keynote\":{\"source\":\"iana\",\"extensions\":[\"keynote\"]},\"application/vnd.apple.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"m3u8\"]},\"application/vnd.apple.numbers\":{\"source\":\"iana\",\"extensions\":[\"numbers\"]},\"application/vnd.apple.pages\":{\"source\":\"iana\",\"extensions\":[\"pages\"]},\"application/vnd.apple.pkpass\":{\"compressible\":false,\"extensions\":[\"pkpass\"]},\"application/vnd.arastra.swi\":{\"source\":\"iana\"},\"application/vnd.aristanetworks.swi\":{\"source\":\"iana\",\"extensions\":[\"swi\"]},\"application/vnd.artisan+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.artsquare\":{\"source\":\"iana\"},\"application/vnd.astraea-software.iota\":{\"source\":\"iana\",\"extensions\":[\"iota\"]},\"application/vnd.audiograph\":{\"source\":\"iana\",\"extensions\":[\"aep\"]},\"application/vnd.autopackage\":{\"source\":\"iana\"},\"application/vnd.avalon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.avistar+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.balsamiq.bmml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmml\"]},\"application/vnd.balsamiq.bmpr\":{\"source\":\"iana\"},\"application/vnd.banana-accounting\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.error\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bekitzur-stech+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bint.med-content\":{\"source\":\"iana\"},\"application/vnd.biopax.rdf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.blink-idb-value-wrapper\":{\"source\":\"iana\"},\"application/vnd.blueice.multipass\":{\"source\":\"iana\",\"extensions\":[\"mpm\"]},\"application/vnd.bluetooth.ep.oob\":{\"source\":\"iana\"},\"application/vnd.bluetooth.le.oob\":{\"source\":\"iana\"},\"application/vnd.bmi\":{\"source\":\"iana\",\"extensions\":[\"bmi\"]},\"application/vnd.bpf\":{\"source\":\"iana\"},\"application/vnd.bpf3\":{\"source\":\"iana\"},\"application/vnd.businessobjects\":{\"source\":\"iana\",\"extensions\":[\"rep\"]},\"application/vnd.byu.uapi+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cab-jscript\":{\"source\":\"iana\"},\"application/vnd.canon-cpdl\":{\"source\":\"iana\"},\"application/vnd.canon-lips\":{\"source\":\"iana\"},\"application/vnd.capasystems-pg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cendio.thinlinc.clientconf\":{\"source\":\"iana\"},\"application/vnd.century-systems.tcp_stream\":{\"source\":\"iana\"},\"application/vnd.chemdraw+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdxml\"]},\"application/vnd.chess-pgn\":{\"source\":\"iana\"},\"application/vnd.chipnuts.karaoke-mmd\":{\"source\":\"iana\",\"extensions\":[\"mmd\"]},\"application/vnd.ciedi\":{\"source\":\"iana\"},\"application/vnd.cinderella\":{\"source\":\"iana\",\"extensions\":[\"cdy\"]},\"application/vnd.cirpack.isdn-ext\":{\"source\":\"iana\"},\"application/vnd.citationstyles.style+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csl\"]},\"application/vnd.claymore\":{\"source\":\"iana\",\"extensions\":[\"cla\"]},\"application/vnd.cloanto.rp9\":{\"source\":\"iana\",\"extensions\":[\"rp9\"]},\"application/vnd.clonk.c4group\":{\"source\":\"iana\",\"extensions\":[\"c4g\",\"c4d\",\"c4f\",\"c4p\",\"c4u\"]},\"application/vnd.cluetrust.cartomobile-config\":{\"source\":\"iana\",\"extensions\":[\"c11amc\"]},\"application/vnd.cluetrust.cartomobile-config-pkg\":{\"source\":\"iana\",\"extensions\":[\"c11amz\"]},\"application/vnd.coffeescript\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet-template\":{\"source\":\"iana\"},\"application/vnd.collection+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.doc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.next+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.comicbook+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.comicbook-rar\":{\"source\":\"iana\"},\"application/vnd.commerce-battelle\":{\"source\":\"iana\"},\"application/vnd.commonspace\":{\"source\":\"iana\",\"extensions\":[\"csp\"]},\"application/vnd.contact.cmsg\":{\"source\":\"iana\",\"extensions\":[\"cdbcmsg\"]},\"application/vnd.coreos.ignition+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cosmocaller\":{\"source\":\"iana\",\"extensions\":[\"cmc\"]},\"application/vnd.crick.clicker\":{\"source\":\"iana\",\"extensions\":[\"clkx\"]},\"application/vnd.crick.clicker.keyboard\":{\"source\":\"iana\",\"extensions\":[\"clkk\"]},\"application/vnd.crick.clicker.palette\":{\"source\":\"iana\",\"extensions\":[\"clkp\"]},\"application/vnd.crick.clicker.template\":{\"source\":\"iana\",\"extensions\":[\"clkt\"]},\"application/vnd.crick.clicker.wordbank\":{\"source\":\"iana\",\"extensions\":[\"clkw\"]},\"application/vnd.criticaltools.wbs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wbs\"]},\"application/vnd.cryptii.pipe+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.crypto-shade-file\":{\"source\":\"iana\"},\"application/vnd.ctc-posml\":{\"source\":\"iana\",\"extensions\":[\"pml\"]},\"application/vnd.ctct.ws+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cups-pdf\":{\"source\":\"iana\"},\"application/vnd.cups-postscript\":{\"source\":\"iana\"},\"application/vnd.cups-ppd\":{\"source\":\"iana\",\"extensions\":[\"ppd\"]},\"application/vnd.cups-raster\":{\"source\":\"iana\"},\"application/vnd.cups-raw\":{\"source\":\"iana\"},\"application/vnd.curl\":{\"source\":\"iana\"},\"application/vnd.curl.car\":{\"source\":\"apache\",\"extensions\":[\"car\"]},\"application/vnd.curl.pcurl\":{\"source\":\"apache\",\"extensions\":[\"pcurl\"]},\"application/vnd.cyan.dean.root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cybank\":{\"source\":\"iana\"},\"application/vnd.d2l.coursepackage1p0+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.dart\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dart\"]},\"application/vnd.data-vision.rdz\":{\"source\":\"iana\",\"extensions\":[\"rdz\"]},\"application/vnd.datapackage+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dataresource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dbf\":{\"source\":\"iana\"},\"application/vnd.debian.binary-package\":{\"source\":\"iana\"},\"application/vnd.dece.data\":{\"source\":\"iana\",\"extensions\":[\"uvf\",\"uvvf\",\"uvd\",\"uvvd\"]},\"application/vnd.dece.ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uvt\",\"uvvt\"]},\"application/vnd.dece.unspecified\":{\"source\":\"iana\",\"extensions\":[\"uvx\",\"uvvx\"]},\"application/vnd.dece.zip\":{\"source\":\"iana\",\"extensions\":[\"uvz\",\"uvvz\"]},\"application/vnd.denovo.fcselayout-link\":{\"source\":\"iana\",\"extensions\":[\"fe_launch\"]},\"application/vnd.desmume.movie\":{\"source\":\"iana\"},\"application/vnd.dir-bi.plate-dl-nosuffix\":{\"source\":\"iana\"},\"application/vnd.dm.delegation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dna\":{\"source\":\"iana\",\"extensions\":[\"dna\"]},\"application/vnd.document+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dolby.mlp\":{\"source\":\"apache\",\"extensions\":[\"mlp\"]},\"application/vnd.dolby.mobile.1\":{\"source\":\"iana\"},\"application/vnd.dolby.mobile.2\":{\"source\":\"iana\"},\"application/vnd.doremir.scorecloud-binary-document\":{\"source\":\"iana\"},\"application/vnd.dpgraph\":{\"source\":\"iana\",\"extensions\":[\"dpg\"]},\"application/vnd.dreamfactory\":{\"source\":\"iana\",\"extensions\":[\"dfac\"]},\"application/vnd.drive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ds-keypoint\":{\"source\":\"apache\",\"extensions\":[\"kpxx\"]},\"application/vnd.dtg.local\":{\"source\":\"iana\"},\"application/vnd.dtg.local.flash\":{\"source\":\"iana\"},\"application/vnd.dtg.local.html\":{\"source\":\"iana\"},\"application/vnd.dvb.ait\":{\"source\":\"iana\",\"extensions\":[\"ait\"]},\"application/vnd.dvb.dvbisl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.dvbj\":{\"source\":\"iana\"},\"application/vnd.dvb.esgcontainer\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcdftnotifaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess2\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgpdd\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcroaming\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-base\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-enhancement\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-aggregate-root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-container+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-generic+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-msglist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-init+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.pfr\":{\"source\":\"iana\"},\"application/vnd.dvb.service\":{\"source\":\"iana\",\"extensions\":[\"svc\"]},\"application/vnd.dxr\":{\"source\":\"iana\"},\"application/vnd.dynageo\":{\"source\":\"iana\",\"extensions\":[\"geo\"]},\"application/vnd.dzr\":{\"source\":\"iana\"},\"application/vnd.easykaraoke.cdgdownload\":{\"source\":\"iana\"},\"application/vnd.ecdis-update\":{\"source\":\"iana\"},\"application/vnd.ecip.rlp\":{\"source\":\"iana\"},\"application/vnd.ecowin.chart\":{\"source\":\"iana\",\"extensions\":[\"mag\"]},\"application/vnd.ecowin.filerequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.fileupdate\":{\"source\":\"iana\"},\"application/vnd.ecowin.series\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesrequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesupdate\":{\"source\":\"iana\"},\"application/vnd.efi.img\":{\"source\":\"iana\"},\"application/vnd.efi.iso\":{\"source\":\"iana\"},\"application/vnd.emclient.accessrequest+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.enliven\":{\"source\":\"iana\",\"extensions\":[\"nml\"]},\"application/vnd.enphase.envoy\":{\"source\":\"iana\"},\"application/vnd.eprints.data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.epson.esf\":{\"source\":\"iana\",\"extensions\":[\"esf\"]},\"application/vnd.epson.msf\":{\"source\":\"iana\",\"extensions\":[\"msf\"]},\"application/vnd.epson.quickanime\":{\"source\":\"iana\",\"extensions\":[\"qam\"]},\"application/vnd.epson.salt\":{\"source\":\"iana\",\"extensions\":[\"slt\"]},\"application/vnd.epson.ssf\":{\"source\":\"iana\",\"extensions\":[\"ssf\"]},\"application/vnd.ericsson.quickcall\":{\"source\":\"iana\"},\"application/vnd.espass-espass+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.eszigno3+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"es3\",\"et3\"]},\"application/vnd.etsi.aoc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.asic-e+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.asic-s+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.cug+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvcommand+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-bc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-cod+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-npvr+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvservice+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mcid+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mheg5\":{\"source\":\"iana\"},\"application/vnd.etsi.overload-control-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.pstn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.sci+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.simservs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.timestamp-token\":{\"source\":\"iana\"},\"application/vnd.etsi.tsl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.tsl.der\":{\"source\":\"iana\"},\"application/vnd.eudora.data\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.profile\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.settings\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.theme\":{\"source\":\"iana\"},\"application/vnd.exstream-empower+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.exstream-package\":{\"source\":\"iana\"},\"application/vnd.ezpix-album\":{\"source\":\"iana\",\"extensions\":[\"ez2\"]},\"application/vnd.ezpix-package\":{\"source\":\"iana\",\"extensions\":[\"ez3\"]},\"application/vnd.f-secure.mobile\":{\"source\":\"iana\"},\"application/vnd.fastcopy-disk-image\":{\"source\":\"iana\"},\"application/vnd.fdf\":{\"source\":\"iana\",\"extensions\":[\"fdf\"]},\"application/vnd.fdsn.mseed\":{\"source\":\"iana\",\"extensions\":[\"mseed\"]},\"application/vnd.fdsn.seed\":{\"source\":\"iana\",\"extensions\":[\"seed\",\"dataless\"]},\"application/vnd.ffsns\":{\"source\":\"iana\"},\"application/vnd.ficlab.flb+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.filmit.zfc\":{\"source\":\"iana\"},\"application/vnd.fints\":{\"source\":\"iana\"},\"application/vnd.firemonkeys.cloudcell\":{\"source\":\"iana\"},\"application/vnd.flographit\":{\"source\":\"iana\",\"extensions\":[\"gph\"]},\"application/vnd.fluxtime.clip\":{\"source\":\"iana\",\"extensions\":[\"ftc\"]},\"application/vnd.font-fontforge-sfd\":{\"source\":\"iana\"},\"application/vnd.framemaker\":{\"source\":\"iana\",\"extensions\":[\"fm\",\"frame\",\"maker\",\"book\"]},\"application/vnd.frogans.fnc\":{\"source\":\"iana\",\"extensions\":[\"fnc\"]},\"application/vnd.frogans.ltf\":{\"source\":\"iana\",\"extensions\":[\"ltf\"]},\"application/vnd.fsc.weblaunch\":{\"source\":\"iana\",\"extensions\":[\"fsc\"]},\"application/vnd.fujitsu.oasys\":{\"source\":\"iana\",\"extensions\":[\"oas\"]},\"application/vnd.fujitsu.oasys2\":{\"source\":\"iana\",\"extensions\":[\"oa2\"]},\"application/vnd.fujitsu.oasys3\":{\"source\":\"iana\",\"extensions\":[\"oa3\"]},\"application/vnd.fujitsu.oasysgp\":{\"source\":\"iana\",\"extensions\":[\"fg5\"]},\"application/vnd.fujitsu.oasysprs\":{\"source\":\"iana\",\"extensions\":[\"bh2\"]},\"application/vnd.fujixerox.art-ex\":{\"source\":\"iana\"},\"application/vnd.fujixerox.art4\":{\"source\":\"iana\"},\"application/vnd.fujixerox.ddd\":{\"source\":\"iana\",\"extensions\":[\"ddd\"]},\"application/vnd.fujixerox.docuworks\":{\"source\":\"iana\",\"extensions\":[\"xdw\"]},\"application/vnd.fujixerox.docuworks.binder\":{\"source\":\"iana\",\"extensions\":[\"xbd\"]},\"application/vnd.fujixerox.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujixerox.hbpl\":{\"source\":\"iana\"},\"application/vnd.fut-misnet\":{\"source\":\"iana\"},\"application/vnd.futoin+cbor\":{\"source\":\"iana\"},\"application/vnd.futoin+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.fuzzysheet\":{\"source\":\"iana\",\"extensions\":[\"fzs\"]},\"application/vnd.genomatix.tuxedo\":{\"source\":\"iana\",\"extensions\":[\"txd\"]},\"application/vnd.gentics.grd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geo+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geocube+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geogebra.file\":{\"source\":\"iana\",\"extensions\":[\"ggb\"]},\"application/vnd.geogebra.tool\":{\"source\":\"iana\",\"extensions\":[\"ggt\"]},\"application/vnd.geometry-explorer\":{\"source\":\"iana\",\"extensions\":[\"gex\",\"gre\"]},\"application/vnd.geonext\":{\"source\":\"iana\",\"extensions\":[\"gxt\"]},\"application/vnd.geoplan\":{\"source\":\"iana\",\"extensions\":[\"g2w\"]},\"application/vnd.geospace\":{\"source\":\"iana\",\"extensions\":[\"g3w\"]},\"application/vnd.gerber\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt-response\":{\"source\":\"iana\"},\"application/vnd.gmx\":{\"source\":\"iana\",\"extensions\":[\"gmx\"]},\"application/vnd.google-apps.document\":{\"compressible\":false,\"extensions\":[\"gdoc\"]},\"application/vnd.google-apps.presentation\":{\"compressible\":false,\"extensions\":[\"gslides\"]},\"application/vnd.google-apps.spreadsheet\":{\"compressible\":false,\"extensions\":[\"gsheet\"]},\"application/vnd.google-earth.kml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"kml\"]},\"application/vnd.google-earth.kmz\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"kmz\"]},\"application/vnd.gov.sk.e-form+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.gov.sk.e-form+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.gov.sk.xmldatacontainer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.grafeq\":{\"source\":\"iana\",\"extensions\":[\"gqf\",\"gqs\"]},\"application/vnd.gridmp\":{\"source\":\"iana\"},\"application/vnd.groove-account\":{\"source\":\"iana\",\"extensions\":[\"gac\"]},\"application/vnd.groove-help\":{\"source\":\"iana\",\"extensions\":[\"ghf\"]},\"application/vnd.groove-identity-message\":{\"source\":\"iana\",\"extensions\":[\"gim\"]},\"application/vnd.groove-injector\":{\"source\":\"iana\",\"extensions\":[\"grv\"]},\"application/vnd.groove-tool-message\":{\"source\":\"iana\",\"extensions\":[\"gtm\"]},\"application/vnd.groove-tool-template\":{\"source\":\"iana\",\"extensions\":[\"tpl\"]},\"application/vnd.groove-vcard\":{\"source\":\"iana\",\"extensions\":[\"vcg\"]},\"application/vnd.hal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hal+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"hal\"]},\"application/vnd.handheld-entertainment+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zmm\"]},\"application/vnd.hbci\":{\"source\":\"iana\",\"extensions\":[\"hbci\"]},\"application/vnd.hc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hcl-bireports\":{\"source\":\"iana\"},\"application/vnd.hdt\":{\"source\":\"iana\"},\"application/vnd.heroku+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hhe.lesson-player\":{\"source\":\"iana\",\"extensions\":[\"les\"]},\"application/vnd.hp-hpgl\":{\"source\":\"iana\",\"extensions\":[\"hpgl\"]},\"application/vnd.hp-hpid\":{\"source\":\"iana\",\"extensions\":[\"hpid\"]},\"application/vnd.hp-hps\":{\"source\":\"iana\",\"extensions\":[\"hps\"]},\"application/vnd.hp-jlyt\":{\"source\":\"iana\",\"extensions\":[\"jlt\"]},\"application/vnd.hp-pcl\":{\"source\":\"iana\",\"extensions\":[\"pcl\"]},\"application/vnd.hp-pclxl\":{\"source\":\"iana\",\"extensions\":[\"pclxl\"]},\"application/vnd.httphone\":{\"source\":\"iana\"},\"application/vnd.hydrostatix.sof-data\":{\"source\":\"iana\",\"extensions\":[\"sfd-hdstx\"]},\"application/vnd.hyper+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyper-item+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyperdrive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hzn-3d-crossword\":{\"source\":\"iana\"},\"application/vnd.ibm.afplinedata\":{\"source\":\"iana\"},\"application/vnd.ibm.electronic-media\":{\"source\":\"iana\"},\"application/vnd.ibm.minipay\":{\"source\":\"iana\",\"extensions\":[\"mpy\"]},\"application/vnd.ibm.modcap\":{\"source\":\"iana\",\"extensions\":[\"afp\",\"listafp\",\"list3820\"]},\"application/vnd.ibm.rights-management\":{\"source\":\"iana\",\"extensions\":[\"irm\"]},\"application/vnd.ibm.secure-container\":{\"source\":\"iana\",\"extensions\":[\"sc\"]},\"application/vnd.iccprofile\":{\"source\":\"iana\",\"extensions\":[\"icc\",\"icm\"]},\"application/vnd.ieee.1905\":{\"source\":\"iana\"},\"application/vnd.igloader\":{\"source\":\"iana\",\"extensions\":[\"igl\"]},\"application/vnd.imagemeter.folder+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.imagemeter.image+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.immervision-ivp\":{\"source\":\"iana\",\"extensions\":[\"ivp\"]},\"application/vnd.immervision-ivu\":{\"source\":\"iana\",\"extensions\":[\"ivu\"]},\"application/vnd.ims.imsccv1p1\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p2\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p3\":{\"source\":\"iana\"},\"application/vnd.ims.lis.v2.result+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolconsumerprofile+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy.id+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings.simple+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informedcontrol.rms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informix-visionary\":{\"source\":\"iana\"},\"application/vnd.infotech.project\":{\"source\":\"iana\"},\"application/vnd.infotech.project+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.innopath.wamp.notification\":{\"source\":\"iana\"},\"application/vnd.insors.igm\":{\"source\":\"iana\",\"extensions\":[\"igm\"]},\"application/vnd.intercon.formnet\":{\"source\":\"iana\",\"extensions\":[\"xpw\",\"xpx\"]},\"application/vnd.intergeo\":{\"source\":\"iana\",\"extensions\":[\"i2g\"]},\"application/vnd.intertrust.digibox\":{\"source\":\"iana\"},\"application/vnd.intertrust.nncp\":{\"source\":\"iana\"},\"application/vnd.intu.qbo\":{\"source\":\"iana\",\"extensions\":[\"qbo\"]},\"application/vnd.intu.qfx\":{\"source\":\"iana\",\"extensions\":[\"qfx\"]},\"application/vnd.iptc.g2.catalogitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.conceptitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.knowledgeitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.packageitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.planningitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ipunplugged.rcprofile\":{\"source\":\"iana\",\"extensions\":[\"rcprofile\"]},\"application/vnd.irepository.package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"irp\"]},\"application/vnd.is-xpr\":{\"source\":\"iana\",\"extensions\":[\"xpr\"]},\"application/vnd.isac.fcs\":{\"source\":\"iana\",\"extensions\":[\"fcs\"]},\"application/vnd.iso11783-10+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.jam\":{\"source\":\"iana\",\"extensions\":[\"jam\"]},\"application/vnd.japannet-directory-service\":{\"source\":\"iana\"},\"application/vnd.japannet-jpnstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-payment-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-registration\":{\"source\":\"iana\"},\"application/vnd.japannet-registration-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-setstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-verification\":{\"source\":\"iana\"},\"application/vnd.japannet-verification-wakeup\":{\"source\":\"iana\"},\"application/vnd.jcp.javame.midlet-rms\":{\"source\":\"iana\",\"extensions\":[\"rms\"]},\"application/vnd.jisp\":{\"source\":\"iana\",\"extensions\":[\"jisp\"]},\"application/vnd.joost.joda-archive\":{\"source\":\"iana\",\"extensions\":[\"joda\"]},\"application/vnd.jsk.isdn-ngn\":{\"source\":\"iana\"},\"application/vnd.kahootz\":{\"source\":\"iana\",\"extensions\":[\"ktz\",\"ktr\"]},\"application/vnd.kde.karbon\":{\"source\":\"iana\",\"extensions\":[\"karbon\"]},\"application/vnd.kde.kchart\":{\"source\":\"iana\",\"extensions\":[\"chrt\"]},\"application/vnd.kde.kformula\":{\"source\":\"iana\",\"extensions\":[\"kfo\"]},\"application/vnd.kde.kivio\":{\"source\":\"iana\",\"extensions\":[\"flw\"]},\"application/vnd.kde.kontour\":{\"source\":\"iana\",\"extensions\":[\"kon\"]},\"application/vnd.kde.kpresenter\":{\"source\":\"iana\",\"extensions\":[\"kpr\",\"kpt\"]},\"application/vnd.kde.kspread\":{\"source\":\"iana\",\"extensions\":[\"ksp\"]},\"application/vnd.kde.kword\":{\"source\":\"iana\",\"extensions\":[\"kwd\",\"kwt\"]},\"application/vnd.kenameaapp\":{\"source\":\"iana\",\"extensions\":[\"htke\"]},\"application/vnd.kidspiration\":{\"source\":\"iana\",\"extensions\":[\"kia\"]},\"application/vnd.kinar\":{\"source\":\"iana\",\"extensions\":[\"kne\",\"knp\"]},\"application/vnd.koan\":{\"source\":\"iana\",\"extensions\":[\"skp\",\"skd\",\"skt\",\"skm\"]},\"application/vnd.kodak-descriptor\":{\"source\":\"iana\",\"extensions\":[\"sse\"]},\"application/vnd.las\":{\"source\":\"iana\"},\"application/vnd.las.las+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.las.las+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lasxml\"]},\"application/vnd.laszip\":{\"source\":\"iana\"},\"application/vnd.leap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.liberty-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.llamagraphics.life-balance.desktop\":{\"source\":\"iana\",\"extensions\":[\"lbd\"]},\"application/vnd.llamagraphics.life-balance.exchange+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lbe\"]},\"application/vnd.logipipe.circuit+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.loom\":{\"source\":\"iana\"},\"application/vnd.lotus-1-2-3\":{\"source\":\"iana\",\"extensions\":[\"123\"]},\"application/vnd.lotus-approach\":{\"source\":\"iana\",\"extensions\":[\"apr\"]},\"application/vnd.lotus-freelance\":{\"source\":\"iana\",\"extensions\":[\"pre\"]},\"application/vnd.lotus-notes\":{\"source\":\"iana\",\"extensions\":[\"nsf\"]},\"application/vnd.lotus-organizer\":{\"source\":\"iana\",\"extensions\":[\"org\"]},\"application/vnd.lotus-screencam\":{\"source\":\"iana\",\"extensions\":[\"scm\"]},\"application/vnd.lotus-wordpro\":{\"source\":\"iana\",\"extensions\":[\"lwp\"]},\"application/vnd.macports.portpkg\":{\"source\":\"iana\",\"extensions\":[\"portpkg\"]},\"application/vnd.mapbox-vector-tile\":{\"source\":\"iana\"},\"application/vnd.marlin.drm.actiontoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.conftoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.license+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.mdcf\":{\"source\":\"iana\"},\"application/vnd.mason+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.maxmind.maxmind-db\":{\"source\":\"iana\"},\"application/vnd.mcd\":{\"source\":\"iana\",\"extensions\":[\"mcd\"]},\"application/vnd.medcalcdata\":{\"source\":\"iana\",\"extensions\":[\"mc1\"]},\"application/vnd.mediastation.cdkey\":{\"source\":\"iana\",\"extensions\":[\"cdkey\"]},\"application/vnd.meridian-slingshot\":{\"source\":\"iana\"},\"application/vnd.mfer\":{\"source\":\"iana\",\"extensions\":[\"mwf\"]},\"application/vnd.mfmp\":{\"source\":\"iana\",\"extensions\":[\"mfm\"]},\"application/vnd.micro+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.micrografx.flo\":{\"source\":\"iana\",\"extensions\":[\"flo\"]},\"application/vnd.micrografx.igx\":{\"source\":\"iana\",\"extensions\":[\"igx\"]},\"application/vnd.microsoft.portable-executable\":{\"source\":\"iana\"},\"application/vnd.microsoft.windows.thumbnail-cache\":{\"source\":\"iana\"},\"application/vnd.miele+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.mif\":{\"source\":\"iana\",\"extensions\":[\"mif\"]},\"application/vnd.minisoft-hp3000-save\":{\"source\":\"iana\"},\"application/vnd.mitsubishi.misty-guard.trustweb\":{\"source\":\"iana\"},\"application/vnd.mobius.daf\":{\"source\":\"iana\",\"extensions\":[\"daf\"]},\"application/vnd.mobius.dis\":{\"source\":\"iana\",\"extensions\":[\"dis\"]},\"application/vnd.mobius.mbk\":{\"source\":\"iana\",\"extensions\":[\"mbk\"]},\"application/vnd.mobius.mqy\":{\"source\":\"iana\",\"extensions\":[\"mqy\"]},\"application/vnd.mobius.msl\":{\"source\":\"iana\",\"extensions\":[\"msl\"]},\"application/vnd.mobius.plc\":{\"source\":\"iana\",\"extensions\":[\"plc\"]},\"application/vnd.mobius.txf\":{\"source\":\"iana\",\"extensions\":[\"txf\"]},\"application/vnd.mophun.application\":{\"source\":\"iana\",\"extensions\":[\"mpn\"]},\"application/vnd.mophun.certificate\":{\"source\":\"iana\",\"extensions\":[\"mpc\"]},\"application/vnd.motorola.flexsuite\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.adsi\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.fis\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.gotap\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.kmr\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.ttc\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.wem\":{\"source\":\"iana\"},\"application/vnd.motorola.iprm\":{\"source\":\"iana\"},\"application/vnd.mozilla.xul+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xul\"]},\"application/vnd.ms-3mfdocument\":{\"source\":\"iana\"},\"application/vnd.ms-artgalry\":{\"source\":\"iana\",\"extensions\":[\"cil\"]},\"application/vnd.ms-asf\":{\"source\":\"iana\"},\"application/vnd.ms-cab-compressed\":{\"source\":\"iana\",\"extensions\":[\"cab\"]},\"application/vnd.ms-color.iccprofile\":{\"source\":\"apache\"},\"application/vnd.ms-excel\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xls\",\"xlm\",\"xla\",\"xlc\",\"xlt\",\"xlw\"]},\"application/vnd.ms-excel.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlam\"]},\"application/vnd.ms-excel.sheet.binary.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsb\"]},\"application/vnd.ms-excel.sheet.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsm\"]},\"application/vnd.ms-excel.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xltm\"]},\"application/vnd.ms-fontobject\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eot\"]},\"application/vnd.ms-htmlhelp\":{\"source\":\"iana\",\"extensions\":[\"chm\"]},\"application/vnd.ms-ims\":{\"source\":\"iana\",\"extensions\":[\"ims\"]},\"application/vnd.ms-lrm\":{\"source\":\"iana\",\"extensions\":[\"lrm\"]},\"application/vnd.ms-office.activex+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-officetheme\":{\"source\":\"iana\",\"extensions\":[\"thmx\"]},\"application/vnd.ms-opentype\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-outlook\":{\"compressible\":false,\"extensions\":[\"msg\"]},\"application/vnd.ms-package.obfuscated-opentype\":{\"source\":\"apache\"},\"application/vnd.ms-pki.seccat\":{\"source\":\"apache\",\"extensions\":[\"cat\"]},\"application/vnd.ms-pki.stl\":{\"source\":\"apache\",\"extensions\":[\"stl\"]},\"application/vnd.ms-playready.initiator+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-powerpoint\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ppt\",\"pps\",\"pot\"]},\"application/vnd.ms-powerpoint.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppam\"]},\"application/vnd.ms-powerpoint.presentation.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"pptm\"]},\"application/vnd.ms-powerpoint.slide.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"sldm\"]},\"application/vnd.ms-powerpoint.slideshow.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppsm\"]},\"application/vnd.ms-powerpoint.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"potm\"]},\"application/vnd.ms-printdevicecapabilities+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-printing.printticket+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-printschematicket+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-project\":{\"source\":\"iana\",\"extensions\":[\"mpp\",\"mpt\"]},\"application/vnd.ms-tnef\":{\"source\":\"iana\"},\"application/vnd.ms-windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.nwprinting.oob\":{\"source\":\"iana\"},\"application/vnd.ms-windows.printerpairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.wsd.oob\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-resp\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-resp\":{\"source\":\"iana\"},\"application/vnd.ms-word.document.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"docm\"]},\"application/vnd.ms-word.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"dotm\"]},\"application/vnd.ms-works\":{\"source\":\"iana\",\"extensions\":[\"wps\",\"wks\",\"wcm\",\"wdb\"]},\"application/vnd.ms-wpl\":{\"source\":\"iana\",\"extensions\":[\"wpl\"]},\"application/vnd.ms-xpsdocument\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xps\"]},\"application/vnd.msa-disk-image\":{\"source\":\"iana\"},\"application/vnd.mseq\":{\"source\":\"iana\",\"extensions\":[\"mseq\"]},\"application/vnd.msign\":{\"source\":\"iana\"},\"application/vnd.multiad.creator\":{\"source\":\"iana\"},\"application/vnd.multiad.creator.cif\":{\"source\":\"iana\"},\"application/vnd.music-niff\":{\"source\":\"iana\"},\"application/vnd.musician\":{\"source\":\"iana\",\"extensions\":[\"mus\"]},\"application/vnd.muvee.style\":{\"source\":\"iana\",\"extensions\":[\"msty\"]},\"application/vnd.mynfc\":{\"source\":\"iana\",\"extensions\":[\"taglet\"]},\"application/vnd.ncd.control\":{\"source\":\"iana\"},\"application/vnd.ncd.reference\":{\"source\":\"iana\"},\"application/vnd.nearst.inv+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nervana\":{\"source\":\"iana\"},\"application/vnd.netfpx\":{\"source\":\"iana\"},\"application/vnd.neurolanguage.nlu\":{\"source\":\"iana\",\"extensions\":[\"nlu\"]},\"application/vnd.nimn\":{\"source\":\"iana\"},\"application/vnd.nintendo.nitro.rom\":{\"source\":\"iana\"},\"application/vnd.nintendo.snes.rom\":{\"source\":\"iana\"},\"application/vnd.nitf\":{\"source\":\"iana\",\"extensions\":[\"ntf\",\"nitf\"]},\"application/vnd.noblenet-directory\":{\"source\":\"iana\",\"extensions\":[\"nnd\"]},\"application/vnd.noblenet-sealer\":{\"source\":\"iana\",\"extensions\":[\"nns\"]},\"application/vnd.noblenet-web\":{\"source\":\"iana\",\"extensions\":[\"nnw\"]},\"application/vnd.nokia.catalogs\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.iptv.config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.isds-radio-presets\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.landmarkcollection+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.n-gage.ac+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ac\"]},\"application/vnd.nokia.n-gage.data\":{\"source\":\"iana\",\"extensions\":[\"ngdat\"]},\"application/vnd.nokia.n-gage.symbian.install\":{\"source\":\"iana\",\"extensions\":[\"n-gage\"]},\"application/vnd.nokia.ncd\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.radio-preset\":{\"source\":\"iana\",\"extensions\":[\"rpst\"]},\"application/vnd.nokia.radio-presets\":{\"source\":\"iana\",\"extensions\":[\"rpss\"]},\"application/vnd.novadigm.edm\":{\"source\":\"iana\",\"extensions\":[\"edm\"]},\"application/vnd.novadigm.edx\":{\"source\":\"iana\",\"extensions\":[\"edx\"]},\"application/vnd.novadigm.ext\":{\"source\":\"iana\",\"extensions\":[\"ext\"]},\"application/vnd.ntt-local.content-share\":{\"source\":\"iana\"},\"application/vnd.ntt-local.file-transfer\":{\"source\":\"iana\"},\"application/vnd.ntt-local.ogw_remote-access\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_remote\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_tcp_stream\":{\"source\":\"iana\"},\"application/vnd.oasis.opendocument.chart\":{\"source\":\"iana\",\"extensions\":[\"odc\"]},\"application/vnd.oasis.opendocument.chart-template\":{\"source\":\"iana\",\"extensions\":[\"otc\"]},\"application/vnd.oasis.opendocument.database\":{\"source\":\"iana\",\"extensions\":[\"odb\"]},\"application/vnd.oasis.opendocument.formula\":{\"source\":\"iana\",\"extensions\":[\"odf\"]},\"application/vnd.oasis.opendocument.formula-template\":{\"source\":\"iana\",\"extensions\":[\"odft\"]},\"application/vnd.oasis.opendocument.graphics\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odg\"]},\"application/vnd.oasis.opendocument.graphics-template\":{\"source\":\"iana\",\"extensions\":[\"otg\"]},\"application/vnd.oasis.opendocument.image\":{\"source\":\"iana\",\"extensions\":[\"odi\"]},\"application/vnd.oasis.opendocument.image-template\":{\"source\":\"iana\",\"extensions\":[\"oti\"]},\"application/vnd.oasis.opendocument.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odp\"]},\"application/vnd.oasis.opendocument.presentation-template\":{\"source\":\"iana\",\"extensions\":[\"otp\"]},\"application/vnd.oasis.opendocument.spreadsheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ods\"]},\"application/vnd.oasis.opendocument.spreadsheet-template\":{\"source\":\"iana\",\"extensions\":[\"ots\"]},\"application/vnd.oasis.opendocument.text\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odt\"]},\"application/vnd.oasis.opendocument.text-master\":{\"source\":\"iana\",\"extensions\":[\"odm\"]},\"application/vnd.oasis.opendocument.text-template\":{\"source\":\"iana\",\"extensions\":[\"ott\"]},\"application/vnd.oasis.opendocument.text-web\":{\"source\":\"iana\",\"extensions\":[\"oth\"]},\"application/vnd.obn\":{\"source\":\"iana\"},\"application/vnd.ocf+cbor\":{\"source\":\"iana\"},\"application/vnd.oci.image.manifest.v1+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oftn.l10n+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessdownload+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessstreaming+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.cspg-hexbinary\":{\"source\":\"iana\"},\"application/vnd.oipf.dae.svg+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.dae.xhtml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.mippvcontrolmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.pae.gem\":{\"source\":\"iana\"},\"application/vnd.oipf.spdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.spdlist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.ueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.userprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.olpc-sugar\":{\"source\":\"iana\",\"extensions\":[\"xo\"]},\"application/vnd.oma-scws-config\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-request\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-response\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.associated-procedure-parameter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.drm-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.imd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.ltkm\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.notification+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.provisioningtrigger\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgboot\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgdd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sgdu\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.simple-symbol-container\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.smartcard-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sprov+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.stkm\":{\"source\":\"iana\"},\"application/vnd.oma.cab-address-book+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-feature-handler+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-pcc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-subs-invite+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-user-prefs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.dcd\":{\"source\":\"iana\"},\"application/vnd.oma.dcdc\":{\"source\":\"iana\"},\"application/vnd.oma.dd2+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dd2\"]},\"application/vnd.oma.drm.risd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.group-usage-list+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+tlv\":{\"source\":\"iana\"},\"application/vnd.oma.pal+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.detailed-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.final-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.groups+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.invocation-descriptor+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.optimized-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.push\":{\"source\":\"iana\"},\"application/vnd.oma.scidm.messages+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.xcap-directory+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.omads-email+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-file+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-folder+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omaloc-supl-init\":{\"source\":\"iana\"},\"application/vnd.onepager\":{\"source\":\"iana\"},\"application/vnd.onepagertamp\":{\"source\":\"iana\"},\"application/vnd.onepagertamx\":{\"source\":\"iana\"},\"application/vnd.onepagertat\":{\"source\":\"iana\"},\"application/vnd.onepagertatp\":{\"source\":\"iana\"},\"application/vnd.onepagertatx\":{\"source\":\"iana\"},\"application/vnd.openblox.game+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"obgx\"]},\"application/vnd.openblox.game-binary\":{\"source\":\"iana\"},\"application/vnd.openeye.oeb\":{\"source\":\"iana\"},\"application/vnd.openofficeorg.extension\":{\"source\":\"apache\",\"extensions\":[\"oxt\"]},\"application/vnd.openstreetmap.data+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osm\"]},\"application/vnd.openxmlformats-officedocument.custom-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.customxmlproperties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawing+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.extended-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pptx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slide\":{\"source\":\"iana\",\"extensions\":[\"sldx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow\":{\"source\":\"iana\",\"extensions\":[\"ppsx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tags+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.template\":{\"source\":\"iana\",\"extensions\":[\"potx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xlsx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template\":{\"source\":\"iana\",\"extensions\":[\"xltx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.theme+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.themeoverride+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.vmldrawing\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"docx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template\":{\"source\":\"iana\",\"extensions\":[\"dotx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.core-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.relationships+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oracle.resource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.orange.indata\":{\"source\":\"iana\"},\"application/vnd.osa.netdeploy\":{\"source\":\"iana\"},\"application/vnd.osgeo.mapguide.package\":{\"source\":\"iana\",\"extensions\":[\"mgp\"]},\"application/vnd.osgi.bundle\":{\"source\":\"iana\"},\"application/vnd.osgi.dp\":{\"source\":\"iana\",\"extensions\":[\"dp\"]},\"application/vnd.osgi.subsystem\":{\"source\":\"iana\",\"extensions\":[\"esa\"]},\"application/vnd.otps.ct-kip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oxli.countgraph\":{\"source\":\"iana\"},\"application/vnd.pagerduty+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.palm\":{\"source\":\"iana\",\"extensions\":[\"pdb\",\"pqa\",\"oprc\"]},\"application/vnd.panoply\":{\"source\":\"iana\"},\"application/vnd.paos.xml\":{\"source\":\"iana\"},\"application/vnd.patentdive\":{\"source\":\"iana\"},\"application/vnd.patientecommsdoc\":{\"source\":\"iana\"},\"application/vnd.pawaafile\":{\"source\":\"iana\",\"extensions\":[\"paw\"]},\"application/vnd.pcos\":{\"source\":\"iana\"},\"application/vnd.pg.format\":{\"source\":\"iana\",\"extensions\":[\"str\"]},\"application/vnd.pg.osasli\":{\"source\":\"iana\",\"extensions\":[\"ei6\"]},\"application/vnd.piaccess.application-licence\":{\"source\":\"iana\"},\"application/vnd.picsel\":{\"source\":\"iana\",\"extensions\":[\"efif\"]},\"application/vnd.pmi.widget\":{\"source\":\"iana\",\"extensions\":[\"wg\"]},\"application/vnd.poc.group-advertisement+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.pocketlearn\":{\"source\":\"iana\",\"extensions\":[\"plf\"]},\"application/vnd.powerbuilder6\":{\"source\":\"iana\",\"extensions\":[\"pbd\"]},\"application/vnd.powerbuilder6-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75-s\":{\"source\":\"iana\"},\"application/vnd.preminet\":{\"source\":\"iana\"},\"application/vnd.previewsystems.box\":{\"source\":\"iana\",\"extensions\":[\"box\"]},\"application/vnd.proteus.magazine\":{\"source\":\"iana\",\"extensions\":[\"mgz\"]},\"application/vnd.psfs\":{\"source\":\"iana\"},\"application/vnd.publishare-delta-tree\":{\"source\":\"iana\",\"extensions\":[\"qps\"]},\"application/vnd.pvi.ptid1\":{\"source\":\"iana\",\"extensions\":[\"ptid\"]},\"application/vnd.pwg-multiplexed\":{\"source\":\"iana\"},\"application/vnd.pwg-xhtml-print+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.qualcomm.brew-app-res\":{\"source\":\"iana\"},\"application/vnd.quarantainenet\":{\"source\":\"iana\"},\"application/vnd.quark.quarkxpress\":{\"source\":\"iana\",\"extensions\":[\"qxd\",\"qxt\",\"qwd\",\"qwt\",\"qxl\",\"qxb\"]},\"application/vnd.quobject-quoxdocument\":{\"source\":\"iana\"},\"application/vnd.radisys.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-stream+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-base+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-detect+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-sendrecv+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-group+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-speech+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-transform+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rainstor.data\":{\"source\":\"iana\"},\"application/vnd.rapid\":{\"source\":\"iana\"},\"application/vnd.rar\":{\"source\":\"iana\"},\"application/vnd.realvnc.bed\":{\"source\":\"iana\",\"extensions\":[\"bed\"]},\"application/vnd.recordare.musicxml\":{\"source\":\"iana\",\"extensions\":[\"mxl\"]},\"application/vnd.recordare.musicxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musicxml\"]},\"application/vnd.renlearn.rlprint\":{\"source\":\"iana\"},\"application/vnd.restful+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rig.cryptonote\":{\"source\":\"iana\",\"extensions\":[\"cryptonote\"]},\"application/vnd.rim.cod\":{\"source\":\"apache\",\"extensions\":[\"cod\"]},\"application/vnd.rn-realmedia\":{\"source\":\"apache\",\"extensions\":[\"rm\"]},\"application/vnd.rn-realmedia-vbr\":{\"source\":\"apache\",\"extensions\":[\"rmvb\"]},\"application/vnd.route66.link66+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"link66\"]},\"application/vnd.rs-274x\":{\"source\":\"iana\"},\"application/vnd.ruckus.download\":{\"source\":\"iana\"},\"application/vnd.s3sms\":{\"source\":\"iana\"},\"application/vnd.sailingtracker.track\":{\"source\":\"iana\",\"extensions\":[\"st\"]},\"application/vnd.sar\":{\"source\":\"iana\"},\"application/vnd.sbm.cid\":{\"source\":\"iana\"},\"application/vnd.sbm.mid2\":{\"source\":\"iana\"},\"application/vnd.scribus\":{\"source\":\"iana\"},\"application/vnd.sealed.3df\":{\"source\":\"iana\"},\"application/vnd.sealed.csf\":{\"source\":\"iana\"},\"application/vnd.sealed.doc\":{\"source\":\"iana\"},\"application/vnd.sealed.eml\":{\"source\":\"iana\"},\"application/vnd.sealed.mht\":{\"source\":\"iana\"},\"application/vnd.sealed.net\":{\"source\":\"iana\"},\"application/vnd.sealed.ppt\":{\"source\":\"iana\"},\"application/vnd.sealed.tiff\":{\"source\":\"iana\"},\"application/vnd.sealed.xls\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.html\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.pdf\":{\"source\":\"iana\"},\"application/vnd.seemail\":{\"source\":\"iana\",\"extensions\":[\"see\"]},\"application/vnd.sema\":{\"source\":\"iana\",\"extensions\":[\"sema\"]},\"application/vnd.semd\":{\"source\":\"iana\",\"extensions\":[\"semd\"]},\"application/vnd.semf\":{\"source\":\"iana\",\"extensions\":[\"semf\"]},\"application/vnd.shade-save-file\":{\"source\":\"iana\"},\"application/vnd.shana.informed.formdata\":{\"source\":\"iana\",\"extensions\":[\"ifm\"]},\"application/vnd.shana.informed.formtemplate\":{\"source\":\"iana\",\"extensions\":[\"itp\"]},\"application/vnd.shana.informed.interchange\":{\"source\":\"iana\",\"extensions\":[\"iif\"]},\"application/vnd.shana.informed.package\":{\"source\":\"iana\",\"extensions\":[\"ipk\"]},\"application/vnd.shootproof+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shopkick+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shp\":{\"source\":\"iana\"},\"application/vnd.shx\":{\"source\":\"iana\"},\"application/vnd.sigrok.session\":{\"source\":\"iana\"},\"application/vnd.simtech-mindmapper\":{\"source\":\"iana\",\"extensions\":[\"twd\",\"twds\"]},\"application/vnd.siren+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.smaf\":{\"source\":\"iana\",\"extensions\":[\"mmf\"]},\"application/vnd.smart.notebook\":{\"source\":\"iana\"},\"application/vnd.smart.teacher\":{\"source\":\"iana\",\"extensions\":[\"teacher\"]},\"application/vnd.snesdev-page-table\":{\"source\":\"iana\"},\"application/vnd.software602.filler.form+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fo\"]},\"application/vnd.software602.filler.form-xml-zip\":{\"source\":\"iana\"},\"application/vnd.solent.sdkm+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sdkm\",\"sdkd\"]},\"application/vnd.spotfire.dxp\":{\"source\":\"iana\",\"extensions\":[\"dxp\"]},\"application/vnd.spotfire.sfs\":{\"source\":\"iana\",\"extensions\":[\"sfs\"]},\"application/vnd.sqlite3\":{\"source\":\"iana\"},\"application/vnd.sss-cod\":{\"source\":\"iana\"},\"application/vnd.sss-dtf\":{\"source\":\"iana\"},\"application/vnd.sss-ntf\":{\"source\":\"iana\"},\"application/vnd.stardivision.calc\":{\"source\":\"apache\",\"extensions\":[\"sdc\"]},\"application/vnd.stardivision.draw\":{\"source\":\"apache\",\"extensions\":[\"sda\"]},\"application/vnd.stardivision.impress\":{\"source\":\"apache\",\"extensions\":[\"sdd\"]},\"application/vnd.stardivision.math\":{\"source\":\"apache\",\"extensions\":[\"smf\"]},\"application/vnd.stardivision.writer\":{\"source\":\"apache\",\"extensions\":[\"sdw\",\"vor\"]},\"application/vnd.stardivision.writer-global\":{\"source\":\"apache\",\"extensions\":[\"sgl\"]},\"application/vnd.stepmania.package\":{\"source\":\"iana\",\"extensions\":[\"smzip\"]},\"application/vnd.stepmania.stepchart\":{\"source\":\"iana\",\"extensions\":[\"sm\"]},\"application/vnd.street-stream\":{\"source\":\"iana\"},\"application/vnd.sun.wadl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wadl\"]},\"application/vnd.sun.xml.calc\":{\"source\":\"apache\",\"extensions\":[\"sxc\"]},\"application/vnd.sun.xml.calc.template\":{\"source\":\"apache\",\"extensions\":[\"stc\"]},\"application/vnd.sun.xml.draw\":{\"source\":\"apache\",\"extensions\":[\"sxd\"]},\"application/vnd.sun.xml.draw.template\":{\"source\":\"apache\",\"extensions\":[\"std\"]},\"application/vnd.sun.xml.impress\":{\"source\":\"apache\",\"extensions\":[\"sxi\"]},\"application/vnd.sun.xml.impress.template\":{\"source\":\"apache\",\"extensions\":[\"sti\"]},\"application/vnd.sun.xml.math\":{\"source\":\"apache\",\"extensions\":[\"sxm\"]},\"application/vnd.sun.xml.writer\":{\"source\":\"apache\",\"extensions\":[\"sxw\"]},\"application/vnd.sun.xml.writer.global\":{\"source\":\"apache\",\"extensions\":[\"sxg\"]},\"application/vnd.sun.xml.writer.template\":{\"source\":\"apache\",\"extensions\":[\"stw\"]},\"application/vnd.sus-calendar\":{\"source\":\"iana\",\"extensions\":[\"sus\",\"susp\"]},\"application/vnd.svd\":{\"source\":\"iana\",\"extensions\":[\"svd\"]},\"application/vnd.swiftview-ics\":{\"source\":\"iana\"},\"application/vnd.symbian.install\":{\"source\":\"apache\",\"extensions\":[\"sis\",\"sisx\"]},\"application/vnd.syncml+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xsm\"]},\"application/vnd.syncml.dm+wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"bdm\"]},\"application/vnd.syncml.dm+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xdm\"]},\"application/vnd.syncml.dm.notification\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"ddf\"]},\"application/vnd.syncml.dmtnds+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmtnds+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.syncml.ds.notification\":{\"source\":\"iana\"},\"application/vnd.tableschema+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tao.intent-module-archive\":{\"source\":\"iana\",\"extensions\":[\"tao\"]},\"application/vnd.tcpdump.pcap\":{\"source\":\"iana\",\"extensions\":[\"pcap\",\"cap\",\"dmp\"]},\"application/vnd.think-cell.ppttc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tmd.mediaflex.api+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tml\":{\"source\":\"iana\"},\"application/vnd.tmobile-livetv\":{\"source\":\"iana\",\"extensions\":[\"tmo\"]},\"application/vnd.tri.onesource\":{\"source\":\"iana\"},\"application/vnd.trid.tpt\":{\"source\":\"iana\",\"extensions\":[\"tpt\"]},\"application/vnd.triscape.mxs\":{\"source\":\"iana\",\"extensions\":[\"mxs\"]},\"application/vnd.trueapp\":{\"source\":\"iana\",\"extensions\":[\"tra\"]},\"application/vnd.truedoc\":{\"source\":\"iana\"},\"application/vnd.ubisoft.webplayer\":{\"source\":\"iana\"},\"application/vnd.ufdl\":{\"source\":\"iana\",\"extensions\":[\"ufd\",\"ufdl\"]},\"application/vnd.uiq.theme\":{\"source\":\"iana\",\"extensions\":[\"utz\"]},\"application/vnd.umajin\":{\"source\":\"iana\",\"extensions\":[\"umj\"]},\"application/vnd.unity\":{\"source\":\"iana\",\"extensions\":[\"unityweb\"]},\"application/vnd.uoml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uoml\"]},\"application/vnd.uplanet.alert\":{\"source\":\"iana\"},\"application/vnd.uplanet.alert-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.list\":{\"source\":\"iana\"},\"application/vnd.uplanet.list-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.signal\":{\"source\":\"iana\"},\"application/vnd.uri-map\":{\"source\":\"iana\"},\"application/vnd.valve.source.material\":{\"source\":\"iana\"},\"application/vnd.vcx\":{\"source\":\"iana\",\"extensions\":[\"vcx\"]},\"application/vnd.vd-study\":{\"source\":\"iana\"},\"application/vnd.vectorworks\":{\"source\":\"iana\"},\"application/vnd.vel+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.verimatrix.vcas\":{\"source\":\"iana\"},\"application/vnd.veryant.thin\":{\"source\":\"iana\"},\"application/vnd.ves.encrypted\":{\"source\":\"iana\"},\"application/vnd.vidsoft.vidconference\":{\"source\":\"iana\"},\"application/vnd.visio\":{\"source\":\"iana\",\"extensions\":[\"vsd\",\"vst\",\"vss\",\"vsw\"]},\"application/vnd.visionary\":{\"source\":\"iana\",\"extensions\":[\"vis\"]},\"application/vnd.vividence.scriptfile\":{\"source\":\"iana\"},\"application/vnd.vsf\":{\"source\":\"iana\",\"extensions\":[\"vsf\"]},\"application/vnd.wap.sic\":{\"source\":\"iana\"},\"application/vnd.wap.slc\":{\"source\":\"iana\"},\"application/vnd.wap.wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"wbxml\"]},\"application/vnd.wap.wmlc\":{\"source\":\"iana\",\"extensions\":[\"wmlc\"]},\"application/vnd.wap.wmlscriptc\":{\"source\":\"iana\",\"extensions\":[\"wmlsc\"]},\"application/vnd.webturbo\":{\"source\":\"iana\",\"extensions\":[\"wtb\"]},\"application/vnd.wfa.p2p\":{\"source\":\"iana\"},\"application/vnd.wfa.wsc\":{\"source\":\"iana\"},\"application/vnd.windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.wmc\":{\"source\":\"iana\"},\"application/vnd.wmf.bootstrap\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica.package\":{\"source\":\"iana\"},\"application/vnd.wolfram.player\":{\"source\":\"iana\",\"extensions\":[\"nbp\"]},\"application/vnd.wordperfect\":{\"source\":\"iana\",\"extensions\":[\"wpd\"]},\"application/vnd.wqd\":{\"source\":\"iana\",\"extensions\":[\"wqd\"]},\"application/vnd.wrq-hp3000-labelled\":{\"source\":\"iana\"},\"application/vnd.wt.stf\":{\"source\":\"iana\",\"extensions\":[\"stf\"]},\"application/vnd.wv.csp+wbxml\":{\"source\":\"iana\"},\"application/vnd.wv.csp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.wv.ssp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xacml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xara\":{\"source\":\"iana\",\"extensions\":[\"xar\"]},\"application/vnd.xfdl\":{\"source\":\"iana\",\"extensions\":[\"xfdl\"]},\"application/vnd.xfdl.webform\":{\"source\":\"iana\"},\"application/vnd.xmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xmpie.cpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.dpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.plan\":{\"source\":\"iana\"},\"application/vnd.xmpie.ppkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.xlim\":{\"source\":\"iana\"},\"application/vnd.yamaha.hv-dic\":{\"source\":\"iana\",\"extensions\":[\"hvd\"]},\"application/vnd.yamaha.hv-script\":{\"source\":\"iana\",\"extensions\":[\"hvs\"]},\"application/vnd.yamaha.hv-voice\":{\"source\":\"iana\",\"extensions\":[\"hvp\"]},\"application/vnd.yamaha.openscoreformat\":{\"source\":\"iana\",\"extensions\":[\"osf\"]},\"application/vnd.yamaha.openscoreformat.osfpvg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osfpvg\"]},\"application/vnd.yamaha.remote-setup\":{\"source\":\"iana\"},\"application/vnd.yamaha.smaf-audio\":{\"source\":\"iana\",\"extensions\":[\"saf\"]},\"application/vnd.yamaha.smaf-phrase\":{\"source\":\"iana\",\"extensions\":[\"spf\"]},\"application/vnd.yamaha.through-ngn\":{\"source\":\"iana\"},\"application/vnd.yamaha.tunnel-udpencap\":{\"source\":\"iana\"},\"application/vnd.yaoweme\":{\"source\":\"iana\"},\"application/vnd.yellowriver-custom-menu\":{\"source\":\"iana\",\"extensions\":[\"cmp\"]},\"application/vnd.youtube.yt\":{\"source\":\"iana\"},\"application/vnd.zul\":{\"source\":\"iana\",\"extensions\":[\"zir\",\"zirz\"]},\"application/vnd.zzazz.deck+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zaz\"]},\"application/voicexml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vxml\"]},\"application/voucher-cms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vq-rtcpxr\":{\"source\":\"iana\"},\"application/wasm\":{\"compressible\":true,\"extensions\":[\"wasm\"]},\"application/watcherinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/webpush-options+json\":{\"source\":\"iana\",\"compressible\":true},\"application/whoispp-query\":{\"source\":\"iana\"},\"application/whoispp-response\":{\"source\":\"iana\"},\"application/widget\":{\"source\":\"iana\",\"extensions\":[\"wgt\"]},\"application/winhlp\":{\"source\":\"apache\",\"extensions\":[\"hlp\"]},\"application/wita\":{\"source\":\"iana\"},\"application/wordperfect5.1\":{\"source\":\"iana\"},\"application/wsdl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wsdl\"]},\"application/wspolicy+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wspolicy\"]},\"application/x-7z-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"7z\"]},\"application/x-abiword\":{\"source\":\"apache\",\"extensions\":[\"abw\"]},\"application/x-ace-compressed\":{\"source\":\"apache\",\"extensions\":[\"ace\"]},\"application/x-amf\":{\"source\":\"apache\"},\"application/x-apple-diskimage\":{\"source\":\"apache\",\"extensions\":[\"dmg\"]},\"application/x-arj\":{\"compressible\":false,\"extensions\":[\"arj\"]},\"application/x-authorware-bin\":{\"source\":\"apache\",\"extensions\":[\"aab\",\"x32\",\"u32\",\"vox\"]},\"application/x-authorware-map\":{\"source\":\"apache\",\"extensions\":[\"aam\"]},\"application/x-authorware-seg\":{\"source\":\"apache\",\"extensions\":[\"aas\"]},\"application/x-bcpio\":{\"source\":\"apache\",\"extensions\":[\"bcpio\"]},\"application/x-bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/x-bittorrent\":{\"source\":\"apache\",\"extensions\":[\"torrent\"]},\"application/x-blorb\":{\"source\":\"apache\",\"extensions\":[\"blb\",\"blorb\"]},\"application/x-bzip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz\"]},\"application/x-bzip2\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz2\",\"boz\"]},\"application/x-cbr\":{\"source\":\"apache\",\"extensions\":[\"cbr\",\"cba\",\"cbt\",\"cbz\",\"cb7\"]},\"application/x-cdlink\":{\"source\":\"apache\",\"extensions\":[\"vcd\"]},\"application/x-cfs-compressed\":{\"source\":\"apache\",\"extensions\":[\"cfs\"]},\"application/x-chat\":{\"source\":\"apache\",\"extensions\":[\"chat\"]},\"application/x-chess-pgn\":{\"source\":\"apache\",\"extensions\":[\"pgn\"]},\"application/x-chrome-extension\":{\"extensions\":[\"crx\"]},\"application/x-cocoa\":{\"source\":\"nginx\",\"extensions\":[\"cco\"]},\"application/x-compress\":{\"source\":\"apache\"},\"application/x-conference\":{\"source\":\"apache\",\"extensions\":[\"nsc\"]},\"application/x-cpio\":{\"source\":\"apache\",\"extensions\":[\"cpio\"]},\"application/x-csh\":{\"source\":\"apache\",\"extensions\":[\"csh\"]},\"application/x-deb\":{\"compressible\":false},\"application/x-debian-package\":{\"source\":\"apache\",\"extensions\":[\"deb\",\"udeb\"]},\"application/x-dgc-compressed\":{\"source\":\"apache\",\"extensions\":[\"dgc\"]},\"application/x-director\":{\"source\":\"apache\",\"extensions\":[\"dir\",\"dcr\",\"dxr\",\"cst\",\"cct\",\"cxt\",\"w3d\",\"fgd\",\"swa\"]},\"application/x-doom\":{\"source\":\"apache\",\"extensions\":[\"wad\"]},\"application/x-dtbncx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ncx\"]},\"application/x-dtbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dtb\"]},\"application/x-dtbresource+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"res\"]},\"application/x-dvi\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"dvi\"]},\"application/x-envoy\":{\"source\":\"apache\",\"extensions\":[\"evy\"]},\"application/x-eva\":{\"source\":\"apache\",\"extensions\":[\"eva\"]},\"application/x-font-bdf\":{\"source\":\"apache\",\"extensions\":[\"bdf\"]},\"application/x-font-dos\":{\"source\":\"apache\"},\"application/x-font-framemaker\":{\"source\":\"apache\"},\"application/x-font-ghostscript\":{\"source\":\"apache\",\"extensions\":[\"gsf\"]},\"application/x-font-libgrx\":{\"source\":\"apache\"},\"application/x-font-linux-psf\":{\"source\":\"apache\",\"extensions\":[\"psf\"]},\"application/x-font-pcf\":{\"source\":\"apache\",\"extensions\":[\"pcf\"]},\"application/x-font-snf\":{\"source\":\"apache\",\"extensions\":[\"snf\"]},\"application/x-font-speedo\":{\"source\":\"apache\"},\"application/x-font-sunos-news\":{\"source\":\"apache\"},\"application/x-font-type1\":{\"source\":\"apache\",\"extensions\":[\"pfa\",\"pfb\",\"pfm\",\"afm\"]},\"application/x-font-vfont\":{\"source\":\"apache\"},\"application/x-freearc\":{\"source\":\"apache\",\"extensions\":[\"arc\"]},\"application/x-futuresplash\":{\"source\":\"apache\",\"extensions\":[\"spl\"]},\"application/x-gca-compressed\":{\"source\":\"apache\",\"extensions\":[\"gca\"]},\"application/x-glulx\":{\"source\":\"apache\",\"extensions\":[\"ulx\"]},\"application/x-gnumeric\":{\"source\":\"apache\",\"extensions\":[\"gnumeric\"]},\"application/x-gramps-xml\":{\"source\":\"apache\",\"extensions\":[\"gramps\"]},\"application/x-gtar\":{\"source\":\"apache\",\"extensions\":[\"gtar\"]},\"application/x-gzip\":{\"source\":\"apache\"},\"application/x-hdf\":{\"source\":\"apache\",\"extensions\":[\"hdf\"]},\"application/x-httpd-php\":{\"compressible\":true,\"extensions\":[\"php\"]},\"application/x-install-instructions\":{\"source\":\"apache\",\"extensions\":[\"install\"]},\"application/x-iso9660-image\":{\"source\":\"apache\",\"extensions\":[\"iso\"]},\"application/x-java-archive-diff\":{\"source\":\"nginx\",\"extensions\":[\"jardiff\"]},\"application/x-java-jnlp-file\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jnlp\"]},\"application/x-javascript\":{\"compressible\":true},\"application/x-keepass2\":{\"extensions\":[\"kdbx\"]},\"application/x-latex\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"latex\"]},\"application/x-lua-bytecode\":{\"extensions\":[\"luac\"]},\"application/x-lzh-compressed\":{\"source\":\"apache\",\"extensions\":[\"lzh\",\"lha\"]},\"application/x-makeself\":{\"source\":\"nginx\",\"extensions\":[\"run\"]},\"application/x-mie\":{\"source\":\"apache\",\"extensions\":[\"mie\"]},\"application/x-mobipocket-ebook\":{\"source\":\"apache\",\"extensions\":[\"prc\",\"mobi\"]},\"application/x-mpegurl\":{\"compressible\":false},\"application/x-ms-application\":{\"source\":\"apache\",\"extensions\":[\"application\"]},\"application/x-ms-shortcut\":{\"source\":\"apache\",\"extensions\":[\"lnk\"]},\"application/x-ms-wmd\":{\"source\":\"apache\",\"extensions\":[\"wmd\"]},\"application/x-ms-wmz\":{\"source\":\"apache\",\"extensions\":[\"wmz\"]},\"application/x-ms-xbap\":{\"source\":\"apache\",\"extensions\":[\"xbap\"]},\"application/x-msaccess\":{\"source\":\"apache\",\"extensions\":[\"mdb\"]},\"application/x-msbinder\":{\"source\":\"apache\",\"extensions\":[\"obd\"]},\"application/x-mscardfile\":{\"source\":\"apache\",\"extensions\":[\"crd\"]},\"application/x-msclip\":{\"source\":\"apache\",\"extensions\":[\"clp\"]},\"application/x-msdos-program\":{\"extensions\":[\"exe\"]},\"application/x-msdownload\":{\"source\":\"apache\",\"extensions\":[\"exe\",\"dll\",\"com\",\"bat\",\"msi\"]},\"application/x-msmediaview\":{\"source\":\"apache\",\"extensions\":[\"mvb\",\"m13\",\"m14\"]},\"application/x-msmetafile\":{\"source\":\"apache\",\"extensions\":[\"wmf\",\"wmz\",\"emf\",\"emz\"]},\"application/x-msmoney\":{\"source\":\"apache\",\"extensions\":[\"mny\"]},\"application/x-mspublisher\":{\"source\":\"apache\",\"extensions\":[\"pub\"]},\"application/x-msschedule\":{\"source\":\"apache\",\"extensions\":[\"scd\"]},\"application/x-msterminal\":{\"source\":\"apache\",\"extensions\":[\"trm\"]},\"application/x-mswrite\":{\"source\":\"apache\",\"extensions\":[\"wri\"]},\"application/x-netcdf\":{\"source\":\"apache\",\"extensions\":[\"nc\",\"cdf\"]},\"application/x-ns-proxy-autoconfig\":{\"compressible\":true,\"extensions\":[\"pac\"]},\"application/x-nzb\":{\"source\":\"apache\",\"extensions\":[\"nzb\"]},\"application/x-perl\":{\"source\":\"nginx\",\"extensions\":[\"pl\",\"pm\"]},\"application/x-pilot\":{\"source\":\"nginx\",\"extensions\":[\"prc\",\"pdb\"]},\"application/x-pkcs12\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"p12\",\"pfx\"]},\"application/x-pkcs7-certificates\":{\"source\":\"apache\",\"extensions\":[\"p7b\",\"spc\"]},\"application/x-pkcs7-certreqresp\":{\"source\":\"apache\",\"extensions\":[\"p7r\"]},\"application/x-pki-message\":{\"source\":\"iana\"},\"application/x-rar-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"rar\"]},\"application/x-redhat-package-manager\":{\"source\":\"nginx\",\"extensions\":[\"rpm\"]},\"application/x-research-info-systems\":{\"source\":\"apache\",\"extensions\":[\"ris\"]},\"application/x-sea\":{\"source\":\"nginx\",\"extensions\":[\"sea\"]},\"application/x-sh\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"sh\"]},\"application/x-shar\":{\"source\":\"apache\",\"extensions\":[\"shar\"]},\"application/x-shockwave-flash\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"swf\"]},\"application/x-silverlight-app\":{\"source\":\"apache\",\"extensions\":[\"xap\"]},\"application/x-sql\":{\"source\":\"apache\",\"extensions\":[\"sql\"]},\"application/x-stuffit\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"sit\"]},\"application/x-stuffitx\":{\"source\":\"apache\",\"extensions\":[\"sitx\"]},\"application/x-subrip\":{\"source\":\"apache\",\"extensions\":[\"srt\"]},\"application/x-sv4cpio\":{\"source\":\"apache\",\"extensions\":[\"sv4cpio\"]},\"application/x-sv4crc\":{\"source\":\"apache\",\"extensions\":[\"sv4crc\"]},\"application/x-t3vm-image\":{\"source\":\"apache\",\"extensions\":[\"t3\"]},\"application/x-tads\":{\"source\":\"apache\",\"extensions\":[\"gam\"]},\"application/x-tar\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"tar\"]},\"application/x-tcl\":{\"source\":\"apache\",\"extensions\":[\"tcl\",\"tk\"]},\"application/x-tex\":{\"source\":\"apache\",\"extensions\":[\"tex\"]},\"application/x-tex-tfm\":{\"source\":\"apache\",\"extensions\":[\"tfm\"]},\"application/x-texinfo\":{\"source\":\"apache\",\"extensions\":[\"texinfo\",\"texi\"]},\"application/x-tgif\":{\"source\":\"apache\",\"extensions\":[\"obj\"]},\"application/x-ustar\":{\"source\":\"apache\",\"extensions\":[\"ustar\"]},\"application/x-virtualbox-hdd\":{\"compressible\":true,\"extensions\":[\"hdd\"]},\"application/x-virtualbox-ova\":{\"compressible\":true,\"extensions\":[\"ova\"]},\"application/x-virtualbox-ovf\":{\"compressible\":true,\"extensions\":[\"ovf\"]},\"application/x-virtualbox-vbox\":{\"compressible\":true,\"extensions\":[\"vbox\"]},\"application/x-virtualbox-vbox-extpack\":{\"compressible\":false,\"extensions\":[\"vbox-extpack\"]},\"application/x-virtualbox-vdi\":{\"compressible\":true,\"extensions\":[\"vdi\"]},\"application/x-virtualbox-vhd\":{\"compressible\":true,\"extensions\":[\"vhd\"]},\"application/x-virtualbox-vmdk\":{\"compressible\":true,\"extensions\":[\"vmdk\"]},\"application/x-wais-source\":{\"source\":\"apache\",\"extensions\":[\"src\"]},\"application/x-web-app-manifest+json\":{\"compressible\":true,\"extensions\":[\"webapp\"]},\"application/x-www-form-urlencoded\":{\"source\":\"iana\",\"compressible\":true},\"application/x-x509-ca-cert\":{\"source\":\"iana\",\"extensions\":[\"der\",\"crt\",\"pem\"]},\"application/x-x509-ca-ra-cert\":{\"source\":\"iana\"},\"application/x-x509-next-ca-cert\":{\"source\":\"iana\"},\"application/x-xfig\":{\"source\":\"apache\",\"extensions\":[\"fig\"]},\"application/x-xliff+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/x-xpinstall\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"xpi\"]},\"application/x-xz\":{\"source\":\"apache\",\"extensions\":[\"xz\"]},\"application/x-zmachine\":{\"source\":\"apache\",\"extensions\":[\"z1\",\"z2\",\"z3\",\"z4\",\"z5\",\"z6\",\"z7\",\"z8\"]},\"application/x400-bp\":{\"source\":\"iana\"},\"application/xacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xaml+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xaml\"]},\"application/xcap-att+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xav\"]},\"application/xcap-caps+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xca\"]},\"application/xcap-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/xcap-el+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xel\"]},\"application/xcap-error+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xer\"]},\"application/xcap-ns+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xns\"]},\"application/xcon-conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xcon-conference-info-diff+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xenc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xenc\"]},\"application/xhtml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xhtml\",\"xht\"]},\"application/xhtml-voice+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/xliff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\",\"xsl\",\"xsd\",\"rng\"]},\"application/xml-dtd\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dtd\"]},\"application/xml-external-parsed-entity\":{\"source\":\"iana\"},\"application/xml-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xmpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xop+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xop\"]},\"application/xproc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xpl\"]},\"application/xslt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xslt\"]},\"application/xspf+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xspf\"]},\"application/xv+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mxml\",\"xhvml\",\"xvml\",\"xvm\"]},\"application/yang\":{\"source\":\"iana\",\"extensions\":[\"yang\"]},\"application/yang-data+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yin+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"yin\"]},\"application/zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"zip\"]},\"application/zlib\":{\"source\":\"iana\"},\"application/zstd\":{\"source\":\"iana\"},\"audio/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"audio/32kadpcm\":{\"source\":\"iana\"},\"audio/3gpp\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"3gpp\"]},\"audio/3gpp2\":{\"source\":\"iana\"},\"audio/aac\":{\"source\":\"iana\"},\"audio/ac3\":{\"source\":\"iana\"},\"audio/adpcm\":{\"source\":\"apache\",\"extensions\":[\"adp\"]},\"audio/amr\":{\"source\":\"iana\"},\"audio/amr-wb\":{\"source\":\"iana\"},\"audio/amr-wb+\":{\"source\":\"iana\"},\"audio/aptx\":{\"source\":\"iana\"},\"audio/asc\":{\"source\":\"iana\"},\"audio/atrac-advanced-lossless\":{\"source\":\"iana\"},\"audio/atrac-x\":{\"source\":\"iana\"},\"audio/atrac3\":{\"source\":\"iana\"},\"audio/basic\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"au\",\"snd\"]},\"audio/bv16\":{\"source\":\"iana\"},\"audio/bv32\":{\"source\":\"iana\"},\"audio/clearmode\":{\"source\":\"iana\"},\"audio/cn\":{\"source\":\"iana\"},\"audio/dat12\":{\"source\":\"iana\"},\"audio/dls\":{\"source\":\"iana\"},\"audio/dsr-es201108\":{\"source\":\"iana\"},\"audio/dsr-es202050\":{\"source\":\"iana\"},\"audio/dsr-es202211\":{\"source\":\"iana\"},\"audio/dsr-es202212\":{\"source\":\"iana\"},\"audio/dv\":{\"source\":\"iana\"},\"audio/dvi4\":{\"source\":\"iana\"},\"audio/eac3\":{\"source\":\"iana\"},\"audio/encaprtp\":{\"source\":\"iana\"},\"audio/evrc\":{\"source\":\"iana\"},\"audio/evrc-qcp\":{\"source\":\"iana\"},\"audio/evrc0\":{\"source\":\"iana\"},\"audio/evrc1\":{\"source\":\"iana\"},\"audio/evrcb\":{\"source\":\"iana\"},\"audio/evrcb0\":{\"source\":\"iana\"},\"audio/evrcb1\":{\"source\":\"iana\"},\"audio/evrcnw\":{\"source\":\"iana\"},\"audio/evrcnw0\":{\"source\":\"iana\"},\"audio/evrcnw1\":{\"source\":\"iana\"},\"audio/evrcwb\":{\"source\":\"iana\"},\"audio/evrcwb0\":{\"source\":\"iana\"},\"audio/evrcwb1\":{\"source\":\"iana\"},\"audio/evs\":{\"source\":\"iana\"},\"audio/flexfec\":{\"source\":\"iana\"},\"audio/fwdred\":{\"source\":\"iana\"},\"audio/g711-0\":{\"source\":\"iana\"},\"audio/g719\":{\"source\":\"iana\"},\"audio/g722\":{\"source\":\"iana\"},\"audio/g7221\":{\"source\":\"iana\"},\"audio/g723\":{\"source\":\"iana\"},\"audio/g726-16\":{\"source\":\"iana\"},\"audio/g726-24\":{\"source\":\"iana\"},\"audio/g726-32\":{\"source\":\"iana\"},\"audio/g726-40\":{\"source\":\"iana\"},\"audio/g728\":{\"source\":\"iana\"},\"audio/g729\":{\"source\":\"iana\"},\"audio/g7291\":{\"source\":\"iana\"},\"audio/g729d\":{\"source\":\"iana\"},\"audio/g729e\":{\"source\":\"iana\"},\"audio/gsm\":{\"source\":\"iana\"},\"audio/gsm-efr\":{\"source\":\"iana\"},\"audio/gsm-hr-08\":{\"source\":\"iana\"},\"audio/ilbc\":{\"source\":\"iana\"},\"audio/ip-mr_v2.5\":{\"source\":\"iana\"},\"audio/isac\":{\"source\":\"apache\"},\"audio/l16\":{\"source\":\"iana\"},\"audio/l20\":{\"source\":\"iana\"},\"audio/l24\":{\"source\":\"iana\",\"compressible\":false},\"audio/l8\":{\"source\":\"iana\"},\"audio/lpc\":{\"source\":\"iana\"},\"audio/melp\":{\"source\":\"iana\"},\"audio/melp1200\":{\"source\":\"iana\"},\"audio/melp2400\":{\"source\":\"iana\"},\"audio/melp600\":{\"source\":\"iana\"},\"audio/mhas\":{\"source\":\"iana\"},\"audio/midi\":{\"source\":\"apache\",\"extensions\":[\"mid\",\"midi\",\"kar\",\"rmi\"]},\"audio/mobile-xmf\":{\"source\":\"iana\",\"extensions\":[\"mxmf\"]},\"audio/mp3\":{\"compressible\":false,\"extensions\":[\"mp3\"]},\"audio/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"m4a\",\"mp4a\"]},\"audio/mp4a-latm\":{\"source\":\"iana\"},\"audio/mpa\":{\"source\":\"iana\"},\"audio/mpa-robust\":{\"source\":\"iana\"},\"audio/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpga\",\"mp2\",\"mp2a\",\"mp3\",\"m2a\",\"m3a\"]},\"audio/mpeg4-generic\":{\"source\":\"iana\"},\"audio/musepack\":{\"source\":\"apache\"},\"audio/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"oga\",\"ogg\",\"spx\"]},\"audio/opus\":{\"source\":\"iana\"},\"audio/parityfec\":{\"source\":\"iana\"},\"audio/pcma\":{\"source\":\"iana\"},\"audio/pcma-wb\":{\"source\":\"iana\"},\"audio/pcmu\":{\"source\":\"iana\"},\"audio/pcmu-wb\":{\"source\":\"iana\"},\"audio/prs.sid\":{\"source\":\"iana\"},\"audio/qcelp\":{\"source\":\"iana\"},\"audio/raptorfec\":{\"source\":\"iana\"},\"audio/red\":{\"source\":\"iana\"},\"audio/rtp-enc-aescm128\":{\"source\":\"iana\"},\"audio/rtp-midi\":{\"source\":\"iana\"},\"audio/rtploopback\":{\"source\":\"iana\"},\"audio/rtx\":{\"source\":\"iana\"},\"audio/s3m\":{\"source\":\"apache\",\"extensions\":[\"s3m\"]},\"audio/silk\":{\"source\":\"apache\",\"extensions\":[\"sil\"]},\"audio/smv\":{\"source\":\"iana\"},\"audio/smv-qcp\":{\"source\":\"iana\"},\"audio/smv0\":{\"source\":\"iana\"},\"audio/sp-midi\":{\"source\":\"iana\"},\"audio/speex\":{\"source\":\"iana\"},\"audio/t140c\":{\"source\":\"iana\"},\"audio/t38\":{\"source\":\"iana\"},\"audio/telephone-event\":{\"source\":\"iana\"},\"audio/tetra_acelp\":{\"source\":\"iana\"},\"audio/tetra_acelp_bb\":{\"source\":\"iana\"},\"audio/tone\":{\"source\":\"iana\"},\"audio/uemclip\":{\"source\":\"iana\"},\"audio/ulpfec\":{\"source\":\"iana\"},\"audio/usac\":{\"source\":\"iana\"},\"audio/vdvi\":{\"source\":\"iana\"},\"audio/vmr-wb\":{\"source\":\"iana\"},\"audio/vnd.3gpp.iufp\":{\"source\":\"iana\"},\"audio/vnd.4sb\":{\"source\":\"iana\"},\"audio/vnd.audiokoz\":{\"source\":\"iana\"},\"audio/vnd.celp\":{\"source\":\"iana\"},\"audio/vnd.cisco.nse\":{\"source\":\"iana\"},\"audio/vnd.cmles.radio-events\":{\"source\":\"iana\"},\"audio/vnd.cns.anp1\":{\"source\":\"iana\"},\"audio/vnd.cns.inf1\":{\"source\":\"iana\"},\"audio/vnd.dece.audio\":{\"source\":\"iana\",\"extensions\":[\"uva\",\"uvva\"]},\"audio/vnd.digital-winds\":{\"source\":\"iana\",\"extensions\":[\"eol\"]},\"audio/vnd.dlna.adts\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.1\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.2\":{\"source\":\"iana\"},\"audio/vnd.dolby.mlp\":{\"source\":\"iana\"},\"audio/vnd.dolby.mps\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2x\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2z\":{\"source\":\"iana\"},\"audio/vnd.dolby.pulse.1\":{\"source\":\"iana\"},\"audio/vnd.dra\":{\"source\":\"iana\",\"extensions\":[\"dra\"]},\"audio/vnd.dts\":{\"source\":\"iana\",\"extensions\":[\"dts\"]},\"audio/vnd.dts.hd\":{\"source\":\"iana\",\"extensions\":[\"dtshd\"]},\"audio/vnd.dts.uhd\":{\"source\":\"iana\"},\"audio/vnd.dvb.file\":{\"source\":\"iana\"},\"audio/vnd.everad.plj\":{\"source\":\"iana\"},\"audio/vnd.hns.audio\":{\"source\":\"iana\"},\"audio/vnd.lucent.voice\":{\"source\":\"iana\",\"extensions\":[\"lvp\"]},\"audio/vnd.ms-playready.media.pya\":{\"source\":\"iana\",\"extensions\":[\"pya\"]},\"audio/vnd.nokia.mobile-xmf\":{\"source\":\"iana\"},\"audio/vnd.nortel.vbk\":{\"source\":\"iana\"},\"audio/vnd.nuera.ecelp4800\":{\"source\":\"iana\",\"extensions\":[\"ecelp4800\"]},\"audio/vnd.nuera.ecelp7470\":{\"source\":\"iana\",\"extensions\":[\"ecelp7470\"]},\"audio/vnd.nuera.ecelp9600\":{\"source\":\"iana\",\"extensions\":[\"ecelp9600\"]},\"audio/vnd.octel.sbc\":{\"source\":\"iana\"},\"audio/vnd.presonus.multitrack\":{\"source\":\"iana\"},\"audio/vnd.qcelp\":{\"source\":\"iana\"},\"audio/vnd.rhetorex.32kadpcm\":{\"source\":\"iana\"},\"audio/vnd.rip\":{\"source\":\"iana\",\"extensions\":[\"rip\"]},\"audio/vnd.rn-realaudio\":{\"compressible\":false},\"audio/vnd.sealedmedia.softseal.mpeg\":{\"source\":\"iana\"},\"audio/vnd.vmx.cvsd\":{\"source\":\"iana\"},\"audio/vnd.wave\":{\"compressible\":false},\"audio/vorbis\":{\"source\":\"iana\",\"compressible\":false},\"audio/vorbis-config\":{\"source\":\"iana\"},\"audio/wav\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/wave\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"weba\"]},\"audio/x-aac\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"aac\"]},\"audio/x-aiff\":{\"source\":\"apache\",\"extensions\":[\"aif\",\"aiff\",\"aifc\"]},\"audio/x-caf\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"caf\"]},\"audio/x-flac\":{\"source\":\"apache\",\"extensions\":[\"flac\"]},\"audio/x-m4a\":{\"source\":\"nginx\",\"extensions\":[\"m4a\"]},\"audio/x-matroska\":{\"source\":\"apache\",\"extensions\":[\"mka\"]},\"audio/x-mpegurl\":{\"source\":\"apache\",\"extensions\":[\"m3u\"]},\"audio/x-ms-wax\":{\"source\":\"apache\",\"extensions\":[\"wax\"]},\"audio/x-ms-wma\":{\"source\":\"apache\",\"extensions\":[\"wma\"]},\"audio/x-pn-realaudio\":{\"source\":\"apache\",\"extensions\":[\"ram\",\"ra\"]},\"audio/x-pn-realaudio-plugin\":{\"source\":\"apache\",\"extensions\":[\"rmp\"]},\"audio/x-realaudio\":{\"source\":\"nginx\",\"extensions\":[\"ra\"]},\"audio/x-tta\":{\"source\":\"apache\"},\"audio/x-wav\":{\"source\":\"apache\",\"extensions\":[\"wav\"]},\"audio/xm\":{\"source\":\"apache\",\"extensions\":[\"xm\"]},\"chemical/x-cdx\":{\"source\":\"apache\",\"extensions\":[\"cdx\"]},\"chemical/x-cif\":{\"source\":\"apache\",\"extensions\":[\"cif\"]},\"chemical/x-cmdf\":{\"source\":\"apache\",\"extensions\":[\"cmdf\"]},\"chemical/x-cml\":{\"source\":\"apache\",\"extensions\":[\"cml\"]},\"chemical/x-csml\":{\"source\":\"apache\",\"extensions\":[\"csml\"]},\"chemical/x-pdb\":{\"source\":\"apache\"},\"chemical/x-xyz\":{\"source\":\"apache\",\"extensions\":[\"xyz\"]},\"font/collection\":{\"source\":\"iana\",\"extensions\":[\"ttc\"]},\"font/otf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"otf\"]},\"font/sfnt\":{\"source\":\"iana\"},\"font/ttf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttf\"]},\"font/woff\":{\"source\":\"iana\",\"extensions\":[\"woff\"]},\"font/woff2\":{\"source\":\"iana\",\"extensions\":[\"woff2\"]},\"image/aces\":{\"source\":\"iana\",\"extensions\":[\"exr\"]},\"image/apng\":{\"compressible\":false,\"extensions\":[\"apng\"]},\"image/avci\":{\"source\":\"iana\"},\"image/avcs\":{\"source\":\"iana\"},\"image/bmp\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/cgm\":{\"source\":\"iana\",\"extensions\":[\"cgm\"]},\"image/dicom-rle\":{\"source\":\"iana\",\"extensions\":[\"drle\"]},\"image/emf\":{\"source\":\"iana\",\"extensions\":[\"emf\"]},\"image/fits\":{\"source\":\"iana\",\"extensions\":[\"fits\"]},\"image/g3fax\":{\"source\":\"iana\",\"extensions\":[\"g3\"]},\"image/gif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gif\"]},\"image/heic\":{\"source\":\"iana\",\"extensions\":[\"heic\"]},\"image/heic-sequence\":{\"source\":\"iana\",\"extensions\":[\"heics\"]},\"image/heif\":{\"source\":\"iana\",\"extensions\":[\"heif\"]},\"image/heif-sequence\":{\"source\":\"iana\",\"extensions\":[\"heifs\"]},\"image/hej2k\":{\"source\":\"iana\",\"extensions\":[\"hej2\"]},\"image/hsj2\":{\"source\":\"iana\",\"extensions\":[\"hsj2\"]},\"image/ief\":{\"source\":\"iana\",\"extensions\":[\"ief\"]},\"image/jls\":{\"source\":\"iana\",\"extensions\":[\"jls\"]},\"image/jp2\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jp2\",\"jpg2\"]},\"image/jpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpeg\",\"jpg\",\"jpe\"]},\"image/jph\":{\"source\":\"iana\",\"extensions\":[\"jph\"]},\"image/jphc\":{\"source\":\"iana\",\"extensions\":[\"jhc\"]},\"image/jpm\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpm\"]},\"image/jpx\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpx\",\"jpf\"]},\"image/jxr\":{\"source\":\"iana\",\"extensions\":[\"jxr\"]},\"image/jxra\":{\"source\":\"iana\",\"extensions\":[\"jxra\"]},\"image/jxrs\":{\"source\":\"iana\",\"extensions\":[\"jxrs\"]},\"image/jxs\":{\"source\":\"iana\",\"extensions\":[\"jxs\"]},\"image/jxsc\":{\"source\":\"iana\",\"extensions\":[\"jxsc\"]},\"image/jxsi\":{\"source\":\"iana\",\"extensions\":[\"jxsi\"]},\"image/jxss\":{\"source\":\"iana\",\"extensions\":[\"jxss\"]},\"image/ktx\":{\"source\":\"iana\",\"extensions\":[\"ktx\"]},\"image/naplps\":{\"source\":\"iana\"},\"image/pjpeg\":{\"compressible\":false},\"image/png\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"png\"]},\"image/prs.btif\":{\"source\":\"iana\",\"extensions\":[\"btif\"]},\"image/prs.pti\":{\"source\":\"iana\",\"extensions\":[\"pti\"]},\"image/pwg-raster\":{\"source\":\"iana\"},\"image/sgi\":{\"source\":\"apache\",\"extensions\":[\"sgi\"]},\"image/svg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"svg\",\"svgz\"]},\"image/t38\":{\"source\":\"iana\",\"extensions\":[\"t38\"]},\"image/tiff\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"tif\",\"tiff\"]},\"image/tiff-fx\":{\"source\":\"iana\",\"extensions\":[\"tfx\"]},\"image/vnd.adobe.photoshop\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"psd\"]},\"image/vnd.airzip.accelerator.azv\":{\"source\":\"iana\",\"extensions\":[\"azv\"]},\"image/vnd.cns.inf2\":{\"source\":\"iana\"},\"image/vnd.dece.graphic\":{\"source\":\"iana\",\"extensions\":[\"uvi\",\"uvvi\",\"uvg\",\"uvvg\"]},\"image/vnd.djvu\":{\"source\":\"iana\",\"extensions\":[\"djvu\",\"djv\"]},\"image/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"image/vnd.dwg\":{\"source\":\"iana\",\"extensions\":[\"dwg\"]},\"image/vnd.dxf\":{\"source\":\"iana\",\"extensions\":[\"dxf\"]},\"image/vnd.fastbidsheet\":{\"source\":\"iana\",\"extensions\":[\"fbs\"]},\"image/vnd.fpx\":{\"source\":\"iana\",\"extensions\":[\"fpx\"]},\"image/vnd.fst\":{\"source\":\"iana\",\"extensions\":[\"fst\"]},\"image/vnd.fujixerox.edmics-mmr\":{\"source\":\"iana\",\"extensions\":[\"mmr\"]},\"image/vnd.fujixerox.edmics-rlc\":{\"source\":\"iana\",\"extensions\":[\"rlc\"]},\"image/vnd.globalgraphics.pgb\":{\"source\":\"iana\"},\"image/vnd.microsoft.icon\":{\"source\":\"iana\",\"extensions\":[\"ico\"]},\"image/vnd.mix\":{\"source\":\"iana\"},\"image/vnd.mozilla.apng\":{\"source\":\"iana\"},\"image/vnd.ms-dds\":{\"extensions\":[\"dds\"]},\"image/vnd.ms-modi\":{\"source\":\"iana\",\"extensions\":[\"mdi\"]},\"image/vnd.ms-photo\":{\"source\":\"apache\",\"extensions\":[\"wdp\"]},\"image/vnd.net-fpx\":{\"source\":\"iana\",\"extensions\":[\"npx\"]},\"image/vnd.radiance\":{\"source\":\"iana\"},\"image/vnd.sealed.png\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.gif\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.jpg\":{\"source\":\"iana\"},\"image/vnd.svf\":{\"source\":\"iana\"},\"image/vnd.tencent.tap\":{\"source\":\"iana\",\"extensions\":[\"tap\"]},\"image/vnd.valve.source.texture\":{\"source\":\"iana\",\"extensions\":[\"vtf\"]},\"image/vnd.wap.wbmp\":{\"source\":\"iana\",\"extensions\":[\"wbmp\"]},\"image/vnd.xiff\":{\"source\":\"iana\",\"extensions\":[\"xif\"]},\"image/vnd.zbrush.pcx\":{\"source\":\"iana\",\"extensions\":[\"pcx\"]},\"image/webp\":{\"source\":\"apache\",\"extensions\":[\"webp\"]},\"image/wmf\":{\"source\":\"iana\",\"extensions\":[\"wmf\"]},\"image/x-3ds\":{\"source\":\"apache\",\"extensions\":[\"3ds\"]},\"image/x-cmu-raster\":{\"source\":\"apache\",\"extensions\":[\"ras\"]},\"image/x-cmx\":{\"source\":\"apache\",\"extensions\":[\"cmx\"]},\"image/x-freehand\":{\"source\":\"apache\",\"extensions\":[\"fh\",\"fhc\",\"fh4\",\"fh5\",\"fh7\"]},\"image/x-icon\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ico\"]},\"image/x-jng\":{\"source\":\"nginx\",\"extensions\":[\"jng\"]},\"image/x-mrsid-image\":{\"source\":\"apache\",\"extensions\":[\"sid\"]},\"image/x-ms-bmp\":{\"source\":\"nginx\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/x-pcx\":{\"source\":\"apache\",\"extensions\":[\"pcx\"]},\"image/x-pict\":{\"source\":\"apache\",\"extensions\":[\"pic\",\"pct\"]},\"image/x-portable-anymap\":{\"source\":\"apache\",\"extensions\":[\"pnm\"]},\"image/x-portable-bitmap\":{\"source\":\"apache\",\"extensions\":[\"pbm\"]},\"image/x-portable-graymap\":{\"source\":\"apache\",\"extensions\":[\"pgm\"]},\"image/x-portable-pixmap\":{\"source\":\"apache\",\"extensions\":[\"ppm\"]},\"image/x-rgb\":{\"source\":\"apache\",\"extensions\":[\"rgb\"]},\"image/x-tga\":{\"source\":\"apache\",\"extensions\":[\"tga\"]},\"image/x-xbitmap\":{\"source\":\"apache\",\"extensions\":[\"xbm\"]},\"image/x-xcf\":{\"compressible\":false},\"image/x-xpixmap\":{\"source\":\"apache\",\"extensions\":[\"xpm\"]},\"image/x-xwindowdump\":{\"source\":\"apache\",\"extensions\":[\"xwd\"]},\"message/cpim\":{\"source\":\"iana\"},\"message/delivery-status\":{\"source\":\"iana\"},\"message/disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"disposition-notification\"]},\"message/external-body\":{\"source\":\"iana\"},\"message/feedback-report\":{\"source\":\"iana\"},\"message/global\":{\"source\":\"iana\",\"extensions\":[\"u8msg\"]},\"message/global-delivery-status\":{\"source\":\"iana\",\"extensions\":[\"u8dsn\"]},\"message/global-disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"u8mdn\"]},\"message/global-headers\":{\"source\":\"iana\",\"extensions\":[\"u8hdr\"]},\"message/http\":{\"source\":\"iana\",\"compressible\":false},\"message/imdn+xml\":{\"source\":\"iana\",\"compressible\":true},\"message/news\":{\"source\":\"iana\"},\"message/partial\":{\"source\":\"iana\",\"compressible\":false},\"message/rfc822\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eml\",\"mime\"]},\"message/s-http\":{\"source\":\"iana\"},\"message/sip\":{\"source\":\"iana\"},\"message/sipfrag\":{\"source\":\"iana\"},\"message/tracking-status\":{\"source\":\"iana\"},\"message/vnd.si.simp\":{\"source\":\"iana\"},\"message/vnd.wfa.wsc\":{\"source\":\"iana\",\"extensions\":[\"wsc\"]},\"model/3mf\":{\"source\":\"iana\",\"extensions\":[\"3mf\"]},\"model/gltf+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gltf\"]},\"model/gltf-binary\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"glb\"]},\"model/iges\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"igs\",\"iges\"]},\"model/mesh\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"msh\",\"mesh\",\"silo\"]},\"model/mtl\":{\"source\":\"iana\",\"extensions\":[\"mtl\"]},\"model/obj\":{\"source\":\"iana\",\"extensions\":[\"obj\"]},\"model/stl\":{\"source\":\"iana\",\"extensions\":[\"stl\"]},\"model/vnd.collada+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dae\"]},\"model/vnd.dwf\":{\"source\":\"iana\",\"extensions\":[\"dwf\"]},\"model/vnd.flatland.3dml\":{\"source\":\"iana\"},\"model/vnd.gdl\":{\"source\":\"iana\",\"extensions\":[\"gdl\"]},\"model/vnd.gs-gdl\":{\"source\":\"apache\"},\"model/vnd.gs.gdl\":{\"source\":\"iana\"},\"model/vnd.gtw\":{\"source\":\"iana\",\"extensions\":[\"gtw\"]},\"model/vnd.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"model/vnd.mts\":{\"source\":\"iana\",\"extensions\":[\"mts\"]},\"model/vnd.opengex\":{\"source\":\"iana\",\"extensions\":[\"ogex\"]},\"model/vnd.parasolid.transmit.binary\":{\"source\":\"iana\",\"extensions\":[\"x_b\"]},\"model/vnd.parasolid.transmit.text\":{\"source\":\"iana\",\"extensions\":[\"x_t\"]},\"model/vnd.rosette.annotated-data-model\":{\"source\":\"iana\"},\"model/vnd.usdz+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"usdz\"]},\"model/vnd.valve.source.compiled-map\":{\"source\":\"iana\",\"extensions\":[\"bsp\"]},\"model/vnd.vtu\":{\"source\":\"iana\",\"extensions\":[\"vtu\"]},\"model/vrml\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"wrl\",\"vrml\"]},\"model/x3d+binary\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3db\",\"x3dbz\"]},\"model/x3d+fastinfoset\":{\"source\":\"iana\",\"extensions\":[\"x3db\"]},\"model/x3d+vrml\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3dv\",\"x3dvz\"]},\"model/x3d+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"x3d\",\"x3dz\"]},\"model/x3d-vrml\":{\"source\":\"iana\",\"extensions\":[\"x3dv\"]},\"multipart/alternative\":{\"source\":\"iana\",\"compressible\":false},\"multipart/appledouble\":{\"source\":\"iana\"},\"multipart/byteranges\":{\"source\":\"iana\"},\"multipart/digest\":{\"source\":\"iana\"},\"multipart/encrypted\":{\"source\":\"iana\",\"compressible\":false},\"multipart/form-data\":{\"source\":\"iana\",\"compressible\":false},\"multipart/header-set\":{\"source\":\"iana\"},\"multipart/mixed\":{\"source\":\"iana\"},\"multipart/multilingual\":{\"source\":\"iana\"},\"multipart/parallel\":{\"source\":\"iana\"},\"multipart/related\":{\"source\":\"iana\",\"compressible\":false},\"multipart/report\":{\"source\":\"iana\"},\"multipart/signed\":{\"source\":\"iana\",\"compressible\":false},\"multipart/vnd.bint.med-plus\":{\"source\":\"iana\"},\"multipart/voice-message\":{\"source\":\"iana\"},\"multipart/x-mixed-replace\":{\"source\":\"iana\"},\"text/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"text/cache-manifest\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"appcache\",\"manifest\"]},\"text/calendar\":{\"source\":\"iana\",\"extensions\":[\"ics\",\"ifb\"]},\"text/calender\":{\"compressible\":true},\"text/cmd\":{\"compressible\":true},\"text/coffeescript\":{\"extensions\":[\"coffee\",\"litcoffee\"]},\"text/css\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"css\"]},\"text/csv\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csv\"]},\"text/csv-schema\":{\"source\":\"iana\"},\"text/directory\":{\"source\":\"iana\"},\"text/dns\":{\"source\":\"iana\"},\"text/ecmascript\":{\"source\":\"iana\"},\"text/encaprtp\":{\"source\":\"iana\"},\"text/enriched\":{\"source\":\"iana\"},\"text/flexfec\":{\"source\":\"iana\"},\"text/fwdred\":{\"source\":\"iana\"},\"text/grammar-ref-list\":{\"source\":\"iana\"},\"text/html\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"html\",\"htm\",\"shtml\"]},\"text/jade\":{\"extensions\":[\"jade\"]},\"text/javascript\":{\"source\":\"iana\",\"compressible\":true},\"text/jcr-cnd\":{\"source\":\"iana\"},\"text/jsx\":{\"compressible\":true,\"extensions\":[\"jsx\"]},\"text/less\":{\"compressible\":true,\"extensions\":[\"less\"]},\"text/markdown\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"markdown\",\"md\"]},\"text/mathml\":{\"source\":\"nginx\",\"extensions\":[\"mml\"]},\"text/mdx\":{\"compressible\":true,\"extensions\":[\"mdx\"]},\"text/mizar\":{\"source\":\"iana\"},\"text/n3\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"n3\"]},\"text/parameters\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/parityfec\":{\"source\":\"iana\"},\"text/plain\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\",\"in\",\"ini\"]},\"text/provenance-notation\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/prs.fallenstein.rst\":{\"source\":\"iana\"},\"text/prs.lines.tag\":{\"source\":\"iana\",\"extensions\":[\"dsc\"]},\"text/prs.prop.logic\":{\"source\":\"iana\"},\"text/raptorfec\":{\"source\":\"iana\"},\"text/red\":{\"source\":\"iana\"},\"text/rfc822-headers\":{\"source\":\"iana\"},\"text/richtext\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtx\"]},\"text/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"text/rtp-enc-aescm128\":{\"source\":\"iana\"},\"text/rtploopback\":{\"source\":\"iana\"},\"text/rtx\":{\"source\":\"iana\"},\"text/sgml\":{\"source\":\"iana\",\"extensions\":[\"sgml\",\"sgm\"]},\"text/shex\":{\"extensions\":[\"shex\"]},\"text/slim\":{\"extensions\":[\"slim\",\"slm\"]},\"text/strings\":{\"source\":\"iana\"},\"text/stylus\":{\"extensions\":[\"stylus\",\"styl\"]},\"text/t140\":{\"source\":\"iana\"},\"text/tab-separated-values\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tsv\"]},\"text/troff\":{\"source\":\"iana\",\"extensions\":[\"t\",\"tr\",\"roff\",\"man\",\"me\",\"ms\"]},\"text/turtle\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"ttl\"]},\"text/ulpfec\":{\"source\":\"iana\"},\"text/uri-list\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uri\",\"uris\",\"urls\"]},\"text/vcard\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vcard\"]},\"text/vnd.a\":{\"source\":\"iana\"},\"text/vnd.abc\":{\"source\":\"iana\"},\"text/vnd.ascii-art\":{\"source\":\"iana\"},\"text/vnd.curl\":{\"source\":\"iana\",\"extensions\":[\"curl\"]},\"text/vnd.curl.dcurl\":{\"source\":\"apache\",\"extensions\":[\"dcurl\"]},\"text/vnd.curl.mcurl\":{\"source\":\"apache\",\"extensions\":[\"mcurl\"]},\"text/vnd.curl.scurl\":{\"source\":\"apache\",\"extensions\":[\"scurl\"]},\"text/vnd.debian.copyright\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.dmclientscript\":{\"source\":\"iana\"},\"text/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"text/vnd.esmertec.theme-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.ficlab.flt\":{\"source\":\"iana\"},\"text/vnd.fly\":{\"source\":\"iana\",\"extensions\":[\"fly\"]},\"text/vnd.fmi.flexstor\":{\"source\":\"iana\",\"extensions\":[\"flx\"]},\"text/vnd.gml\":{\"source\":\"iana\"},\"text/vnd.graphviz\":{\"source\":\"iana\",\"extensions\":[\"gv\"]},\"text/vnd.hgl\":{\"source\":\"iana\"},\"text/vnd.in3d.3dml\":{\"source\":\"iana\",\"extensions\":[\"3dml\"]},\"text/vnd.in3d.spot\":{\"source\":\"iana\",\"extensions\":[\"spot\"]},\"text/vnd.iptc.newsml\":{\"source\":\"iana\"},\"text/vnd.iptc.nitf\":{\"source\":\"iana\"},\"text/vnd.latex-z\":{\"source\":\"iana\"},\"text/vnd.motorola.reflex\":{\"source\":\"iana\"},\"text/vnd.ms-mediapackage\":{\"source\":\"iana\"},\"text/vnd.net2phone.commcenter.command\":{\"source\":\"iana\"},\"text/vnd.radisys.msml-basic-layout\":{\"source\":\"iana\"},\"text/vnd.senx.warpscript\":{\"source\":\"iana\"},\"text/vnd.si.uricatalogue\":{\"source\":\"iana\"},\"text/vnd.sosi\":{\"source\":\"iana\"},\"text/vnd.sun.j2me.app-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"jad\"]},\"text/vnd.trolltech.linguist\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.wap.si\":{\"source\":\"iana\"},\"text/vnd.wap.sl\":{\"source\":\"iana\"},\"text/vnd.wap.wml\":{\"source\":\"iana\",\"extensions\":[\"wml\"]},\"text/vnd.wap.wmlscript\":{\"source\":\"iana\",\"extensions\":[\"wmls\"]},\"text/vtt\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"vtt\"]},\"text/x-asm\":{\"source\":\"apache\",\"extensions\":[\"s\",\"asm\"]},\"text/x-c\":{\"source\":\"apache\",\"extensions\":[\"c\",\"cc\",\"cxx\",\"cpp\",\"h\",\"hh\",\"dic\"]},\"text/x-component\":{\"source\":\"nginx\",\"extensions\":[\"htc\"]},\"text/x-fortran\":{\"source\":\"apache\",\"extensions\":[\"f\",\"for\",\"f77\",\"f90\"]},\"text/x-gwt-rpc\":{\"compressible\":true},\"text/x-handlebars-template\":{\"extensions\":[\"hbs\"]},\"text/x-java-source\":{\"source\":\"apache\",\"extensions\":[\"java\"]},\"text/x-jquery-tmpl\":{\"compressible\":true},\"text/x-lua\":{\"extensions\":[\"lua\"]},\"text/x-markdown\":{\"compressible\":true,\"extensions\":[\"mkd\"]},\"text/x-nfo\":{\"source\":\"apache\",\"extensions\":[\"nfo\"]},\"text/x-opml\":{\"source\":\"apache\",\"extensions\":[\"opml\"]},\"text/x-org\":{\"compressible\":true,\"extensions\":[\"org\"]},\"text/x-pascal\":{\"source\":\"apache\",\"extensions\":[\"p\",\"pas\"]},\"text/x-processing\":{\"compressible\":true,\"extensions\":[\"pde\"]},\"text/x-sass\":{\"extensions\":[\"sass\"]},\"text/x-scss\":{\"extensions\":[\"scss\"]},\"text/x-setext\":{\"source\":\"apache\",\"extensions\":[\"etx\"]},\"text/x-sfv\":{\"source\":\"apache\",\"extensions\":[\"sfv\"]},\"text/x-suse-ymp\":{\"compressible\":true,\"extensions\":[\"ymp\"]},\"text/x-uuencode\":{\"source\":\"apache\",\"extensions\":[\"uu\"]},\"text/x-vcalendar\":{\"source\":\"apache\",\"extensions\":[\"vcs\"]},\"text/x-vcard\":{\"source\":\"apache\",\"extensions\":[\"vcf\"]},\"text/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\"]},\"text/xml-external-parsed-entity\":{\"source\":\"iana\"},\"text/yaml\":{\"extensions\":[\"yaml\",\"yml\"]},\"video/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"video/3gpp\":{\"source\":\"iana\",\"extensions\":[\"3gp\",\"3gpp\"]},\"video/3gpp-tt\":{\"source\":\"iana\"},\"video/3gpp2\":{\"source\":\"iana\",\"extensions\":[\"3g2\"]},\"video/bmpeg\":{\"source\":\"iana\"},\"video/bt656\":{\"source\":\"iana\"},\"video/celb\":{\"source\":\"iana\"},\"video/dv\":{\"source\":\"iana\"},\"video/encaprtp\":{\"source\":\"iana\"},\"video/flexfec\":{\"source\":\"iana\"},\"video/h261\":{\"source\":\"iana\",\"extensions\":[\"h261\"]},\"video/h263\":{\"source\":\"iana\",\"extensions\":[\"h263\"]},\"video/h263-1998\":{\"source\":\"iana\"},\"video/h263-2000\":{\"source\":\"iana\"},\"video/h264\":{\"source\":\"iana\",\"extensions\":[\"h264\"]},\"video/h264-rcdo\":{\"source\":\"iana\"},\"video/h264-svc\":{\"source\":\"iana\"},\"video/h265\":{\"source\":\"iana\"},\"video/iso.segment\":{\"source\":\"iana\"},\"video/jpeg\":{\"source\":\"iana\",\"extensions\":[\"jpgv\"]},\"video/jpeg2000\":{\"source\":\"iana\"},\"video/jpm\":{\"source\":\"apache\",\"extensions\":[\"jpm\",\"jpgm\"]},\"video/mj2\":{\"source\":\"iana\",\"extensions\":[\"mj2\",\"mjp2\"]},\"video/mp1s\":{\"source\":\"iana\"},\"video/mp2p\":{\"source\":\"iana\"},\"video/mp2t\":{\"source\":\"iana\",\"extensions\":[\"ts\"]},\"video/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mp4\",\"mp4v\",\"mpg4\"]},\"video/mp4v-es\":{\"source\":\"iana\"},\"video/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpeg\",\"mpg\",\"mpe\",\"m1v\",\"m2v\"]},\"video/mpeg4-generic\":{\"source\":\"iana\"},\"video/mpv\":{\"source\":\"iana\"},\"video/nv\":{\"source\":\"iana\"},\"video/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogv\"]},\"video/parityfec\":{\"source\":\"iana\"},\"video/pointer\":{\"source\":\"iana\"},\"video/quicktime\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"qt\",\"mov\"]},\"video/raptorfec\":{\"source\":\"iana\"},\"video/raw\":{\"source\":\"iana\"},\"video/rtp-enc-aescm128\":{\"source\":\"iana\"},\"video/rtploopback\":{\"source\":\"iana\"},\"video/rtx\":{\"source\":\"iana\"},\"video/smpte291\":{\"source\":\"iana\"},\"video/smpte292m\":{\"source\":\"iana\"},\"video/ulpfec\":{\"source\":\"iana\"},\"video/vc1\":{\"source\":\"iana\"},\"video/vc2\":{\"source\":\"iana\"},\"video/vnd.cctv\":{\"source\":\"iana\"},\"video/vnd.dece.hd\":{\"source\":\"iana\",\"extensions\":[\"uvh\",\"uvvh\"]},\"video/vnd.dece.mobile\":{\"source\":\"iana\",\"extensions\":[\"uvm\",\"uvvm\"]},\"video/vnd.dece.mp4\":{\"source\":\"iana\"},\"video/vnd.dece.pd\":{\"source\":\"iana\",\"extensions\":[\"uvp\",\"uvvp\"]},\"video/vnd.dece.sd\":{\"source\":\"iana\",\"extensions\":[\"uvs\",\"uvvs\"]},\"video/vnd.dece.video\":{\"source\":\"iana\",\"extensions\":[\"uvv\",\"uvvv\"]},\"video/vnd.directv.mpeg\":{\"source\":\"iana\"},\"video/vnd.directv.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dlna.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dvb.file\":{\"source\":\"iana\",\"extensions\":[\"dvb\"]},\"video/vnd.fvt\":{\"source\":\"iana\",\"extensions\":[\"fvt\"]},\"video/vnd.hns.video\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsavc\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsmpeg2\":{\"source\":\"iana\"},\"video/vnd.motorola.video\":{\"source\":\"iana\"},\"video/vnd.motorola.videop\":{\"source\":\"iana\"},\"video/vnd.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"mxu\",\"m4u\"]},\"video/vnd.ms-playready.media.pyv\":{\"source\":\"iana\",\"extensions\":[\"pyv\"]},\"video/vnd.nokia.interleaved-multimedia\":{\"source\":\"iana\"},\"video/vnd.nokia.mp4vr\":{\"source\":\"iana\"},\"video/vnd.nokia.videovoip\":{\"source\":\"iana\"},\"video/vnd.objectvideo\":{\"source\":\"iana\"},\"video/vnd.radgamettools.bink\":{\"source\":\"iana\"},\"video/vnd.radgamettools.smacker\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg1\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg4\":{\"source\":\"iana\"},\"video/vnd.sealed.swf\":{\"source\":\"iana\"},\"video/vnd.sealedmedia.softseal.mov\":{\"source\":\"iana\"},\"video/vnd.uvvu.mp4\":{\"source\":\"iana\",\"extensions\":[\"uvu\",\"uvvu\"]},\"video/vnd.vivo\":{\"source\":\"iana\",\"extensions\":[\"viv\"]},\"video/vnd.youtube.yt\":{\"source\":\"iana\"},\"video/vp8\":{\"source\":\"iana\"},\"video/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"webm\"]},\"video/x-f4v\":{\"source\":\"apache\",\"extensions\":[\"f4v\"]},\"video/x-fli\":{\"source\":\"apache\",\"extensions\":[\"fli\"]},\"video/x-flv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"flv\"]},\"video/x-m4v\":{\"source\":\"apache\",\"extensions\":[\"m4v\"]},\"video/x-matroska\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"mkv\",\"mk3d\",\"mks\"]},\"video/x-mng\":{\"source\":\"apache\",\"extensions\":[\"mng\"]},\"video/x-ms-asf\":{\"source\":\"apache\",\"extensions\":[\"asf\",\"asx\"]},\"video/x-ms-vob\":{\"source\":\"apache\",\"extensions\":[\"vob\"]},\"video/x-ms-wm\":{\"source\":\"apache\",\"extensions\":[\"wm\"]},\"video/x-ms-wmv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"wmv\"]},\"video/x-ms-wmx\":{\"source\":\"apache\",\"extensions\":[\"wmx\"]},\"video/x-ms-wvx\":{\"source\":\"apache\",\"extensions\":[\"wvx\"]},\"video/x-msvideo\":{\"source\":\"apache\",\"extensions\":[\"avi\"]},\"video/x-sgi-movie\":{\"source\":\"apache\",\"extensions\":[\"movie\"]},\"video/x-smv\":{\"source\":\"apache\",\"extensions\":[\"smv\"]},\"x-conference/x-cooltalk\":{\"source\":\"apache\",\"extensions\":[\"ice\"]},\"x-shader/x-fragment\":{\"compressible\":true},\"x-shader/x-vertex\":{\"compressible\":true}}"); /***/ }), /***/ 76710: /***/ ((module) => { "use strict"; module.exports = JSON.parse("{\"name\":\"openid-client\",\"version\":\"3.15.9\",\"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\",\"license\":\"MIT\",\"author\":\"Filip Skokan \",\"files\":[\"lib\",\"types/index.d.ts\"],\"funding\":\"https://github.com/sponsors/panva\",\"main\":\"lib/index.js\",\"types\":\"types/index.d.ts\",\"scripts\":{\"coverage\":\"nyc mocha test/**/*.test.js\",\"lint\":\"eslint lib test\",\"lint-ts\":\"npx typescript@~3.6.0 --build types\",\"lint-fix\":\"eslint lib test --fix\",\"test\":\"mocha test/**/*.test.js\"},\"dependencies\":{\"@types/got\":\"^9.6.9\",\"base64url\":\"^3.0.1\",\"got\":\"^9.6.0\",\"jose\":\"^1.27.1\",\"lru-cache\":\"^6.0.0\",\"make-error\":\"^1.3.6\",\"object-hash\":\"^2.0.1\",\"oidc-token-hash\":\"^5.0.0\",\"p-any\":\"^3.0.0\"},\"devDependencies\":{\"@commitlint/cli\":\"^9.1.1\",\"@commitlint/config-conventional\":\"^9.1.1\",\"@types/passport\":\"^1.0.4\",\"chai\":\"^4.2.0\",\"eslint\":\"^7.4.0\",\"eslint-config-airbnb-base\":\"^14.2.0\",\"eslint-plugin-import\":\"^2.21.2\",\"husky\":\"^4.0.0\",\"mocha\":\"^8.0.1\",\"nock\":\"^13.0.2\",\"nyc\":\"^15.1.0\",\"readable-mock-req\":\"^0.2.2\",\"sinon\":\"^9.0.0\",\"timekeeper\":\"^2.2.0\"},\"engines\":{\"node\":\"^10.13.0 || >=12.0.0\"},\"commitlint\":{\"extends\":[\"@commitlint/config-conventional\"]},\"husky\":{\"hooks\":{\"commit-msg\":\"commitlint -E HUSKY_GIT_PARAMS\"}},\"nyc\":{\"reporter\":[\"lcov\",\"text-summary\"]}}"); /***/ }), /***/ 2156: /***/ ((module) => { "use strict"; module.exports = JSON.parse("[\"ac\",\"com.ac\",\"edu.ac\",\"gov.ac\",\"net.ac\",\"mil.ac\",\"org.ac\",\"ad\",\"nom.ad\",\"ae\",\"co.ae\",\"net.ae\",\"org.ae\",\"sch.ae\",\"ac.ae\",\"gov.ae\",\"mil.ae\",\"aero\",\"accident-investigation.aero\",\"accident-prevention.aero\",\"aerobatic.aero\",\"aeroclub.aero\",\"aerodrome.aero\",\"agents.aero\",\"aircraft.aero\",\"airline.aero\",\"airport.aero\",\"air-surveillance.aero\",\"airtraffic.aero\",\"air-traffic-control.aero\",\"ambulance.aero\",\"amusement.aero\",\"association.aero\",\"author.aero\",\"ballooning.aero\",\"broker.aero\",\"caa.aero\",\"cargo.aero\",\"catering.aero\",\"certification.aero\",\"championship.aero\",\"charter.aero\",\"civilaviation.aero\",\"club.aero\",\"conference.aero\",\"consultant.aero\",\"consulting.aero\",\"control.aero\",\"council.aero\",\"crew.aero\",\"design.aero\",\"dgca.aero\",\"educator.aero\",\"emergency.aero\",\"engine.aero\",\"engineer.aero\",\"entertainment.aero\",\"equipment.aero\",\"exchange.aero\",\"express.aero\",\"federation.aero\",\"flight.aero\",\"freight.aero\",\"fuel.aero\",\"gliding.aero\",\"government.aero\",\"groundhandling.aero\",\"group.aero\",\"hanggliding.aero\",\"homebuilt.aero\",\"insurance.aero\",\"journal.aero\",\"journalist.aero\",\"leasing.aero\",\"logistics.aero\",\"magazine.aero\",\"maintenance.aero\",\"media.aero\",\"microlight.aero\",\"modelling.aero\",\"navigation.aero\",\"parachuting.aero\",\"paragliding.aero\",\"passenger-association.aero\",\"pilot.aero\",\"press.aero\",\"production.aero\",\"recreation.aero\",\"repbody.aero\",\"res.aero\",\"research.aero\",\"rotorcraft.aero\",\"safety.aero\",\"scientist.aero\",\"services.aero\",\"show.aero\",\"skydiving.aero\",\"software.aero\",\"student.aero\",\"trader.aero\",\"trading.aero\",\"trainer.aero\",\"union.aero\",\"workinggroup.aero\",\"works.aero\",\"af\",\"gov.af\",\"com.af\",\"org.af\",\"net.af\",\"edu.af\",\"ag\",\"com.ag\",\"org.ag\",\"net.ag\",\"co.ag\",\"nom.ag\",\"ai\",\"off.ai\",\"com.ai\",\"net.ai\",\"org.ai\",\"al\",\"com.al\",\"edu.al\",\"gov.al\",\"mil.al\",\"net.al\",\"org.al\",\"am\",\"co.am\",\"com.am\",\"commune.am\",\"net.am\",\"org.am\",\"ao\",\"ed.ao\",\"gv.ao\",\"og.ao\",\"co.ao\",\"pb.ao\",\"it.ao\",\"aq\",\"ar\",\"com.ar\",\"edu.ar\",\"gob.ar\",\"gov.ar\",\"int.ar\",\"mil.ar\",\"musica.ar\",\"net.ar\",\"org.ar\",\"tur.ar\",\"arpa\",\"e164.arpa\",\"in-addr.arpa\",\"ip6.arpa\",\"iris.arpa\",\"uri.arpa\",\"urn.arpa\",\"as\",\"gov.as\",\"asia\",\"at\",\"ac.at\",\"co.at\",\"gv.at\",\"or.at\",\"au\",\"com.au\",\"net.au\",\"org.au\",\"edu.au\",\"gov.au\",\"asn.au\",\"id.au\",\"info.au\",\"conf.au\",\"oz.au\",\"act.au\",\"nsw.au\",\"nt.au\",\"qld.au\",\"sa.au\",\"tas.au\",\"vic.au\",\"wa.au\",\"act.edu.au\",\"catholic.edu.au\",\"nsw.edu.au\",\"nt.edu.au\",\"qld.edu.au\",\"sa.edu.au\",\"tas.edu.au\",\"vic.edu.au\",\"wa.edu.au\",\"qld.gov.au\",\"sa.gov.au\",\"tas.gov.au\",\"vic.gov.au\",\"wa.gov.au\",\"education.tas.edu.au\",\"schools.nsw.edu.au\",\"aw\",\"com.aw\",\"ax\",\"az\",\"com.az\",\"net.az\",\"int.az\",\"gov.az\",\"org.az\",\"edu.az\",\"info.az\",\"pp.az\",\"mil.az\",\"name.az\",\"pro.az\",\"biz.az\",\"ba\",\"com.ba\",\"edu.ba\",\"gov.ba\",\"mil.ba\",\"net.ba\",\"org.ba\",\"bb\",\"biz.bb\",\"co.bb\",\"com.bb\",\"edu.bb\",\"gov.bb\",\"info.bb\",\"net.bb\",\"org.bb\",\"store.bb\",\"tv.bb\",\"*.bd\",\"be\",\"ac.be\",\"bf\",\"gov.bf\",\"bg\",\"a.bg\",\"b.bg\",\"c.bg\",\"d.bg\",\"e.bg\",\"f.bg\",\"g.bg\",\"h.bg\",\"i.bg\",\"j.bg\",\"k.bg\",\"l.bg\",\"m.bg\",\"n.bg\",\"o.bg\",\"p.bg\",\"q.bg\",\"r.bg\",\"s.bg\",\"t.bg\",\"u.bg\",\"v.bg\",\"w.bg\",\"x.bg\",\"y.bg\",\"z.bg\",\"0.bg\",\"1.bg\",\"2.bg\",\"3.bg\",\"4.bg\",\"5.bg\",\"6.bg\",\"7.bg\",\"8.bg\",\"9.bg\",\"bh\",\"com.bh\",\"edu.bh\",\"net.bh\",\"org.bh\",\"gov.bh\",\"bi\",\"co.bi\",\"com.bi\",\"edu.bi\",\"or.bi\",\"org.bi\",\"biz\",\"bj\",\"asso.bj\",\"barreau.bj\",\"gouv.bj\",\"bm\",\"com.bm\",\"edu.bm\",\"gov.bm\",\"net.bm\",\"org.bm\",\"bn\",\"com.bn\",\"edu.bn\",\"gov.bn\",\"net.bn\",\"org.bn\",\"bo\",\"com.bo\",\"edu.bo\",\"gob.bo\",\"int.bo\",\"org.bo\",\"net.bo\",\"mil.bo\",\"tv.bo\",\"web.bo\",\"academia.bo\",\"agro.bo\",\"arte.bo\",\"blog.bo\",\"bolivia.bo\",\"ciencia.bo\",\"cooperativa.bo\",\"democracia.bo\",\"deporte.bo\",\"ecologia.bo\",\"economia.bo\",\"empresa.bo\",\"indigena.bo\",\"industria.bo\",\"info.bo\",\"medicina.bo\",\"movimiento.bo\",\"musica.bo\",\"natural.bo\",\"nombre.bo\",\"noticias.bo\",\"patria.bo\",\"politica.bo\",\"profesional.bo\",\"plurinacional.bo\",\"pueblo.bo\",\"revista.bo\",\"salud.bo\",\"tecnologia.bo\",\"tksat.bo\",\"transporte.bo\",\"wiki.bo\",\"br\",\"9guacu.br\",\"abc.br\",\"adm.br\",\"adv.br\",\"agr.br\",\"aju.br\",\"am.br\",\"anani.br\",\"aparecida.br\",\"arq.br\",\"art.br\",\"ato.br\",\"b.br\",\"barueri.br\",\"belem.br\",\"bhz.br\",\"bio.br\",\"blog.br\",\"bmd.br\",\"boavista.br\",\"bsb.br\",\"campinagrande.br\",\"campinas.br\",\"caxias.br\",\"cim.br\",\"cng.br\",\"cnt.br\",\"com.br\",\"contagem.br\",\"coop.br\",\"cri.br\",\"cuiaba.br\",\"curitiba.br\",\"def.br\",\"ecn.br\",\"eco.br\",\"edu.br\",\"emp.br\",\"eng.br\",\"esp.br\",\"etc.br\",\"eti.br\",\"far.br\",\"feira.br\",\"flog.br\",\"floripa.br\",\"fm.br\",\"fnd.br\",\"fortal.br\",\"fot.br\",\"foz.br\",\"fst.br\",\"g12.br\",\"ggf.br\",\"goiania.br\",\"gov.br\",\"ac.gov.br\",\"al.gov.br\",\"am.gov.br\",\"ap.gov.br\",\"ba.gov.br\",\"ce.gov.br\",\"df.gov.br\",\"es.gov.br\",\"go.gov.br\",\"ma.gov.br\",\"mg.gov.br\",\"ms.gov.br\",\"mt.gov.br\",\"pa.gov.br\",\"pb.gov.br\",\"pe.gov.br\",\"pi.gov.br\",\"pr.gov.br\",\"rj.gov.br\",\"rn.gov.br\",\"ro.gov.br\",\"rr.gov.br\",\"rs.gov.br\",\"sc.gov.br\",\"se.gov.br\",\"sp.gov.br\",\"to.gov.br\",\"gru.br\",\"imb.br\",\"ind.br\",\"inf.br\",\"jab.br\",\"jampa.br\",\"jdf.br\",\"joinville.br\",\"jor.br\",\"jus.br\",\"leg.br\",\"lel.br\",\"londrina.br\",\"macapa.br\",\"maceio.br\",\"manaus.br\",\"maringa.br\",\"mat.br\",\"med.br\",\"mil.br\",\"morena.br\",\"mp.br\",\"mus.br\",\"natal.br\",\"net.br\",\"niteroi.br\",\"*.nom.br\",\"not.br\",\"ntr.br\",\"odo.br\",\"ong.br\",\"org.br\",\"osasco.br\",\"palmas.br\",\"poa.br\",\"ppg.br\",\"pro.br\",\"psc.br\",\"psi.br\",\"pvh.br\",\"qsl.br\",\"radio.br\",\"rec.br\",\"recife.br\",\"ribeirao.br\",\"rio.br\",\"riobranco.br\",\"riopreto.br\",\"salvador.br\",\"sampa.br\",\"santamaria.br\",\"santoandre.br\",\"saobernardo.br\",\"saogonca.br\",\"sjc.br\",\"slg.br\",\"slz.br\",\"sorocaba.br\",\"srv.br\",\"taxi.br\",\"tc.br\",\"teo.br\",\"the.br\",\"tmp.br\",\"trd.br\",\"tur.br\",\"tv.br\",\"udi.br\",\"vet.br\",\"vix.br\",\"vlog.br\",\"wiki.br\",\"zlg.br\",\"bs\",\"com.bs\",\"net.bs\",\"org.bs\",\"edu.bs\",\"gov.bs\",\"bt\",\"com.bt\",\"edu.bt\",\"gov.bt\",\"net.bt\",\"org.bt\",\"bv\",\"bw\",\"co.bw\",\"org.bw\",\"by\",\"gov.by\",\"mil.by\",\"com.by\",\"of.by\",\"bz\",\"com.bz\",\"net.bz\",\"org.bz\",\"edu.bz\",\"gov.bz\",\"ca\",\"ab.ca\",\"bc.ca\",\"mb.ca\",\"nb.ca\",\"nf.ca\",\"nl.ca\",\"ns.ca\",\"nt.ca\",\"nu.ca\",\"on.ca\",\"pe.ca\",\"qc.ca\",\"sk.ca\",\"yk.ca\",\"gc.ca\",\"cat\",\"cc\",\"cd\",\"gov.cd\",\"cf\",\"cg\",\"ch\",\"ci\",\"org.ci\",\"or.ci\",\"com.ci\",\"co.ci\",\"edu.ci\",\"ed.ci\",\"ac.ci\",\"net.ci\",\"go.ci\",\"asso.ci\",\"aéroport.ci\",\"int.ci\",\"presse.ci\",\"md.ci\",\"gouv.ci\",\"*.ck\",\"!www.ck\",\"cl\",\"aprendemas.cl\",\"co.cl\",\"gob.cl\",\"gov.cl\",\"mil.cl\",\"cm\",\"co.cm\",\"com.cm\",\"gov.cm\",\"net.cm\",\"cn\",\"ac.cn\",\"com.cn\",\"edu.cn\",\"gov.cn\",\"net.cn\",\"org.cn\",\"mil.cn\",\"公司.cn\",\"网络.cn\",\"網絡.cn\",\"ah.cn\",\"bj.cn\",\"cq.cn\",\"fj.cn\",\"gd.cn\",\"gs.cn\",\"gz.cn\",\"gx.cn\",\"ha.cn\",\"hb.cn\",\"he.cn\",\"hi.cn\",\"hl.cn\",\"hn.cn\",\"jl.cn\",\"js.cn\",\"jx.cn\",\"ln.cn\",\"nm.cn\",\"nx.cn\",\"qh.cn\",\"sc.cn\",\"sd.cn\",\"sh.cn\",\"sn.cn\",\"sx.cn\",\"tj.cn\",\"xj.cn\",\"xz.cn\",\"yn.cn\",\"zj.cn\",\"hk.cn\",\"mo.cn\",\"tw.cn\",\"co\",\"arts.co\",\"com.co\",\"edu.co\",\"firm.co\",\"gov.co\",\"info.co\",\"int.co\",\"mil.co\",\"net.co\",\"nom.co\",\"org.co\",\"rec.co\",\"web.co\",\"com\",\"coop\",\"cr\",\"ac.cr\",\"co.cr\",\"ed.cr\",\"fi.cr\",\"go.cr\",\"or.cr\",\"sa.cr\",\"cu\",\"com.cu\",\"edu.cu\",\"org.cu\",\"net.cu\",\"gov.cu\",\"inf.cu\",\"cv\",\"cw\",\"com.cw\",\"edu.cw\",\"net.cw\",\"org.cw\",\"cx\",\"gov.cx\",\"cy\",\"ac.cy\",\"biz.cy\",\"com.cy\",\"ekloges.cy\",\"gov.cy\",\"ltd.cy\",\"name.cy\",\"net.cy\",\"org.cy\",\"parliament.cy\",\"press.cy\",\"pro.cy\",\"tm.cy\",\"cz\",\"de\",\"dj\",\"dk\",\"dm\",\"com.dm\",\"net.dm\",\"org.dm\",\"edu.dm\",\"gov.dm\",\"do\",\"art.do\",\"com.do\",\"edu.do\",\"gob.do\",\"gov.do\",\"mil.do\",\"net.do\",\"org.do\",\"sld.do\",\"web.do\",\"dz\",\"com.dz\",\"org.dz\",\"net.dz\",\"gov.dz\",\"edu.dz\",\"asso.dz\",\"pol.dz\",\"art.dz\",\"ec\",\"com.ec\",\"info.ec\",\"net.ec\",\"fin.ec\",\"k12.ec\",\"med.ec\",\"pro.ec\",\"org.ec\",\"edu.ec\",\"gov.ec\",\"gob.ec\",\"mil.ec\",\"edu\",\"ee\",\"edu.ee\",\"gov.ee\",\"riik.ee\",\"lib.ee\",\"med.ee\",\"com.ee\",\"pri.ee\",\"aip.ee\",\"org.ee\",\"fie.ee\",\"eg\",\"com.eg\",\"edu.eg\",\"eun.eg\",\"gov.eg\",\"mil.eg\",\"name.eg\",\"net.eg\",\"org.eg\",\"sci.eg\",\"*.er\",\"es\",\"com.es\",\"nom.es\",\"org.es\",\"gob.es\",\"edu.es\",\"et\",\"com.et\",\"gov.et\",\"org.et\",\"edu.et\",\"biz.et\",\"name.et\",\"info.et\",\"net.et\",\"eu\",\"fi\",\"aland.fi\",\"fj\",\"ac.fj\",\"biz.fj\",\"com.fj\",\"gov.fj\",\"info.fj\",\"mil.fj\",\"name.fj\",\"net.fj\",\"org.fj\",\"pro.fj\",\"*.fk\",\"fm\",\"fo\",\"fr\",\"asso.fr\",\"com.fr\",\"gouv.fr\",\"nom.fr\",\"prd.fr\",\"tm.fr\",\"aeroport.fr\",\"avocat.fr\",\"avoues.fr\",\"cci.fr\",\"chambagri.fr\",\"chirurgiens-dentistes.fr\",\"experts-comptables.fr\",\"geometre-expert.fr\",\"greta.fr\",\"huissier-justice.fr\",\"medecin.fr\",\"notaires.fr\",\"pharmacien.fr\",\"port.fr\",\"veterinaire.fr\",\"ga\",\"gb\",\"gd\",\"ge\",\"com.ge\",\"edu.ge\",\"gov.ge\",\"org.ge\",\"mil.ge\",\"net.ge\",\"pvt.ge\",\"gf\",\"gg\",\"co.gg\",\"net.gg\",\"org.gg\",\"gh\",\"com.gh\",\"edu.gh\",\"gov.gh\",\"org.gh\",\"mil.gh\",\"gi\",\"com.gi\",\"ltd.gi\",\"gov.gi\",\"mod.gi\",\"edu.gi\",\"org.gi\",\"gl\",\"co.gl\",\"com.gl\",\"edu.gl\",\"net.gl\",\"org.gl\",\"gm\",\"gn\",\"ac.gn\",\"com.gn\",\"edu.gn\",\"gov.gn\",\"org.gn\",\"net.gn\",\"gov\",\"gp\",\"com.gp\",\"net.gp\",\"mobi.gp\",\"edu.gp\",\"org.gp\",\"asso.gp\",\"gq\",\"gr\",\"com.gr\",\"edu.gr\",\"net.gr\",\"org.gr\",\"gov.gr\",\"gs\",\"gt\",\"com.gt\",\"edu.gt\",\"gob.gt\",\"ind.gt\",\"mil.gt\",\"net.gt\",\"org.gt\",\"gu\",\"com.gu\",\"edu.gu\",\"gov.gu\",\"guam.gu\",\"info.gu\",\"net.gu\",\"org.gu\",\"web.gu\",\"gw\",\"gy\",\"co.gy\",\"com.gy\",\"edu.gy\",\"gov.gy\",\"net.gy\",\"org.gy\",\"hk\",\"com.hk\",\"edu.hk\",\"gov.hk\",\"idv.hk\",\"net.hk\",\"org.hk\",\"公司.hk\",\"教育.hk\",\"敎育.hk\",\"政府.hk\",\"個人.hk\",\"个人.hk\",\"箇人.hk\",\"網络.hk\",\"网络.hk\",\"组織.hk\",\"網絡.hk\",\"网絡.hk\",\"组织.hk\",\"組織.hk\",\"組织.hk\",\"hm\",\"hn\",\"com.hn\",\"edu.hn\",\"org.hn\",\"net.hn\",\"mil.hn\",\"gob.hn\",\"hr\",\"iz.hr\",\"from.hr\",\"name.hr\",\"com.hr\",\"ht\",\"com.ht\",\"shop.ht\",\"firm.ht\",\"info.ht\",\"adult.ht\",\"net.ht\",\"pro.ht\",\"org.ht\",\"med.ht\",\"art.ht\",\"coop.ht\",\"pol.ht\",\"asso.ht\",\"edu.ht\",\"rel.ht\",\"gouv.ht\",\"perso.ht\",\"hu\",\"co.hu\",\"info.hu\",\"org.hu\",\"priv.hu\",\"sport.hu\",\"tm.hu\",\"2000.hu\",\"agrar.hu\",\"bolt.hu\",\"casino.hu\",\"city.hu\",\"erotica.hu\",\"erotika.hu\",\"film.hu\",\"forum.hu\",\"games.hu\",\"hotel.hu\",\"ingatlan.hu\",\"jogasz.hu\",\"konyvelo.hu\",\"lakas.hu\",\"media.hu\",\"news.hu\",\"reklam.hu\",\"sex.hu\",\"shop.hu\",\"suli.hu\",\"szex.hu\",\"tozsde.hu\",\"utazas.hu\",\"video.hu\",\"id\",\"ac.id\",\"biz.id\",\"co.id\",\"desa.id\",\"go.id\",\"mil.id\",\"my.id\",\"net.id\",\"or.id\",\"ponpes.id\",\"sch.id\",\"web.id\",\"ie\",\"gov.ie\",\"il\",\"ac.il\",\"co.il\",\"gov.il\",\"idf.il\",\"k12.il\",\"muni.il\",\"net.il\",\"org.il\",\"im\",\"ac.im\",\"co.im\",\"com.im\",\"ltd.co.im\",\"net.im\",\"org.im\",\"plc.co.im\",\"tt.im\",\"tv.im\",\"in\",\"co.in\",\"firm.in\",\"net.in\",\"org.in\",\"gen.in\",\"ind.in\",\"nic.in\",\"ac.in\",\"edu.in\",\"res.in\",\"gov.in\",\"mil.in\",\"info\",\"int\",\"eu.int\",\"io\",\"com.io\",\"iq\",\"gov.iq\",\"edu.iq\",\"mil.iq\",\"com.iq\",\"org.iq\",\"net.iq\",\"ir\",\"ac.ir\",\"co.ir\",\"gov.ir\",\"id.ir\",\"net.ir\",\"org.ir\",\"sch.ir\",\"ایران.ir\",\"ايران.ir\",\"is\",\"net.is\",\"com.is\",\"edu.is\",\"gov.is\",\"org.is\",\"int.is\",\"it\",\"gov.it\",\"edu.it\",\"abr.it\",\"abruzzo.it\",\"aosta-valley.it\",\"aostavalley.it\",\"bas.it\",\"basilicata.it\",\"cal.it\",\"calabria.it\",\"cam.it\",\"campania.it\",\"emilia-romagna.it\",\"emiliaromagna.it\",\"emr.it\",\"friuli-v-giulia.it\",\"friuli-ve-giulia.it\",\"friuli-vegiulia.it\",\"friuli-venezia-giulia.it\",\"friuli-veneziagiulia.it\",\"friuli-vgiulia.it\",\"friuliv-giulia.it\",\"friulive-giulia.it\",\"friulivegiulia.it\",\"friulivenezia-giulia.it\",\"friuliveneziagiulia.it\",\"friulivgiulia.it\",\"fvg.it\",\"laz.it\",\"lazio.it\",\"lig.it\",\"liguria.it\",\"lom.it\",\"lombardia.it\",\"lombardy.it\",\"lucania.it\",\"mar.it\",\"marche.it\",\"mol.it\",\"molise.it\",\"piedmont.it\",\"piemonte.it\",\"pmn.it\",\"pug.it\",\"puglia.it\",\"sar.it\",\"sardegna.it\",\"sardinia.it\",\"sic.it\",\"sicilia.it\",\"sicily.it\",\"taa.it\",\"tos.it\",\"toscana.it\",\"trentin-sud-tirol.it\",\"trentin-süd-tirol.it\",\"trentin-sudtirol.it\",\"trentin-südtirol.it\",\"trentin-sued-tirol.it\",\"trentin-suedtirol.it\",\"trentino-a-adige.it\",\"trentino-aadige.it\",\"trentino-alto-adige.it\",\"trentino-altoadige.it\",\"trentino-s-tirol.it\",\"trentino-stirol.it\",\"trentino-sud-tirol.it\",\"trentino-süd-tirol.it\",\"trentino-sudtirol.it\",\"trentino-südtirol.it\",\"trentino-sued-tirol.it\",\"trentino-suedtirol.it\",\"trentino.it\",\"trentinoa-adige.it\",\"trentinoaadige.it\",\"trentinoalto-adige.it\",\"trentinoaltoadige.it\",\"trentinos-tirol.it\",\"trentinostirol.it\",\"trentinosud-tirol.it\",\"trentinosüd-tirol.it\",\"trentinosudtirol.it\",\"trentinosüdtirol.it\",\"trentinosued-tirol.it\",\"trentinosuedtirol.it\",\"trentinsud-tirol.it\",\"trentinsüd-tirol.it\",\"trentinsudtirol.it\",\"trentinsüdtirol.it\",\"trentinsued-tirol.it\",\"trentinsuedtirol.it\",\"tuscany.it\",\"umb.it\",\"umbria.it\",\"val-d-aosta.it\",\"val-daosta.it\",\"vald-aosta.it\",\"valdaosta.it\",\"valle-aosta.it\",\"valle-d-aosta.it\",\"valle-daosta.it\",\"valleaosta.it\",\"valled-aosta.it\",\"valledaosta.it\",\"vallee-aoste.it\",\"vallée-aoste.it\",\"vallee-d-aoste.it\",\"vallée-d-aoste.it\",\"valleeaoste.it\",\"valléeaoste.it\",\"valleedaoste.it\",\"valléedaoste.it\",\"vao.it\",\"vda.it\",\"ven.it\",\"veneto.it\",\"ag.it\",\"agrigento.it\",\"al.it\",\"alessandria.it\",\"alto-adige.it\",\"altoadige.it\",\"an.it\",\"ancona.it\",\"andria-barletta-trani.it\",\"andria-trani-barletta.it\",\"andriabarlettatrani.it\",\"andriatranibarletta.it\",\"ao.it\",\"aosta.it\",\"aoste.it\",\"ap.it\",\"aq.it\",\"aquila.it\",\"ar.it\",\"arezzo.it\",\"ascoli-piceno.it\",\"ascolipiceno.it\",\"asti.it\",\"at.it\",\"av.it\",\"avellino.it\",\"ba.it\",\"balsan-sudtirol.it\",\"balsan-südtirol.it\",\"balsan-suedtirol.it\",\"balsan.it\",\"bari.it\",\"barletta-trani-andria.it\",\"barlettatraniandria.it\",\"belluno.it\",\"benevento.it\",\"bergamo.it\",\"bg.it\",\"bi.it\",\"biella.it\",\"bl.it\",\"bn.it\",\"bo.it\",\"bologna.it\",\"bolzano-altoadige.it\",\"bolzano.it\",\"bozen-sudtirol.it\",\"bozen-südtirol.it\",\"bozen-suedtirol.it\",\"bozen.it\",\"br.it\",\"brescia.it\",\"brindisi.it\",\"bs.it\",\"bt.it\",\"bulsan-sudtirol.it\",\"bulsan-südtirol.it\",\"bulsan-suedtirol.it\",\"bulsan.it\",\"bz.it\",\"ca.it\",\"cagliari.it\",\"caltanissetta.it\",\"campidano-medio.it\",\"campidanomedio.it\",\"campobasso.it\",\"carbonia-iglesias.it\",\"carboniaiglesias.it\",\"carrara-massa.it\",\"carraramassa.it\",\"caserta.it\",\"catania.it\",\"catanzaro.it\",\"cb.it\",\"ce.it\",\"cesena-forli.it\",\"cesena-forlì.it\",\"cesenaforli.it\",\"cesenaforlì.it\",\"ch.it\",\"chieti.it\",\"ci.it\",\"cl.it\",\"cn.it\",\"co.it\",\"como.it\",\"cosenza.it\",\"cr.it\",\"cremona.it\",\"crotone.it\",\"cs.it\",\"ct.it\",\"cuneo.it\",\"cz.it\",\"dell-ogliastra.it\",\"dellogliastra.it\",\"en.it\",\"enna.it\",\"fc.it\",\"fe.it\",\"fermo.it\",\"ferrara.it\",\"fg.it\",\"fi.it\",\"firenze.it\",\"florence.it\",\"fm.it\",\"foggia.it\",\"forli-cesena.it\",\"forlì-cesena.it\",\"forlicesena.it\",\"forlìcesena.it\",\"fr.it\",\"frosinone.it\",\"ge.it\",\"genoa.it\",\"genova.it\",\"go.it\",\"gorizia.it\",\"gr.it\",\"grosseto.it\",\"iglesias-carbonia.it\",\"iglesiascarbonia.it\",\"im.it\",\"imperia.it\",\"is.it\",\"isernia.it\",\"kr.it\",\"la-spezia.it\",\"laquila.it\",\"laspezia.it\",\"latina.it\",\"lc.it\",\"le.it\",\"lecce.it\",\"lecco.it\",\"li.it\",\"livorno.it\",\"lo.it\",\"lodi.it\",\"lt.it\",\"lu.it\",\"lucca.it\",\"macerata.it\",\"mantova.it\",\"massa-carrara.it\",\"massacarrara.it\",\"matera.it\",\"mb.it\",\"mc.it\",\"me.it\",\"medio-campidano.it\",\"mediocampidano.it\",\"messina.it\",\"mi.it\",\"milan.it\",\"milano.it\",\"mn.it\",\"mo.it\",\"modena.it\",\"monza-brianza.it\",\"monza-e-della-brianza.it\",\"monza.it\",\"monzabrianza.it\",\"monzaebrianza.it\",\"monzaedellabrianza.it\",\"ms.it\",\"mt.it\",\"na.it\",\"naples.it\",\"napoli.it\",\"no.it\",\"novara.it\",\"nu.it\",\"nuoro.it\",\"og.it\",\"ogliastra.it\",\"olbia-tempio.it\",\"olbiatempio.it\",\"or.it\",\"oristano.it\",\"ot.it\",\"pa.it\",\"padova.it\",\"padua.it\",\"palermo.it\",\"parma.it\",\"pavia.it\",\"pc.it\",\"pd.it\",\"pe.it\",\"perugia.it\",\"pesaro-urbino.it\",\"pesarourbino.it\",\"pescara.it\",\"pg.it\",\"pi.it\",\"piacenza.it\",\"pisa.it\",\"pistoia.it\",\"pn.it\",\"po.it\",\"pordenone.it\",\"potenza.it\",\"pr.it\",\"prato.it\",\"pt.it\",\"pu.it\",\"pv.it\",\"pz.it\",\"ra.it\",\"ragusa.it\",\"ravenna.it\",\"rc.it\",\"re.it\",\"reggio-calabria.it\",\"reggio-emilia.it\",\"reggiocalabria.it\",\"reggioemilia.it\",\"rg.it\",\"ri.it\",\"rieti.it\",\"rimini.it\",\"rm.it\",\"rn.it\",\"ro.it\",\"roma.it\",\"rome.it\",\"rovigo.it\",\"sa.it\",\"salerno.it\",\"sassari.it\",\"savona.it\",\"si.it\",\"siena.it\",\"siracusa.it\",\"so.it\",\"sondrio.it\",\"sp.it\",\"sr.it\",\"ss.it\",\"suedtirol.it\",\"südtirol.it\",\"sv.it\",\"ta.it\",\"taranto.it\",\"te.it\",\"tempio-olbia.it\",\"tempioolbia.it\",\"teramo.it\",\"terni.it\",\"tn.it\",\"to.it\",\"torino.it\",\"tp.it\",\"tr.it\",\"trani-andria-barletta.it\",\"trani-barletta-andria.it\",\"traniandriabarletta.it\",\"tranibarlettaandria.it\",\"trapani.it\",\"trento.it\",\"treviso.it\",\"trieste.it\",\"ts.it\",\"turin.it\",\"tv.it\",\"ud.it\",\"udine.it\",\"urbino-pesaro.it\",\"urbinopesaro.it\",\"va.it\",\"varese.it\",\"vb.it\",\"vc.it\",\"ve.it\",\"venezia.it\",\"venice.it\",\"verbania.it\",\"vercelli.it\",\"verona.it\",\"vi.it\",\"vibo-valentia.it\",\"vibovalentia.it\",\"vicenza.it\",\"viterbo.it\",\"vr.it\",\"vs.it\",\"vt.it\",\"vv.it\",\"je\",\"co.je\",\"net.je\",\"org.je\",\"*.jm\",\"jo\",\"com.jo\",\"org.jo\",\"net.jo\",\"edu.jo\",\"sch.jo\",\"gov.jo\",\"mil.jo\",\"name.jo\",\"jobs\",\"jp\",\"ac.jp\",\"ad.jp\",\"co.jp\",\"ed.jp\",\"go.jp\",\"gr.jp\",\"lg.jp\",\"ne.jp\",\"or.jp\",\"aichi.jp\",\"akita.jp\",\"aomori.jp\",\"chiba.jp\",\"ehime.jp\",\"fukui.jp\",\"fukuoka.jp\",\"fukushima.jp\",\"gifu.jp\",\"gunma.jp\",\"hiroshima.jp\",\"hokkaido.jp\",\"hyogo.jp\",\"ibaraki.jp\",\"ishikawa.jp\",\"iwate.jp\",\"kagawa.jp\",\"kagoshima.jp\",\"kanagawa.jp\",\"kochi.jp\",\"kumamoto.jp\",\"kyoto.jp\",\"mie.jp\",\"miyagi.jp\",\"miyazaki.jp\",\"nagano.jp\",\"nagasaki.jp\",\"nara.jp\",\"niigata.jp\",\"oita.jp\",\"okayama.jp\",\"okinawa.jp\",\"osaka.jp\",\"saga.jp\",\"saitama.jp\",\"shiga.jp\",\"shimane.jp\",\"shizuoka.jp\",\"tochigi.jp\",\"tokushima.jp\",\"tokyo.jp\",\"tottori.jp\",\"toyama.jp\",\"wakayama.jp\",\"yamagata.jp\",\"yamaguchi.jp\",\"yamanashi.jp\",\"栃木.jp\",\"愛知.jp\",\"愛媛.jp\",\"兵庫.jp\",\"熊本.jp\",\"茨城.jp\",\"北海道.jp\",\"千葉.jp\",\"和歌山.jp\",\"長崎.jp\",\"長野.jp\",\"新潟.jp\",\"青森.jp\",\"静岡.jp\",\"東京.jp\",\"石川.jp\",\"埼玉.jp\",\"三重.jp\",\"京都.jp\",\"佐賀.jp\",\"大分.jp\",\"大阪.jp\",\"奈良.jp\",\"宮城.jp\",\"宮崎.jp\",\"富山.jp\",\"山口.jp\",\"山形.jp\",\"山梨.jp\",\"岩手.jp\",\"岐阜.jp\",\"岡山.jp\",\"島根.jp\",\"広島.jp\",\"徳島.jp\",\"沖縄.jp\",\"滋賀.jp\",\"神奈川.jp\",\"福井.jp\",\"福岡.jp\",\"福島.jp\",\"秋田.jp\",\"群馬.jp\",\"香川.jp\",\"高知.jp\",\"鳥取.jp\",\"鹿児島.jp\",\"*.kawasaki.jp\",\"*.kitakyushu.jp\",\"*.kobe.jp\",\"*.nagoya.jp\",\"*.sapporo.jp\",\"*.sendai.jp\",\"*.yokohama.jp\",\"!city.kawasaki.jp\",\"!city.kitakyushu.jp\",\"!city.kobe.jp\",\"!city.nagoya.jp\",\"!city.sapporo.jp\",\"!city.sendai.jp\",\"!city.yokohama.jp\",\"aisai.aichi.jp\",\"ama.aichi.jp\",\"anjo.aichi.jp\",\"asuke.aichi.jp\",\"chiryu.aichi.jp\",\"chita.aichi.jp\",\"fuso.aichi.jp\",\"gamagori.aichi.jp\",\"handa.aichi.jp\",\"hazu.aichi.jp\",\"hekinan.aichi.jp\",\"higashiura.aichi.jp\",\"ichinomiya.aichi.jp\",\"inazawa.aichi.jp\",\"inuyama.aichi.jp\",\"isshiki.aichi.jp\",\"iwakura.aichi.jp\",\"kanie.aichi.jp\",\"kariya.aichi.jp\",\"kasugai.aichi.jp\",\"kira.aichi.jp\",\"kiyosu.aichi.jp\",\"komaki.aichi.jp\",\"konan.aichi.jp\",\"kota.aichi.jp\",\"mihama.aichi.jp\",\"miyoshi.aichi.jp\",\"nishio.aichi.jp\",\"nisshin.aichi.jp\",\"obu.aichi.jp\",\"oguchi.aichi.jp\",\"oharu.aichi.jp\",\"okazaki.aichi.jp\",\"owariasahi.aichi.jp\",\"seto.aichi.jp\",\"shikatsu.aichi.jp\",\"shinshiro.aichi.jp\",\"shitara.aichi.jp\",\"tahara.aichi.jp\",\"takahama.aichi.jp\",\"tobishima.aichi.jp\",\"toei.aichi.jp\",\"togo.aichi.jp\",\"tokai.aichi.jp\",\"tokoname.aichi.jp\",\"toyoake.aichi.jp\",\"toyohashi.aichi.jp\",\"toyokawa.aichi.jp\",\"toyone.aichi.jp\",\"toyota.aichi.jp\",\"tsushima.aichi.jp\",\"yatomi.aichi.jp\",\"akita.akita.jp\",\"daisen.akita.jp\",\"fujisato.akita.jp\",\"gojome.akita.jp\",\"hachirogata.akita.jp\",\"happou.akita.jp\",\"higashinaruse.akita.jp\",\"honjo.akita.jp\",\"honjyo.akita.jp\",\"ikawa.akita.jp\",\"kamikoani.akita.jp\",\"kamioka.akita.jp\",\"katagami.akita.jp\",\"kazuno.akita.jp\",\"kitaakita.akita.jp\",\"kosaka.akita.jp\",\"kyowa.akita.jp\",\"misato.akita.jp\",\"mitane.akita.jp\",\"moriyoshi.akita.jp\",\"nikaho.akita.jp\",\"noshiro.akita.jp\",\"odate.akita.jp\",\"oga.akita.jp\",\"ogata.akita.jp\",\"semboku.akita.jp\",\"yokote.akita.jp\",\"yurihonjo.akita.jp\",\"aomori.aomori.jp\",\"gonohe.aomori.jp\",\"hachinohe.aomori.jp\",\"hashikami.aomori.jp\",\"hiranai.aomori.jp\",\"hirosaki.aomori.jp\",\"itayanagi.aomori.jp\",\"kuroishi.aomori.jp\",\"misawa.aomori.jp\",\"mutsu.aomori.jp\",\"nakadomari.aomori.jp\",\"noheji.aomori.jp\",\"oirase.aomori.jp\",\"owani.aomori.jp\",\"rokunohe.aomori.jp\",\"sannohe.aomori.jp\",\"shichinohe.aomori.jp\",\"shingo.aomori.jp\",\"takko.aomori.jp\",\"towada.aomori.jp\",\"tsugaru.aomori.jp\",\"tsuruta.aomori.jp\",\"abiko.chiba.jp\",\"asahi.chiba.jp\",\"chonan.chiba.jp\",\"chosei.chiba.jp\",\"choshi.chiba.jp\",\"chuo.chiba.jp\",\"funabashi.chiba.jp\",\"futtsu.chiba.jp\",\"hanamigawa.chiba.jp\",\"ichihara.chiba.jp\",\"ichikawa.chiba.jp\",\"ichinomiya.chiba.jp\",\"inzai.chiba.jp\",\"isumi.chiba.jp\",\"kamagaya.chiba.jp\",\"kamogawa.chiba.jp\",\"kashiwa.chiba.jp\",\"katori.chiba.jp\",\"katsuura.chiba.jp\",\"kimitsu.chiba.jp\",\"kisarazu.chiba.jp\",\"kozaki.chiba.jp\",\"kujukuri.chiba.jp\",\"kyonan.chiba.jp\",\"matsudo.chiba.jp\",\"midori.chiba.jp\",\"mihama.chiba.jp\",\"minamiboso.chiba.jp\",\"mobara.chiba.jp\",\"mutsuzawa.chiba.jp\",\"nagara.chiba.jp\",\"nagareyama.chiba.jp\",\"narashino.chiba.jp\",\"narita.chiba.jp\",\"noda.chiba.jp\",\"oamishirasato.chiba.jp\",\"omigawa.chiba.jp\",\"onjuku.chiba.jp\",\"otaki.chiba.jp\",\"sakae.chiba.jp\",\"sakura.chiba.jp\",\"shimofusa.chiba.jp\",\"shirako.chiba.jp\",\"shiroi.chiba.jp\",\"shisui.chiba.jp\",\"sodegaura.chiba.jp\",\"sosa.chiba.jp\",\"tako.chiba.jp\",\"tateyama.chiba.jp\",\"togane.chiba.jp\",\"tohnosho.chiba.jp\",\"tomisato.chiba.jp\",\"urayasu.chiba.jp\",\"yachimata.chiba.jp\",\"yachiyo.chiba.jp\",\"yokaichiba.chiba.jp\",\"yokoshibahikari.chiba.jp\",\"yotsukaido.chiba.jp\",\"ainan.ehime.jp\",\"honai.ehime.jp\",\"ikata.ehime.jp\",\"imabari.ehime.jp\",\"iyo.ehime.jp\",\"kamijima.ehime.jp\",\"kihoku.ehime.jp\",\"kumakogen.ehime.jp\",\"masaki.ehime.jp\",\"matsuno.ehime.jp\",\"matsuyama.ehime.jp\",\"namikata.ehime.jp\",\"niihama.ehime.jp\",\"ozu.ehime.jp\",\"saijo.ehime.jp\",\"seiyo.ehime.jp\",\"shikokuchuo.ehime.jp\",\"tobe.ehime.jp\",\"toon.ehime.jp\",\"uchiko.ehime.jp\",\"uwajima.ehime.jp\",\"yawatahama.ehime.jp\",\"echizen.fukui.jp\",\"eiheiji.fukui.jp\",\"fukui.fukui.jp\",\"ikeda.fukui.jp\",\"katsuyama.fukui.jp\",\"mihama.fukui.jp\",\"minamiechizen.fukui.jp\",\"obama.fukui.jp\",\"ohi.fukui.jp\",\"ono.fukui.jp\",\"sabae.fukui.jp\",\"sakai.fukui.jp\",\"takahama.fukui.jp\",\"tsuruga.fukui.jp\",\"wakasa.fukui.jp\",\"ashiya.fukuoka.jp\",\"buzen.fukuoka.jp\",\"chikugo.fukuoka.jp\",\"chikuho.fukuoka.jp\",\"chikujo.fukuoka.jp\",\"chikushino.fukuoka.jp\",\"chikuzen.fukuoka.jp\",\"chuo.fukuoka.jp\",\"dazaifu.fukuoka.jp\",\"fukuchi.fukuoka.jp\",\"hakata.fukuoka.jp\",\"higashi.fukuoka.jp\",\"hirokawa.fukuoka.jp\",\"hisayama.fukuoka.jp\",\"iizuka.fukuoka.jp\",\"inatsuki.fukuoka.jp\",\"kaho.fukuoka.jp\",\"kasuga.fukuoka.jp\",\"kasuya.fukuoka.jp\",\"kawara.fukuoka.jp\",\"keisen.fukuoka.jp\",\"koga.fukuoka.jp\",\"kurate.fukuoka.jp\",\"kurogi.fukuoka.jp\",\"kurume.fukuoka.jp\",\"minami.fukuoka.jp\",\"miyako.fukuoka.jp\",\"miyama.fukuoka.jp\",\"miyawaka.fukuoka.jp\",\"mizumaki.fukuoka.jp\",\"munakata.fukuoka.jp\",\"nakagawa.fukuoka.jp\",\"nakama.fukuoka.jp\",\"nishi.fukuoka.jp\",\"nogata.fukuoka.jp\",\"ogori.fukuoka.jp\",\"okagaki.fukuoka.jp\",\"okawa.fukuoka.jp\",\"oki.fukuoka.jp\",\"omuta.fukuoka.jp\",\"onga.fukuoka.jp\",\"onojo.fukuoka.jp\",\"oto.fukuoka.jp\",\"saigawa.fukuoka.jp\",\"sasaguri.fukuoka.jp\",\"shingu.fukuoka.jp\",\"shinyoshitomi.fukuoka.jp\",\"shonai.fukuoka.jp\",\"soeda.fukuoka.jp\",\"sue.fukuoka.jp\",\"tachiarai.fukuoka.jp\",\"tagawa.fukuoka.jp\",\"takata.fukuoka.jp\",\"toho.fukuoka.jp\",\"toyotsu.fukuoka.jp\",\"tsuiki.fukuoka.jp\",\"ukiha.fukuoka.jp\",\"umi.fukuoka.jp\",\"usui.fukuoka.jp\",\"yamada.fukuoka.jp\",\"yame.fukuoka.jp\",\"yanagawa.fukuoka.jp\",\"yukuhashi.fukuoka.jp\",\"aizubange.fukushima.jp\",\"aizumisato.fukushima.jp\",\"aizuwakamatsu.fukushima.jp\",\"asakawa.fukushima.jp\",\"bandai.fukushima.jp\",\"date.fukushima.jp\",\"fukushima.fukushima.jp\",\"furudono.fukushima.jp\",\"futaba.fukushima.jp\",\"hanawa.fukushima.jp\",\"higashi.fukushima.jp\",\"hirata.fukushima.jp\",\"hirono.fukushima.jp\",\"iitate.fukushima.jp\",\"inawashiro.fukushima.jp\",\"ishikawa.fukushima.jp\",\"iwaki.fukushima.jp\",\"izumizaki.fukushima.jp\",\"kagamiishi.fukushima.jp\",\"kaneyama.fukushima.jp\",\"kawamata.fukushima.jp\",\"kitakata.fukushima.jp\",\"kitashiobara.fukushima.jp\",\"koori.fukushima.jp\",\"koriyama.fukushima.jp\",\"kunimi.fukushima.jp\",\"miharu.fukushima.jp\",\"mishima.fukushima.jp\",\"namie.fukushima.jp\",\"nango.fukushima.jp\",\"nishiaizu.fukushima.jp\",\"nishigo.fukushima.jp\",\"okuma.fukushima.jp\",\"omotego.fukushima.jp\",\"ono.fukushima.jp\",\"otama.fukushima.jp\",\"samegawa.fukushima.jp\",\"shimogo.fukushima.jp\",\"shirakawa.fukushima.jp\",\"showa.fukushima.jp\",\"soma.fukushima.jp\",\"sukagawa.fukushima.jp\",\"taishin.fukushima.jp\",\"tamakawa.fukushima.jp\",\"tanagura.fukushima.jp\",\"tenei.fukushima.jp\",\"yabuki.fukushima.jp\",\"yamato.fukushima.jp\",\"yamatsuri.fukushima.jp\",\"yanaizu.fukushima.jp\",\"yugawa.fukushima.jp\",\"anpachi.gifu.jp\",\"ena.gifu.jp\",\"gifu.gifu.jp\",\"ginan.gifu.jp\",\"godo.gifu.jp\",\"gujo.gifu.jp\",\"hashima.gifu.jp\",\"hichiso.gifu.jp\",\"hida.gifu.jp\",\"higashishirakawa.gifu.jp\",\"ibigawa.gifu.jp\",\"ikeda.gifu.jp\",\"kakamigahara.gifu.jp\",\"kani.gifu.jp\",\"kasahara.gifu.jp\",\"kasamatsu.gifu.jp\",\"kawaue.gifu.jp\",\"kitagata.gifu.jp\",\"mino.gifu.jp\",\"minokamo.gifu.jp\",\"mitake.gifu.jp\",\"mizunami.gifu.jp\",\"motosu.gifu.jp\",\"nakatsugawa.gifu.jp\",\"ogaki.gifu.jp\",\"sakahogi.gifu.jp\",\"seki.gifu.jp\",\"sekigahara.gifu.jp\",\"shirakawa.gifu.jp\",\"tajimi.gifu.jp\",\"takayama.gifu.jp\",\"tarui.gifu.jp\",\"toki.gifu.jp\",\"tomika.gifu.jp\",\"wanouchi.gifu.jp\",\"yamagata.gifu.jp\",\"yaotsu.gifu.jp\",\"yoro.gifu.jp\",\"annaka.gunma.jp\",\"chiyoda.gunma.jp\",\"fujioka.gunma.jp\",\"higashiagatsuma.gunma.jp\",\"isesaki.gunma.jp\",\"itakura.gunma.jp\",\"kanna.gunma.jp\",\"kanra.gunma.jp\",\"katashina.gunma.jp\",\"kawaba.gunma.jp\",\"kiryu.gunma.jp\",\"kusatsu.gunma.jp\",\"maebashi.gunma.jp\",\"meiwa.gunma.jp\",\"midori.gunma.jp\",\"minakami.gunma.jp\",\"naganohara.gunma.jp\",\"nakanojo.gunma.jp\",\"nanmoku.gunma.jp\",\"numata.gunma.jp\",\"oizumi.gunma.jp\",\"ora.gunma.jp\",\"ota.gunma.jp\",\"shibukawa.gunma.jp\",\"shimonita.gunma.jp\",\"shinto.gunma.jp\",\"showa.gunma.jp\",\"takasaki.gunma.jp\",\"takayama.gunma.jp\",\"tamamura.gunma.jp\",\"tatebayashi.gunma.jp\",\"tomioka.gunma.jp\",\"tsukiyono.gunma.jp\",\"tsumagoi.gunma.jp\",\"ueno.gunma.jp\",\"yoshioka.gunma.jp\",\"asaminami.hiroshima.jp\",\"daiwa.hiroshima.jp\",\"etajima.hiroshima.jp\",\"fuchu.hiroshima.jp\",\"fukuyama.hiroshima.jp\",\"hatsukaichi.hiroshima.jp\",\"higashihiroshima.hiroshima.jp\",\"hongo.hiroshima.jp\",\"jinsekikogen.hiroshima.jp\",\"kaita.hiroshima.jp\",\"kui.hiroshima.jp\",\"kumano.hiroshima.jp\",\"kure.hiroshima.jp\",\"mihara.hiroshima.jp\",\"miyoshi.hiroshima.jp\",\"naka.hiroshima.jp\",\"onomichi.hiroshima.jp\",\"osakikamijima.hiroshima.jp\",\"otake.hiroshima.jp\",\"saka.hiroshima.jp\",\"sera.hiroshima.jp\",\"seranishi.hiroshima.jp\",\"shinichi.hiroshima.jp\",\"shobara.hiroshima.jp\",\"takehara.hiroshima.jp\",\"abashiri.hokkaido.jp\",\"abira.hokkaido.jp\",\"aibetsu.hokkaido.jp\",\"akabira.hokkaido.jp\",\"akkeshi.hokkaido.jp\",\"asahikawa.hokkaido.jp\",\"ashibetsu.hokkaido.jp\",\"ashoro.hokkaido.jp\",\"assabu.hokkaido.jp\",\"atsuma.hokkaido.jp\",\"bibai.hokkaido.jp\",\"biei.hokkaido.jp\",\"bifuka.hokkaido.jp\",\"bihoro.hokkaido.jp\",\"biratori.hokkaido.jp\",\"chippubetsu.hokkaido.jp\",\"chitose.hokkaido.jp\",\"date.hokkaido.jp\",\"ebetsu.hokkaido.jp\",\"embetsu.hokkaido.jp\",\"eniwa.hokkaido.jp\",\"erimo.hokkaido.jp\",\"esan.hokkaido.jp\",\"esashi.hokkaido.jp\",\"fukagawa.hokkaido.jp\",\"fukushima.hokkaido.jp\",\"furano.hokkaido.jp\",\"furubira.hokkaido.jp\",\"haboro.hokkaido.jp\",\"hakodate.hokkaido.jp\",\"hamatonbetsu.hokkaido.jp\",\"hidaka.hokkaido.jp\",\"higashikagura.hokkaido.jp\",\"higashikawa.hokkaido.jp\",\"hiroo.hokkaido.jp\",\"hokuryu.hokkaido.jp\",\"hokuto.hokkaido.jp\",\"honbetsu.hokkaido.jp\",\"horokanai.hokkaido.jp\",\"horonobe.hokkaido.jp\",\"ikeda.hokkaido.jp\",\"imakane.hokkaido.jp\",\"ishikari.hokkaido.jp\",\"iwamizawa.hokkaido.jp\",\"iwanai.hokkaido.jp\",\"kamifurano.hokkaido.jp\",\"kamikawa.hokkaido.jp\",\"kamishihoro.hokkaido.jp\",\"kamisunagawa.hokkaido.jp\",\"kamoenai.hokkaido.jp\",\"kayabe.hokkaido.jp\",\"kembuchi.hokkaido.jp\",\"kikonai.hokkaido.jp\",\"kimobetsu.hokkaido.jp\",\"kitahiroshima.hokkaido.jp\",\"kitami.hokkaido.jp\",\"kiyosato.hokkaido.jp\",\"koshimizu.hokkaido.jp\",\"kunneppu.hokkaido.jp\",\"kuriyama.hokkaido.jp\",\"kuromatsunai.hokkaido.jp\",\"kushiro.hokkaido.jp\",\"kutchan.hokkaido.jp\",\"kyowa.hokkaido.jp\",\"mashike.hokkaido.jp\",\"matsumae.hokkaido.jp\",\"mikasa.hokkaido.jp\",\"minamifurano.hokkaido.jp\",\"mombetsu.hokkaido.jp\",\"moseushi.hokkaido.jp\",\"mukawa.hokkaido.jp\",\"muroran.hokkaido.jp\",\"naie.hokkaido.jp\",\"nakagawa.hokkaido.jp\",\"nakasatsunai.hokkaido.jp\",\"nakatombetsu.hokkaido.jp\",\"nanae.hokkaido.jp\",\"nanporo.hokkaido.jp\",\"nayoro.hokkaido.jp\",\"nemuro.hokkaido.jp\",\"niikappu.hokkaido.jp\",\"niki.hokkaido.jp\",\"nishiokoppe.hokkaido.jp\",\"noboribetsu.hokkaido.jp\",\"numata.hokkaido.jp\",\"obihiro.hokkaido.jp\",\"obira.hokkaido.jp\",\"oketo.hokkaido.jp\",\"okoppe.hokkaido.jp\",\"otaru.hokkaido.jp\",\"otobe.hokkaido.jp\",\"otofuke.hokkaido.jp\",\"otoineppu.hokkaido.jp\",\"oumu.hokkaido.jp\",\"ozora.hokkaido.jp\",\"pippu.hokkaido.jp\",\"rankoshi.hokkaido.jp\",\"rebun.hokkaido.jp\",\"rikubetsu.hokkaido.jp\",\"rishiri.hokkaido.jp\",\"rishirifuji.hokkaido.jp\",\"saroma.hokkaido.jp\",\"sarufutsu.hokkaido.jp\",\"shakotan.hokkaido.jp\",\"shari.hokkaido.jp\",\"shibecha.hokkaido.jp\",\"shibetsu.hokkaido.jp\",\"shikabe.hokkaido.jp\",\"shikaoi.hokkaido.jp\",\"shimamaki.hokkaido.jp\",\"shimizu.hokkaido.jp\",\"shimokawa.hokkaido.jp\",\"shinshinotsu.hokkaido.jp\",\"shintoku.hokkaido.jp\",\"shiranuka.hokkaido.jp\",\"shiraoi.hokkaido.jp\",\"shiriuchi.hokkaido.jp\",\"sobetsu.hokkaido.jp\",\"sunagawa.hokkaido.jp\",\"taiki.hokkaido.jp\",\"takasu.hokkaido.jp\",\"takikawa.hokkaido.jp\",\"takinoue.hokkaido.jp\",\"teshikaga.hokkaido.jp\",\"tobetsu.hokkaido.jp\",\"tohma.hokkaido.jp\",\"tomakomai.hokkaido.jp\",\"tomari.hokkaido.jp\",\"toya.hokkaido.jp\",\"toyako.hokkaido.jp\",\"toyotomi.hokkaido.jp\",\"toyoura.hokkaido.jp\",\"tsubetsu.hokkaido.jp\",\"tsukigata.hokkaido.jp\",\"urakawa.hokkaido.jp\",\"urausu.hokkaido.jp\",\"uryu.hokkaido.jp\",\"utashinai.hokkaido.jp\",\"wakkanai.hokkaido.jp\",\"wassamu.hokkaido.jp\",\"yakumo.hokkaido.jp\",\"yoichi.hokkaido.jp\",\"aioi.hyogo.jp\",\"akashi.hyogo.jp\",\"ako.hyogo.jp\",\"amagasaki.hyogo.jp\",\"aogaki.hyogo.jp\",\"asago.hyogo.jp\",\"ashiya.hyogo.jp\",\"awaji.hyogo.jp\",\"fukusaki.hyogo.jp\",\"goshiki.hyogo.jp\",\"harima.hyogo.jp\",\"himeji.hyogo.jp\",\"ichikawa.hyogo.jp\",\"inagawa.hyogo.jp\",\"itami.hyogo.jp\",\"kakogawa.hyogo.jp\",\"kamigori.hyogo.jp\",\"kamikawa.hyogo.jp\",\"kasai.hyogo.jp\",\"kasuga.hyogo.jp\",\"kawanishi.hyogo.jp\",\"miki.hyogo.jp\",\"minamiawaji.hyogo.jp\",\"nishinomiya.hyogo.jp\",\"nishiwaki.hyogo.jp\",\"ono.hyogo.jp\",\"sanda.hyogo.jp\",\"sannan.hyogo.jp\",\"sasayama.hyogo.jp\",\"sayo.hyogo.jp\",\"shingu.hyogo.jp\",\"shinonsen.hyogo.jp\",\"shiso.hyogo.jp\",\"sumoto.hyogo.jp\",\"taishi.hyogo.jp\",\"taka.hyogo.jp\",\"takarazuka.hyogo.jp\",\"takasago.hyogo.jp\",\"takino.hyogo.jp\",\"tamba.hyogo.jp\",\"tatsuno.hyogo.jp\",\"toyooka.hyogo.jp\",\"yabu.hyogo.jp\",\"yashiro.hyogo.jp\",\"yoka.hyogo.jp\",\"yokawa.hyogo.jp\",\"ami.ibaraki.jp\",\"asahi.ibaraki.jp\",\"bando.ibaraki.jp\",\"chikusei.ibaraki.jp\",\"daigo.ibaraki.jp\",\"fujishiro.ibaraki.jp\",\"hitachi.ibaraki.jp\",\"hitachinaka.ibaraki.jp\",\"hitachiomiya.ibaraki.jp\",\"hitachiota.ibaraki.jp\",\"ibaraki.ibaraki.jp\",\"ina.ibaraki.jp\",\"inashiki.ibaraki.jp\",\"itako.ibaraki.jp\",\"iwama.ibaraki.jp\",\"joso.ibaraki.jp\",\"kamisu.ibaraki.jp\",\"kasama.ibaraki.jp\",\"kashima.ibaraki.jp\",\"kasumigaura.ibaraki.jp\",\"koga.ibaraki.jp\",\"miho.ibaraki.jp\",\"mito.ibaraki.jp\",\"moriya.ibaraki.jp\",\"naka.ibaraki.jp\",\"namegata.ibaraki.jp\",\"oarai.ibaraki.jp\",\"ogawa.ibaraki.jp\",\"omitama.ibaraki.jp\",\"ryugasaki.ibaraki.jp\",\"sakai.ibaraki.jp\",\"sakuragawa.ibaraki.jp\",\"shimodate.ibaraki.jp\",\"shimotsuma.ibaraki.jp\",\"shirosato.ibaraki.jp\",\"sowa.ibaraki.jp\",\"suifu.ibaraki.jp\",\"takahagi.ibaraki.jp\",\"tamatsukuri.ibaraki.jp\",\"tokai.ibaraki.jp\",\"tomobe.ibaraki.jp\",\"tone.ibaraki.jp\",\"toride.ibaraki.jp\",\"tsuchiura.ibaraki.jp\",\"tsukuba.ibaraki.jp\",\"uchihara.ibaraki.jp\",\"ushiku.ibaraki.jp\",\"yachiyo.ibaraki.jp\",\"yamagata.ibaraki.jp\",\"yawara.ibaraki.jp\",\"yuki.ibaraki.jp\",\"anamizu.ishikawa.jp\",\"hakui.ishikawa.jp\",\"hakusan.ishikawa.jp\",\"kaga.ishikawa.jp\",\"kahoku.ishikawa.jp\",\"kanazawa.ishikawa.jp\",\"kawakita.ishikawa.jp\",\"komatsu.ishikawa.jp\",\"nakanoto.ishikawa.jp\",\"nanao.ishikawa.jp\",\"nomi.ishikawa.jp\",\"nonoichi.ishikawa.jp\",\"noto.ishikawa.jp\",\"shika.ishikawa.jp\",\"suzu.ishikawa.jp\",\"tsubata.ishikawa.jp\",\"tsurugi.ishikawa.jp\",\"uchinada.ishikawa.jp\",\"wajima.ishikawa.jp\",\"fudai.iwate.jp\",\"fujisawa.iwate.jp\",\"hanamaki.iwate.jp\",\"hiraizumi.iwate.jp\",\"hirono.iwate.jp\",\"ichinohe.iwate.jp\",\"ichinoseki.iwate.jp\",\"iwaizumi.iwate.jp\",\"iwate.iwate.jp\",\"joboji.iwate.jp\",\"kamaishi.iwate.jp\",\"kanegasaki.iwate.jp\",\"karumai.iwate.jp\",\"kawai.iwate.jp\",\"kitakami.iwate.jp\",\"kuji.iwate.jp\",\"kunohe.iwate.jp\",\"kuzumaki.iwate.jp\",\"miyako.iwate.jp\",\"mizusawa.iwate.jp\",\"morioka.iwate.jp\",\"ninohe.iwate.jp\",\"noda.iwate.jp\",\"ofunato.iwate.jp\",\"oshu.iwate.jp\",\"otsuchi.iwate.jp\",\"rikuzentakata.iwate.jp\",\"shiwa.iwate.jp\",\"shizukuishi.iwate.jp\",\"sumita.iwate.jp\",\"tanohata.iwate.jp\",\"tono.iwate.jp\",\"yahaba.iwate.jp\",\"yamada.iwate.jp\",\"ayagawa.kagawa.jp\",\"higashikagawa.kagawa.jp\",\"kanonji.kagawa.jp\",\"kotohira.kagawa.jp\",\"manno.kagawa.jp\",\"marugame.kagawa.jp\",\"mitoyo.kagawa.jp\",\"naoshima.kagawa.jp\",\"sanuki.kagawa.jp\",\"tadotsu.kagawa.jp\",\"takamatsu.kagawa.jp\",\"tonosho.kagawa.jp\",\"uchinomi.kagawa.jp\",\"utazu.kagawa.jp\",\"zentsuji.kagawa.jp\",\"akune.kagoshima.jp\",\"amami.kagoshima.jp\",\"hioki.kagoshima.jp\",\"isa.kagoshima.jp\",\"isen.kagoshima.jp\",\"izumi.kagoshima.jp\",\"kagoshima.kagoshima.jp\",\"kanoya.kagoshima.jp\",\"kawanabe.kagoshima.jp\",\"kinko.kagoshima.jp\",\"kouyama.kagoshima.jp\",\"makurazaki.kagoshima.jp\",\"matsumoto.kagoshima.jp\",\"minamitane.kagoshima.jp\",\"nakatane.kagoshima.jp\",\"nishinoomote.kagoshima.jp\",\"satsumasendai.kagoshima.jp\",\"soo.kagoshima.jp\",\"tarumizu.kagoshima.jp\",\"yusui.kagoshima.jp\",\"aikawa.kanagawa.jp\",\"atsugi.kanagawa.jp\",\"ayase.kanagawa.jp\",\"chigasaki.kanagawa.jp\",\"ebina.kanagawa.jp\",\"fujisawa.kanagawa.jp\",\"hadano.kanagawa.jp\",\"hakone.kanagawa.jp\",\"hiratsuka.kanagawa.jp\",\"isehara.kanagawa.jp\",\"kaisei.kanagawa.jp\",\"kamakura.kanagawa.jp\",\"kiyokawa.kanagawa.jp\",\"matsuda.kanagawa.jp\",\"minamiashigara.kanagawa.jp\",\"miura.kanagawa.jp\",\"nakai.kanagawa.jp\",\"ninomiya.kanagawa.jp\",\"odawara.kanagawa.jp\",\"oi.kanagawa.jp\",\"oiso.kanagawa.jp\",\"sagamihara.kanagawa.jp\",\"samukawa.kanagawa.jp\",\"tsukui.kanagawa.jp\",\"yamakita.kanagawa.jp\",\"yamato.kanagawa.jp\",\"yokosuka.kanagawa.jp\",\"yugawara.kanagawa.jp\",\"zama.kanagawa.jp\",\"zushi.kanagawa.jp\",\"aki.kochi.jp\",\"geisei.kochi.jp\",\"hidaka.kochi.jp\",\"higashitsuno.kochi.jp\",\"ino.kochi.jp\",\"kagami.kochi.jp\",\"kami.kochi.jp\",\"kitagawa.kochi.jp\",\"kochi.kochi.jp\",\"mihara.kochi.jp\",\"motoyama.kochi.jp\",\"muroto.kochi.jp\",\"nahari.kochi.jp\",\"nakamura.kochi.jp\",\"nankoku.kochi.jp\",\"nishitosa.kochi.jp\",\"niyodogawa.kochi.jp\",\"ochi.kochi.jp\",\"okawa.kochi.jp\",\"otoyo.kochi.jp\",\"otsuki.kochi.jp\",\"sakawa.kochi.jp\",\"sukumo.kochi.jp\",\"susaki.kochi.jp\",\"tosa.kochi.jp\",\"tosashimizu.kochi.jp\",\"toyo.kochi.jp\",\"tsuno.kochi.jp\",\"umaji.kochi.jp\",\"yasuda.kochi.jp\",\"yusuhara.kochi.jp\",\"amakusa.kumamoto.jp\",\"arao.kumamoto.jp\",\"aso.kumamoto.jp\",\"choyo.kumamoto.jp\",\"gyokuto.kumamoto.jp\",\"kamiamakusa.kumamoto.jp\",\"kikuchi.kumamoto.jp\",\"kumamoto.kumamoto.jp\",\"mashiki.kumamoto.jp\",\"mifune.kumamoto.jp\",\"minamata.kumamoto.jp\",\"minamioguni.kumamoto.jp\",\"nagasu.kumamoto.jp\",\"nishihara.kumamoto.jp\",\"oguni.kumamoto.jp\",\"ozu.kumamoto.jp\",\"sumoto.kumamoto.jp\",\"takamori.kumamoto.jp\",\"uki.kumamoto.jp\",\"uto.kumamoto.jp\",\"yamaga.kumamoto.jp\",\"yamato.kumamoto.jp\",\"yatsushiro.kumamoto.jp\",\"ayabe.kyoto.jp\",\"fukuchiyama.kyoto.jp\",\"higashiyama.kyoto.jp\",\"ide.kyoto.jp\",\"ine.kyoto.jp\",\"joyo.kyoto.jp\",\"kameoka.kyoto.jp\",\"kamo.kyoto.jp\",\"kita.kyoto.jp\",\"kizu.kyoto.jp\",\"kumiyama.kyoto.jp\",\"kyotamba.kyoto.jp\",\"kyotanabe.kyoto.jp\",\"kyotango.kyoto.jp\",\"maizuru.kyoto.jp\",\"minami.kyoto.jp\",\"minamiyamashiro.kyoto.jp\",\"miyazu.kyoto.jp\",\"muko.kyoto.jp\",\"nagaokakyo.kyoto.jp\",\"nakagyo.kyoto.jp\",\"nantan.kyoto.jp\",\"oyamazaki.kyoto.jp\",\"sakyo.kyoto.jp\",\"seika.kyoto.jp\",\"tanabe.kyoto.jp\",\"uji.kyoto.jp\",\"ujitawara.kyoto.jp\",\"wazuka.kyoto.jp\",\"yamashina.kyoto.jp\",\"yawata.kyoto.jp\",\"asahi.mie.jp\",\"inabe.mie.jp\",\"ise.mie.jp\",\"kameyama.mie.jp\",\"kawagoe.mie.jp\",\"kiho.mie.jp\",\"kisosaki.mie.jp\",\"kiwa.mie.jp\",\"komono.mie.jp\",\"kumano.mie.jp\",\"kuwana.mie.jp\",\"matsusaka.mie.jp\",\"meiwa.mie.jp\",\"mihama.mie.jp\",\"minamiise.mie.jp\",\"misugi.mie.jp\",\"miyama.mie.jp\",\"nabari.mie.jp\",\"shima.mie.jp\",\"suzuka.mie.jp\",\"tado.mie.jp\",\"taiki.mie.jp\",\"taki.mie.jp\",\"tamaki.mie.jp\",\"toba.mie.jp\",\"tsu.mie.jp\",\"udono.mie.jp\",\"ureshino.mie.jp\",\"watarai.mie.jp\",\"yokkaichi.mie.jp\",\"furukawa.miyagi.jp\",\"higashimatsushima.miyagi.jp\",\"ishinomaki.miyagi.jp\",\"iwanuma.miyagi.jp\",\"kakuda.miyagi.jp\",\"kami.miyagi.jp\",\"kawasaki.miyagi.jp\",\"marumori.miyagi.jp\",\"matsushima.miyagi.jp\",\"minamisanriku.miyagi.jp\",\"misato.miyagi.jp\",\"murata.miyagi.jp\",\"natori.miyagi.jp\",\"ogawara.miyagi.jp\",\"ohira.miyagi.jp\",\"onagawa.miyagi.jp\",\"osaki.miyagi.jp\",\"rifu.miyagi.jp\",\"semine.miyagi.jp\",\"shibata.miyagi.jp\",\"shichikashuku.miyagi.jp\",\"shikama.miyagi.jp\",\"shiogama.miyagi.jp\",\"shiroishi.miyagi.jp\",\"tagajo.miyagi.jp\",\"taiwa.miyagi.jp\",\"tome.miyagi.jp\",\"tomiya.miyagi.jp\",\"wakuya.miyagi.jp\",\"watari.miyagi.jp\",\"yamamoto.miyagi.jp\",\"zao.miyagi.jp\",\"aya.miyazaki.jp\",\"ebino.miyazaki.jp\",\"gokase.miyazaki.jp\",\"hyuga.miyazaki.jp\",\"kadogawa.miyazaki.jp\",\"kawaminami.miyazaki.jp\",\"kijo.miyazaki.jp\",\"kitagawa.miyazaki.jp\",\"kitakata.miyazaki.jp\",\"kitaura.miyazaki.jp\",\"kobayashi.miyazaki.jp\",\"kunitomi.miyazaki.jp\",\"kushima.miyazaki.jp\",\"mimata.miyazaki.jp\",\"miyakonojo.miyazaki.jp\",\"miyazaki.miyazaki.jp\",\"morotsuka.miyazaki.jp\",\"nichinan.miyazaki.jp\",\"nishimera.miyazaki.jp\",\"nobeoka.miyazaki.jp\",\"saito.miyazaki.jp\",\"shiiba.miyazaki.jp\",\"shintomi.miyazaki.jp\",\"takaharu.miyazaki.jp\",\"takanabe.miyazaki.jp\",\"takazaki.miyazaki.jp\",\"tsuno.miyazaki.jp\",\"achi.nagano.jp\",\"agematsu.nagano.jp\",\"anan.nagano.jp\",\"aoki.nagano.jp\",\"asahi.nagano.jp\",\"azumino.nagano.jp\",\"chikuhoku.nagano.jp\",\"chikuma.nagano.jp\",\"chino.nagano.jp\",\"fujimi.nagano.jp\",\"hakuba.nagano.jp\",\"hara.nagano.jp\",\"hiraya.nagano.jp\",\"iida.nagano.jp\",\"iijima.nagano.jp\",\"iiyama.nagano.jp\",\"iizuna.nagano.jp\",\"ikeda.nagano.jp\",\"ikusaka.nagano.jp\",\"ina.nagano.jp\",\"karuizawa.nagano.jp\",\"kawakami.nagano.jp\",\"kiso.nagano.jp\",\"kisofukushima.nagano.jp\",\"kitaaiki.nagano.jp\",\"komagane.nagano.jp\",\"komoro.nagano.jp\",\"matsukawa.nagano.jp\",\"matsumoto.nagano.jp\",\"miasa.nagano.jp\",\"minamiaiki.nagano.jp\",\"minamimaki.nagano.jp\",\"minamiminowa.nagano.jp\",\"minowa.nagano.jp\",\"miyada.nagano.jp\",\"miyota.nagano.jp\",\"mochizuki.nagano.jp\",\"nagano.nagano.jp\",\"nagawa.nagano.jp\",\"nagiso.nagano.jp\",\"nakagawa.nagano.jp\",\"nakano.nagano.jp\",\"nozawaonsen.nagano.jp\",\"obuse.nagano.jp\",\"ogawa.nagano.jp\",\"okaya.nagano.jp\",\"omachi.nagano.jp\",\"omi.nagano.jp\",\"ookuwa.nagano.jp\",\"ooshika.nagano.jp\",\"otaki.nagano.jp\",\"otari.nagano.jp\",\"sakae.nagano.jp\",\"sakaki.nagano.jp\",\"saku.nagano.jp\",\"sakuho.nagano.jp\",\"shimosuwa.nagano.jp\",\"shinanomachi.nagano.jp\",\"shiojiri.nagano.jp\",\"suwa.nagano.jp\",\"suzaka.nagano.jp\",\"takagi.nagano.jp\",\"takamori.nagano.jp\",\"takayama.nagano.jp\",\"tateshina.nagano.jp\",\"tatsuno.nagano.jp\",\"togakushi.nagano.jp\",\"togura.nagano.jp\",\"tomi.nagano.jp\",\"ueda.nagano.jp\",\"wada.nagano.jp\",\"yamagata.nagano.jp\",\"yamanouchi.nagano.jp\",\"yasaka.nagano.jp\",\"yasuoka.nagano.jp\",\"chijiwa.nagasaki.jp\",\"futsu.nagasaki.jp\",\"goto.nagasaki.jp\",\"hasami.nagasaki.jp\",\"hirado.nagasaki.jp\",\"iki.nagasaki.jp\",\"isahaya.nagasaki.jp\",\"kawatana.nagasaki.jp\",\"kuchinotsu.nagasaki.jp\",\"matsuura.nagasaki.jp\",\"nagasaki.nagasaki.jp\",\"obama.nagasaki.jp\",\"omura.nagasaki.jp\",\"oseto.nagasaki.jp\",\"saikai.nagasaki.jp\",\"sasebo.nagasaki.jp\",\"seihi.nagasaki.jp\",\"shimabara.nagasaki.jp\",\"shinkamigoto.nagasaki.jp\",\"togitsu.nagasaki.jp\",\"tsushima.nagasaki.jp\",\"unzen.nagasaki.jp\",\"ando.nara.jp\",\"gose.nara.jp\",\"heguri.nara.jp\",\"higashiyoshino.nara.jp\",\"ikaruga.nara.jp\",\"ikoma.nara.jp\",\"kamikitayama.nara.jp\",\"kanmaki.nara.jp\",\"kashiba.nara.jp\",\"kashihara.nara.jp\",\"katsuragi.nara.jp\",\"kawai.nara.jp\",\"kawakami.nara.jp\",\"kawanishi.nara.jp\",\"koryo.nara.jp\",\"kurotaki.nara.jp\",\"mitsue.nara.jp\",\"miyake.nara.jp\",\"nara.nara.jp\",\"nosegawa.nara.jp\",\"oji.nara.jp\",\"ouda.nara.jp\",\"oyodo.nara.jp\",\"sakurai.nara.jp\",\"sango.nara.jp\",\"shimoichi.nara.jp\",\"shimokitayama.nara.jp\",\"shinjo.nara.jp\",\"soni.nara.jp\",\"takatori.nara.jp\",\"tawaramoto.nara.jp\",\"tenkawa.nara.jp\",\"tenri.nara.jp\",\"uda.nara.jp\",\"yamatokoriyama.nara.jp\",\"yamatotakada.nara.jp\",\"yamazoe.nara.jp\",\"yoshino.nara.jp\",\"aga.niigata.jp\",\"agano.niigata.jp\",\"gosen.niigata.jp\",\"itoigawa.niigata.jp\",\"izumozaki.niigata.jp\",\"joetsu.niigata.jp\",\"kamo.niigata.jp\",\"kariwa.niigata.jp\",\"kashiwazaki.niigata.jp\",\"minamiuonuma.niigata.jp\",\"mitsuke.niigata.jp\",\"muika.niigata.jp\",\"murakami.niigata.jp\",\"myoko.niigata.jp\",\"nagaoka.niigata.jp\",\"niigata.niigata.jp\",\"ojiya.niigata.jp\",\"omi.niigata.jp\",\"sado.niigata.jp\",\"sanjo.niigata.jp\",\"seiro.niigata.jp\",\"seirou.niigata.jp\",\"sekikawa.niigata.jp\",\"shibata.niigata.jp\",\"tagami.niigata.jp\",\"tainai.niigata.jp\",\"tochio.niigata.jp\",\"tokamachi.niigata.jp\",\"tsubame.niigata.jp\",\"tsunan.niigata.jp\",\"uonuma.niigata.jp\",\"yahiko.niigata.jp\",\"yoita.niigata.jp\",\"yuzawa.niigata.jp\",\"beppu.oita.jp\",\"bungoono.oita.jp\",\"bungotakada.oita.jp\",\"hasama.oita.jp\",\"hiji.oita.jp\",\"himeshima.oita.jp\",\"hita.oita.jp\",\"kamitsue.oita.jp\",\"kokonoe.oita.jp\",\"kuju.oita.jp\",\"kunisaki.oita.jp\",\"kusu.oita.jp\",\"oita.oita.jp\",\"saiki.oita.jp\",\"taketa.oita.jp\",\"tsukumi.oita.jp\",\"usa.oita.jp\",\"usuki.oita.jp\",\"yufu.oita.jp\",\"akaiwa.okayama.jp\",\"asakuchi.okayama.jp\",\"bizen.okayama.jp\",\"hayashima.okayama.jp\",\"ibara.okayama.jp\",\"kagamino.okayama.jp\",\"kasaoka.okayama.jp\",\"kibichuo.okayama.jp\",\"kumenan.okayama.jp\",\"kurashiki.okayama.jp\",\"maniwa.okayama.jp\",\"misaki.okayama.jp\",\"nagi.okayama.jp\",\"niimi.okayama.jp\",\"nishiawakura.okayama.jp\",\"okayama.okayama.jp\",\"satosho.okayama.jp\",\"setouchi.okayama.jp\",\"shinjo.okayama.jp\",\"shoo.okayama.jp\",\"soja.okayama.jp\",\"takahashi.okayama.jp\",\"tamano.okayama.jp\",\"tsuyama.okayama.jp\",\"wake.okayama.jp\",\"yakage.okayama.jp\",\"aguni.okinawa.jp\",\"ginowan.okinawa.jp\",\"ginoza.okinawa.jp\",\"gushikami.okinawa.jp\",\"haebaru.okinawa.jp\",\"higashi.okinawa.jp\",\"hirara.okinawa.jp\",\"iheya.okinawa.jp\",\"ishigaki.okinawa.jp\",\"ishikawa.okinawa.jp\",\"itoman.okinawa.jp\",\"izena.okinawa.jp\",\"kadena.okinawa.jp\",\"kin.okinawa.jp\",\"kitadaito.okinawa.jp\",\"kitanakagusuku.okinawa.jp\",\"kumejima.okinawa.jp\",\"kunigami.okinawa.jp\",\"minamidaito.okinawa.jp\",\"motobu.okinawa.jp\",\"nago.okinawa.jp\",\"naha.okinawa.jp\",\"nakagusuku.okinawa.jp\",\"nakijin.okinawa.jp\",\"nanjo.okinawa.jp\",\"nishihara.okinawa.jp\",\"ogimi.okinawa.jp\",\"okinawa.okinawa.jp\",\"onna.okinawa.jp\",\"shimoji.okinawa.jp\",\"taketomi.okinawa.jp\",\"tarama.okinawa.jp\",\"tokashiki.okinawa.jp\",\"tomigusuku.okinawa.jp\",\"tonaki.okinawa.jp\",\"urasoe.okinawa.jp\",\"uruma.okinawa.jp\",\"yaese.okinawa.jp\",\"yomitan.okinawa.jp\",\"yonabaru.okinawa.jp\",\"yonaguni.okinawa.jp\",\"zamami.okinawa.jp\",\"abeno.osaka.jp\",\"chihayaakasaka.osaka.jp\",\"chuo.osaka.jp\",\"daito.osaka.jp\",\"fujiidera.osaka.jp\",\"habikino.osaka.jp\",\"hannan.osaka.jp\",\"higashiosaka.osaka.jp\",\"higashisumiyoshi.osaka.jp\",\"higashiyodogawa.osaka.jp\",\"hirakata.osaka.jp\",\"ibaraki.osaka.jp\",\"ikeda.osaka.jp\",\"izumi.osaka.jp\",\"izumiotsu.osaka.jp\",\"izumisano.osaka.jp\",\"kadoma.osaka.jp\",\"kaizuka.osaka.jp\",\"kanan.osaka.jp\",\"kashiwara.osaka.jp\",\"katano.osaka.jp\",\"kawachinagano.osaka.jp\",\"kishiwada.osaka.jp\",\"kita.osaka.jp\",\"kumatori.osaka.jp\",\"matsubara.osaka.jp\",\"minato.osaka.jp\",\"minoh.osaka.jp\",\"misaki.osaka.jp\",\"moriguchi.osaka.jp\",\"neyagawa.osaka.jp\",\"nishi.osaka.jp\",\"nose.osaka.jp\",\"osakasayama.osaka.jp\",\"sakai.osaka.jp\",\"sayama.osaka.jp\",\"sennan.osaka.jp\",\"settsu.osaka.jp\",\"shijonawate.osaka.jp\",\"shimamoto.osaka.jp\",\"suita.osaka.jp\",\"tadaoka.osaka.jp\",\"taishi.osaka.jp\",\"tajiri.osaka.jp\",\"takaishi.osaka.jp\",\"takatsuki.osaka.jp\",\"tondabayashi.osaka.jp\",\"toyonaka.osaka.jp\",\"toyono.osaka.jp\",\"yao.osaka.jp\",\"ariake.saga.jp\",\"arita.saga.jp\",\"fukudomi.saga.jp\",\"genkai.saga.jp\",\"hamatama.saga.jp\",\"hizen.saga.jp\",\"imari.saga.jp\",\"kamimine.saga.jp\",\"kanzaki.saga.jp\",\"karatsu.saga.jp\",\"kashima.saga.jp\",\"kitagata.saga.jp\",\"kitahata.saga.jp\",\"kiyama.saga.jp\",\"kouhoku.saga.jp\",\"kyuragi.saga.jp\",\"nishiarita.saga.jp\",\"ogi.saga.jp\",\"omachi.saga.jp\",\"ouchi.saga.jp\",\"saga.saga.jp\",\"shiroishi.saga.jp\",\"taku.saga.jp\",\"tara.saga.jp\",\"tosu.saga.jp\",\"yoshinogari.saga.jp\",\"arakawa.saitama.jp\",\"asaka.saitama.jp\",\"chichibu.saitama.jp\",\"fujimi.saitama.jp\",\"fujimino.saitama.jp\",\"fukaya.saitama.jp\",\"hanno.saitama.jp\",\"hanyu.saitama.jp\",\"hasuda.saitama.jp\",\"hatogaya.saitama.jp\",\"hatoyama.saitama.jp\",\"hidaka.saitama.jp\",\"higashichichibu.saitama.jp\",\"higashimatsuyama.saitama.jp\",\"honjo.saitama.jp\",\"ina.saitama.jp\",\"iruma.saitama.jp\",\"iwatsuki.saitama.jp\",\"kamiizumi.saitama.jp\",\"kamikawa.saitama.jp\",\"kamisato.saitama.jp\",\"kasukabe.saitama.jp\",\"kawagoe.saitama.jp\",\"kawaguchi.saitama.jp\",\"kawajima.saitama.jp\",\"kazo.saitama.jp\",\"kitamoto.saitama.jp\",\"koshigaya.saitama.jp\",\"kounosu.saitama.jp\",\"kuki.saitama.jp\",\"kumagaya.saitama.jp\",\"matsubushi.saitama.jp\",\"minano.saitama.jp\",\"misato.saitama.jp\",\"miyashiro.saitama.jp\",\"miyoshi.saitama.jp\",\"moroyama.saitama.jp\",\"nagatoro.saitama.jp\",\"namegawa.saitama.jp\",\"niiza.saitama.jp\",\"ogano.saitama.jp\",\"ogawa.saitama.jp\",\"ogose.saitama.jp\",\"okegawa.saitama.jp\",\"omiya.saitama.jp\",\"otaki.saitama.jp\",\"ranzan.saitama.jp\",\"ryokami.saitama.jp\",\"saitama.saitama.jp\",\"sakado.saitama.jp\",\"satte.saitama.jp\",\"sayama.saitama.jp\",\"shiki.saitama.jp\",\"shiraoka.saitama.jp\",\"soka.saitama.jp\",\"sugito.saitama.jp\",\"toda.saitama.jp\",\"tokigawa.saitama.jp\",\"tokorozawa.saitama.jp\",\"tsurugashima.saitama.jp\",\"urawa.saitama.jp\",\"warabi.saitama.jp\",\"yashio.saitama.jp\",\"yokoze.saitama.jp\",\"yono.saitama.jp\",\"yorii.saitama.jp\",\"yoshida.saitama.jp\",\"yoshikawa.saitama.jp\",\"yoshimi.saitama.jp\",\"aisho.shiga.jp\",\"gamo.shiga.jp\",\"higashiomi.shiga.jp\",\"hikone.shiga.jp\",\"koka.shiga.jp\",\"konan.shiga.jp\",\"kosei.shiga.jp\",\"koto.shiga.jp\",\"kusatsu.shiga.jp\",\"maibara.shiga.jp\",\"moriyama.shiga.jp\",\"nagahama.shiga.jp\",\"nishiazai.shiga.jp\",\"notogawa.shiga.jp\",\"omihachiman.shiga.jp\",\"otsu.shiga.jp\",\"ritto.shiga.jp\",\"ryuoh.shiga.jp\",\"takashima.shiga.jp\",\"takatsuki.shiga.jp\",\"torahime.shiga.jp\",\"toyosato.shiga.jp\",\"yasu.shiga.jp\",\"akagi.shimane.jp\",\"ama.shimane.jp\",\"gotsu.shimane.jp\",\"hamada.shimane.jp\",\"higashiizumo.shimane.jp\",\"hikawa.shimane.jp\",\"hikimi.shimane.jp\",\"izumo.shimane.jp\",\"kakinoki.shimane.jp\",\"masuda.shimane.jp\",\"matsue.shimane.jp\",\"misato.shimane.jp\",\"nishinoshima.shimane.jp\",\"ohda.shimane.jp\",\"okinoshima.shimane.jp\",\"okuizumo.shimane.jp\",\"shimane.shimane.jp\",\"tamayu.shimane.jp\",\"tsuwano.shimane.jp\",\"unnan.shimane.jp\",\"yakumo.shimane.jp\",\"yasugi.shimane.jp\",\"yatsuka.shimane.jp\",\"arai.shizuoka.jp\",\"atami.shizuoka.jp\",\"fuji.shizuoka.jp\",\"fujieda.shizuoka.jp\",\"fujikawa.shizuoka.jp\",\"fujinomiya.shizuoka.jp\",\"fukuroi.shizuoka.jp\",\"gotemba.shizuoka.jp\",\"haibara.shizuoka.jp\",\"hamamatsu.shizuoka.jp\",\"higashiizu.shizuoka.jp\",\"ito.shizuoka.jp\",\"iwata.shizuoka.jp\",\"izu.shizuoka.jp\",\"izunokuni.shizuoka.jp\",\"kakegawa.shizuoka.jp\",\"kannami.shizuoka.jp\",\"kawanehon.shizuoka.jp\",\"kawazu.shizuoka.jp\",\"kikugawa.shizuoka.jp\",\"kosai.shizuoka.jp\",\"makinohara.shizuoka.jp\",\"matsuzaki.shizuoka.jp\",\"minamiizu.shizuoka.jp\",\"mishima.shizuoka.jp\",\"morimachi.shizuoka.jp\",\"nishiizu.shizuoka.jp\",\"numazu.shizuoka.jp\",\"omaezaki.shizuoka.jp\",\"shimada.shizuoka.jp\",\"shimizu.shizuoka.jp\",\"shimoda.shizuoka.jp\",\"shizuoka.shizuoka.jp\",\"susono.shizuoka.jp\",\"yaizu.shizuoka.jp\",\"yoshida.shizuoka.jp\",\"ashikaga.tochigi.jp\",\"bato.tochigi.jp\",\"haga.tochigi.jp\",\"ichikai.tochigi.jp\",\"iwafune.tochigi.jp\",\"kaminokawa.tochigi.jp\",\"kanuma.tochigi.jp\",\"karasuyama.tochigi.jp\",\"kuroiso.tochigi.jp\",\"mashiko.tochigi.jp\",\"mibu.tochigi.jp\",\"moka.tochigi.jp\",\"motegi.tochigi.jp\",\"nasu.tochigi.jp\",\"nasushiobara.tochigi.jp\",\"nikko.tochigi.jp\",\"nishikata.tochigi.jp\",\"nogi.tochigi.jp\",\"ohira.tochigi.jp\",\"ohtawara.tochigi.jp\",\"oyama.tochigi.jp\",\"sakura.tochigi.jp\",\"sano.tochigi.jp\",\"shimotsuke.tochigi.jp\",\"shioya.tochigi.jp\",\"takanezawa.tochigi.jp\",\"tochigi.tochigi.jp\",\"tsuga.tochigi.jp\",\"ujiie.tochigi.jp\",\"utsunomiya.tochigi.jp\",\"yaita.tochigi.jp\",\"aizumi.tokushima.jp\",\"anan.tokushima.jp\",\"ichiba.tokushima.jp\",\"itano.tokushima.jp\",\"kainan.tokushima.jp\",\"komatsushima.tokushima.jp\",\"matsushige.tokushima.jp\",\"mima.tokushima.jp\",\"minami.tokushima.jp\",\"miyoshi.tokushima.jp\",\"mugi.tokushima.jp\",\"nakagawa.tokushima.jp\",\"naruto.tokushima.jp\",\"sanagochi.tokushima.jp\",\"shishikui.tokushima.jp\",\"tokushima.tokushima.jp\",\"wajiki.tokushima.jp\",\"adachi.tokyo.jp\",\"akiruno.tokyo.jp\",\"akishima.tokyo.jp\",\"aogashima.tokyo.jp\",\"arakawa.tokyo.jp\",\"bunkyo.tokyo.jp\",\"chiyoda.tokyo.jp\",\"chofu.tokyo.jp\",\"chuo.tokyo.jp\",\"edogawa.tokyo.jp\",\"fuchu.tokyo.jp\",\"fussa.tokyo.jp\",\"hachijo.tokyo.jp\",\"hachioji.tokyo.jp\",\"hamura.tokyo.jp\",\"higashikurume.tokyo.jp\",\"higashimurayama.tokyo.jp\",\"higashiyamato.tokyo.jp\",\"hino.tokyo.jp\",\"hinode.tokyo.jp\",\"hinohara.tokyo.jp\",\"inagi.tokyo.jp\",\"itabashi.tokyo.jp\",\"katsushika.tokyo.jp\",\"kita.tokyo.jp\",\"kiyose.tokyo.jp\",\"kodaira.tokyo.jp\",\"koganei.tokyo.jp\",\"kokubunji.tokyo.jp\",\"komae.tokyo.jp\",\"koto.tokyo.jp\",\"kouzushima.tokyo.jp\",\"kunitachi.tokyo.jp\",\"machida.tokyo.jp\",\"meguro.tokyo.jp\",\"minato.tokyo.jp\",\"mitaka.tokyo.jp\",\"mizuho.tokyo.jp\",\"musashimurayama.tokyo.jp\",\"musashino.tokyo.jp\",\"nakano.tokyo.jp\",\"nerima.tokyo.jp\",\"ogasawara.tokyo.jp\",\"okutama.tokyo.jp\",\"ome.tokyo.jp\",\"oshima.tokyo.jp\",\"ota.tokyo.jp\",\"setagaya.tokyo.jp\",\"shibuya.tokyo.jp\",\"shinagawa.tokyo.jp\",\"shinjuku.tokyo.jp\",\"suginami.tokyo.jp\",\"sumida.tokyo.jp\",\"tachikawa.tokyo.jp\",\"taito.tokyo.jp\",\"tama.tokyo.jp\",\"toshima.tokyo.jp\",\"chizu.tottori.jp\",\"hino.tottori.jp\",\"kawahara.tottori.jp\",\"koge.tottori.jp\",\"kotoura.tottori.jp\",\"misasa.tottori.jp\",\"nanbu.tottori.jp\",\"nichinan.tottori.jp\",\"sakaiminato.tottori.jp\",\"tottori.tottori.jp\",\"wakasa.tottori.jp\",\"yazu.tottori.jp\",\"yonago.tottori.jp\",\"asahi.toyama.jp\",\"fuchu.toyama.jp\",\"fukumitsu.toyama.jp\",\"funahashi.toyama.jp\",\"himi.toyama.jp\",\"imizu.toyama.jp\",\"inami.toyama.jp\",\"johana.toyama.jp\",\"kamiichi.toyama.jp\",\"kurobe.toyama.jp\",\"nakaniikawa.toyama.jp\",\"namerikawa.toyama.jp\",\"nanto.toyama.jp\",\"nyuzen.toyama.jp\",\"oyabe.toyama.jp\",\"taira.toyama.jp\",\"takaoka.toyama.jp\",\"tateyama.toyama.jp\",\"toga.toyama.jp\",\"tonami.toyama.jp\",\"toyama.toyama.jp\",\"unazuki.toyama.jp\",\"uozu.toyama.jp\",\"yamada.toyama.jp\",\"arida.wakayama.jp\",\"aridagawa.wakayama.jp\",\"gobo.wakayama.jp\",\"hashimoto.wakayama.jp\",\"hidaka.wakayama.jp\",\"hirogawa.wakayama.jp\",\"inami.wakayama.jp\",\"iwade.wakayama.jp\",\"kainan.wakayama.jp\",\"kamitonda.wakayama.jp\",\"katsuragi.wakayama.jp\",\"kimino.wakayama.jp\",\"kinokawa.wakayama.jp\",\"kitayama.wakayama.jp\",\"koya.wakayama.jp\",\"koza.wakayama.jp\",\"kozagawa.wakayama.jp\",\"kudoyama.wakayama.jp\",\"kushimoto.wakayama.jp\",\"mihama.wakayama.jp\",\"misato.wakayama.jp\",\"nachikatsuura.wakayama.jp\",\"shingu.wakayama.jp\",\"shirahama.wakayama.jp\",\"taiji.wakayama.jp\",\"tanabe.wakayama.jp\",\"wakayama.wakayama.jp\",\"yuasa.wakayama.jp\",\"yura.wakayama.jp\",\"asahi.yamagata.jp\",\"funagata.yamagata.jp\",\"higashine.yamagata.jp\",\"iide.yamagata.jp\",\"kahoku.yamagata.jp\",\"kaminoyama.yamagata.jp\",\"kaneyama.yamagata.jp\",\"kawanishi.yamagata.jp\",\"mamurogawa.yamagata.jp\",\"mikawa.yamagata.jp\",\"murayama.yamagata.jp\",\"nagai.yamagata.jp\",\"nakayama.yamagata.jp\",\"nanyo.yamagata.jp\",\"nishikawa.yamagata.jp\",\"obanazawa.yamagata.jp\",\"oe.yamagata.jp\",\"oguni.yamagata.jp\",\"ohkura.yamagata.jp\",\"oishida.yamagata.jp\",\"sagae.yamagata.jp\",\"sakata.yamagata.jp\",\"sakegawa.yamagata.jp\",\"shinjo.yamagata.jp\",\"shirataka.yamagata.jp\",\"shonai.yamagata.jp\",\"takahata.yamagata.jp\",\"tendo.yamagata.jp\",\"tozawa.yamagata.jp\",\"tsuruoka.yamagata.jp\",\"yamagata.yamagata.jp\",\"yamanobe.yamagata.jp\",\"yonezawa.yamagata.jp\",\"yuza.yamagata.jp\",\"abu.yamaguchi.jp\",\"hagi.yamaguchi.jp\",\"hikari.yamaguchi.jp\",\"hofu.yamaguchi.jp\",\"iwakuni.yamaguchi.jp\",\"kudamatsu.yamaguchi.jp\",\"mitou.yamaguchi.jp\",\"nagato.yamaguchi.jp\",\"oshima.yamaguchi.jp\",\"shimonoseki.yamaguchi.jp\",\"shunan.yamaguchi.jp\",\"tabuse.yamaguchi.jp\",\"tokuyama.yamaguchi.jp\",\"toyota.yamaguchi.jp\",\"ube.yamaguchi.jp\",\"yuu.yamaguchi.jp\",\"chuo.yamanashi.jp\",\"doshi.yamanashi.jp\",\"fuefuki.yamanashi.jp\",\"fujikawa.yamanashi.jp\",\"fujikawaguchiko.yamanashi.jp\",\"fujiyoshida.yamanashi.jp\",\"hayakawa.yamanashi.jp\",\"hokuto.yamanashi.jp\",\"ichikawamisato.yamanashi.jp\",\"kai.yamanashi.jp\",\"kofu.yamanashi.jp\",\"koshu.yamanashi.jp\",\"kosuge.yamanashi.jp\",\"minami-alps.yamanashi.jp\",\"minobu.yamanashi.jp\",\"nakamichi.yamanashi.jp\",\"nanbu.yamanashi.jp\",\"narusawa.yamanashi.jp\",\"nirasaki.yamanashi.jp\",\"nishikatsura.yamanashi.jp\",\"oshino.yamanashi.jp\",\"otsuki.yamanashi.jp\",\"showa.yamanashi.jp\",\"tabayama.yamanashi.jp\",\"tsuru.yamanashi.jp\",\"uenohara.yamanashi.jp\",\"yamanakako.yamanashi.jp\",\"yamanashi.yamanashi.jp\",\"ke\",\"ac.ke\",\"co.ke\",\"go.ke\",\"info.ke\",\"me.ke\",\"mobi.ke\",\"ne.ke\",\"or.ke\",\"sc.ke\",\"kg\",\"org.kg\",\"net.kg\",\"com.kg\",\"edu.kg\",\"gov.kg\",\"mil.kg\",\"*.kh\",\"ki\",\"edu.ki\",\"biz.ki\",\"net.ki\",\"org.ki\",\"gov.ki\",\"info.ki\",\"com.ki\",\"km\",\"org.km\",\"nom.km\",\"gov.km\",\"prd.km\",\"tm.km\",\"edu.km\",\"mil.km\",\"ass.km\",\"com.km\",\"coop.km\",\"asso.km\",\"presse.km\",\"medecin.km\",\"notaires.km\",\"pharmaciens.km\",\"veterinaire.km\",\"gouv.km\",\"kn\",\"net.kn\",\"org.kn\",\"edu.kn\",\"gov.kn\",\"kp\",\"com.kp\",\"edu.kp\",\"gov.kp\",\"org.kp\",\"rep.kp\",\"tra.kp\",\"kr\",\"ac.kr\",\"co.kr\",\"es.kr\",\"go.kr\",\"hs.kr\",\"kg.kr\",\"mil.kr\",\"ms.kr\",\"ne.kr\",\"or.kr\",\"pe.kr\",\"re.kr\",\"sc.kr\",\"busan.kr\",\"chungbuk.kr\",\"chungnam.kr\",\"daegu.kr\",\"daejeon.kr\",\"gangwon.kr\",\"gwangju.kr\",\"gyeongbuk.kr\",\"gyeonggi.kr\",\"gyeongnam.kr\",\"incheon.kr\",\"jeju.kr\",\"jeonbuk.kr\",\"jeonnam.kr\",\"seoul.kr\",\"ulsan.kr\",\"kw\",\"com.kw\",\"edu.kw\",\"emb.kw\",\"gov.kw\",\"ind.kw\",\"net.kw\",\"org.kw\",\"ky\",\"edu.ky\",\"gov.ky\",\"com.ky\",\"org.ky\",\"net.ky\",\"kz\",\"org.kz\",\"edu.kz\",\"net.kz\",\"gov.kz\",\"mil.kz\",\"com.kz\",\"la\",\"int.la\",\"net.la\",\"info.la\",\"edu.la\",\"gov.la\",\"per.la\",\"com.la\",\"org.la\",\"lb\",\"com.lb\",\"edu.lb\",\"gov.lb\",\"net.lb\",\"org.lb\",\"lc\",\"com.lc\",\"net.lc\",\"co.lc\",\"org.lc\",\"edu.lc\",\"gov.lc\",\"li\",\"lk\",\"gov.lk\",\"sch.lk\",\"net.lk\",\"int.lk\",\"com.lk\",\"org.lk\",\"edu.lk\",\"ngo.lk\",\"soc.lk\",\"web.lk\",\"ltd.lk\",\"assn.lk\",\"grp.lk\",\"hotel.lk\",\"ac.lk\",\"lr\",\"com.lr\",\"edu.lr\",\"gov.lr\",\"org.lr\",\"net.lr\",\"ls\",\"ac.ls\",\"biz.ls\",\"co.ls\",\"edu.ls\",\"gov.ls\",\"info.ls\",\"net.ls\",\"org.ls\",\"sc.ls\",\"lt\",\"gov.lt\",\"lu\",\"lv\",\"com.lv\",\"edu.lv\",\"gov.lv\",\"org.lv\",\"mil.lv\",\"id.lv\",\"net.lv\",\"asn.lv\",\"conf.lv\",\"ly\",\"com.ly\",\"net.ly\",\"gov.ly\",\"plc.ly\",\"edu.ly\",\"sch.ly\",\"med.ly\",\"org.ly\",\"id.ly\",\"ma\",\"co.ma\",\"net.ma\",\"gov.ma\",\"org.ma\",\"ac.ma\",\"press.ma\",\"mc\",\"tm.mc\",\"asso.mc\",\"md\",\"me\",\"co.me\",\"net.me\",\"org.me\",\"edu.me\",\"ac.me\",\"gov.me\",\"its.me\",\"priv.me\",\"mg\",\"org.mg\",\"nom.mg\",\"gov.mg\",\"prd.mg\",\"tm.mg\",\"edu.mg\",\"mil.mg\",\"com.mg\",\"co.mg\",\"mh\",\"mil\",\"mk\",\"com.mk\",\"org.mk\",\"net.mk\",\"edu.mk\",\"gov.mk\",\"inf.mk\",\"name.mk\",\"ml\",\"com.ml\",\"edu.ml\",\"gouv.ml\",\"gov.ml\",\"net.ml\",\"org.ml\",\"presse.ml\",\"*.mm\",\"mn\",\"gov.mn\",\"edu.mn\",\"org.mn\",\"mo\",\"com.mo\",\"net.mo\",\"org.mo\",\"edu.mo\",\"gov.mo\",\"mobi\",\"mp\",\"mq\",\"mr\",\"gov.mr\",\"ms\",\"com.ms\",\"edu.ms\",\"gov.ms\",\"net.ms\",\"org.ms\",\"mt\",\"com.mt\",\"edu.mt\",\"net.mt\",\"org.mt\",\"mu\",\"com.mu\",\"net.mu\",\"org.mu\",\"gov.mu\",\"ac.mu\",\"co.mu\",\"or.mu\",\"museum\",\"academy.museum\",\"agriculture.museum\",\"air.museum\",\"airguard.museum\",\"alabama.museum\",\"alaska.museum\",\"amber.museum\",\"ambulance.museum\",\"american.museum\",\"americana.museum\",\"americanantiques.museum\",\"americanart.museum\",\"amsterdam.museum\",\"and.museum\",\"annefrank.museum\",\"anthro.museum\",\"anthropology.museum\",\"antiques.museum\",\"aquarium.museum\",\"arboretum.museum\",\"archaeological.museum\",\"archaeology.museum\",\"architecture.museum\",\"art.museum\",\"artanddesign.museum\",\"artcenter.museum\",\"artdeco.museum\",\"arteducation.museum\",\"artgallery.museum\",\"arts.museum\",\"artsandcrafts.museum\",\"asmatart.museum\",\"assassination.museum\",\"assisi.museum\",\"association.museum\",\"astronomy.museum\",\"atlanta.museum\",\"austin.museum\",\"australia.museum\",\"automotive.museum\",\"aviation.museum\",\"axis.museum\",\"badajoz.museum\",\"baghdad.museum\",\"bahn.museum\",\"bale.museum\",\"baltimore.museum\",\"barcelona.museum\",\"baseball.museum\",\"basel.museum\",\"baths.museum\",\"bauern.museum\",\"beauxarts.museum\",\"beeldengeluid.museum\",\"bellevue.museum\",\"bergbau.museum\",\"berkeley.museum\",\"berlin.museum\",\"bern.museum\",\"bible.museum\",\"bilbao.museum\",\"bill.museum\",\"birdart.museum\",\"birthplace.museum\",\"bonn.museum\",\"boston.museum\",\"botanical.museum\",\"botanicalgarden.museum\",\"botanicgarden.museum\",\"botany.museum\",\"brandywinevalley.museum\",\"brasil.museum\",\"bristol.museum\",\"british.museum\",\"britishcolumbia.museum\",\"broadcast.museum\",\"brunel.museum\",\"brussel.museum\",\"brussels.museum\",\"bruxelles.museum\",\"building.museum\",\"burghof.museum\",\"bus.museum\",\"bushey.museum\",\"cadaques.museum\",\"california.museum\",\"cambridge.museum\",\"can.museum\",\"canada.museum\",\"capebreton.museum\",\"carrier.museum\",\"cartoonart.museum\",\"casadelamoneda.museum\",\"castle.museum\",\"castres.museum\",\"celtic.museum\",\"center.museum\",\"chattanooga.museum\",\"cheltenham.museum\",\"chesapeakebay.museum\",\"chicago.museum\",\"children.museum\",\"childrens.museum\",\"childrensgarden.museum\",\"chiropractic.museum\",\"chocolate.museum\",\"christiansburg.museum\",\"cincinnati.museum\",\"cinema.museum\",\"circus.museum\",\"civilisation.museum\",\"civilization.museum\",\"civilwar.museum\",\"clinton.museum\",\"clock.museum\",\"coal.museum\",\"coastaldefence.museum\",\"cody.museum\",\"coldwar.museum\",\"collection.museum\",\"colonialwilliamsburg.museum\",\"coloradoplateau.museum\",\"columbia.museum\",\"columbus.museum\",\"communication.museum\",\"communications.museum\",\"community.museum\",\"computer.museum\",\"computerhistory.museum\",\"comunicações.museum\",\"contemporary.museum\",\"contemporaryart.museum\",\"convent.museum\",\"copenhagen.museum\",\"corporation.museum\",\"correios-e-telecomunicações.museum\",\"corvette.museum\",\"costume.museum\",\"countryestate.museum\",\"county.museum\",\"crafts.museum\",\"cranbrook.museum\",\"creation.museum\",\"cultural.museum\",\"culturalcenter.museum\",\"culture.museum\",\"cyber.museum\",\"cymru.museum\",\"dali.museum\",\"dallas.museum\",\"database.museum\",\"ddr.museum\",\"decorativearts.museum\",\"delaware.museum\",\"delmenhorst.museum\",\"denmark.museum\",\"depot.museum\",\"design.museum\",\"detroit.museum\",\"dinosaur.museum\",\"discovery.museum\",\"dolls.museum\",\"donostia.museum\",\"durham.museum\",\"eastafrica.museum\",\"eastcoast.museum\",\"education.museum\",\"educational.museum\",\"egyptian.museum\",\"eisenbahn.museum\",\"elburg.museum\",\"elvendrell.museum\",\"embroidery.museum\",\"encyclopedic.museum\",\"england.museum\",\"entomology.museum\",\"environment.museum\",\"environmentalconservation.museum\",\"epilepsy.museum\",\"essex.museum\",\"estate.museum\",\"ethnology.museum\",\"exeter.museum\",\"exhibition.museum\",\"family.museum\",\"farm.museum\",\"farmequipment.museum\",\"farmers.museum\",\"farmstead.museum\",\"field.museum\",\"figueres.museum\",\"filatelia.museum\",\"film.museum\",\"fineart.museum\",\"finearts.museum\",\"finland.museum\",\"flanders.museum\",\"florida.museum\",\"force.museum\",\"fortmissoula.museum\",\"fortworth.museum\",\"foundation.museum\",\"francaise.museum\",\"frankfurt.museum\",\"franziskaner.museum\",\"freemasonry.museum\",\"freiburg.museum\",\"fribourg.museum\",\"frog.museum\",\"fundacio.museum\",\"furniture.museum\",\"gallery.museum\",\"garden.museum\",\"gateway.museum\",\"geelvinck.museum\",\"gemological.museum\",\"geology.museum\",\"georgia.museum\",\"giessen.museum\",\"glas.museum\",\"glass.museum\",\"gorge.museum\",\"grandrapids.museum\",\"graz.museum\",\"guernsey.museum\",\"halloffame.museum\",\"hamburg.museum\",\"handson.museum\",\"harvestcelebration.museum\",\"hawaii.museum\",\"health.museum\",\"heimatunduhren.museum\",\"hellas.museum\",\"helsinki.museum\",\"hembygdsforbund.museum\",\"heritage.museum\",\"histoire.museum\",\"historical.museum\",\"historicalsociety.museum\",\"historichouses.museum\",\"historisch.museum\",\"historisches.museum\",\"history.museum\",\"historyofscience.museum\",\"horology.museum\",\"house.museum\",\"humanities.museum\",\"illustration.museum\",\"imageandsound.museum\",\"indian.museum\",\"indiana.museum\",\"indianapolis.museum\",\"indianmarket.museum\",\"intelligence.museum\",\"interactive.museum\",\"iraq.museum\",\"iron.museum\",\"isleofman.museum\",\"jamison.museum\",\"jefferson.museum\",\"jerusalem.museum\",\"jewelry.museum\",\"jewish.museum\",\"jewishart.museum\",\"jfk.museum\",\"journalism.museum\",\"judaica.museum\",\"judygarland.museum\",\"juedisches.museum\",\"juif.museum\",\"karate.museum\",\"karikatur.museum\",\"kids.museum\",\"koebenhavn.museum\",\"koeln.museum\",\"kunst.museum\",\"kunstsammlung.museum\",\"kunstunddesign.museum\",\"labor.museum\",\"labour.museum\",\"lajolla.museum\",\"lancashire.museum\",\"landes.museum\",\"lans.museum\",\"läns.museum\",\"larsson.museum\",\"lewismiller.museum\",\"lincoln.museum\",\"linz.museum\",\"living.museum\",\"livinghistory.museum\",\"localhistory.museum\",\"london.museum\",\"losangeles.museum\",\"louvre.museum\",\"loyalist.museum\",\"lucerne.museum\",\"luxembourg.museum\",\"luzern.museum\",\"mad.museum\",\"madrid.museum\",\"mallorca.museum\",\"manchester.museum\",\"mansion.museum\",\"mansions.museum\",\"manx.museum\",\"marburg.museum\",\"maritime.museum\",\"maritimo.museum\",\"maryland.museum\",\"marylhurst.museum\",\"media.museum\",\"medical.museum\",\"medizinhistorisches.museum\",\"meeres.museum\",\"memorial.museum\",\"mesaverde.museum\",\"michigan.museum\",\"midatlantic.museum\",\"military.museum\",\"mill.museum\",\"miners.museum\",\"mining.museum\",\"minnesota.museum\",\"missile.museum\",\"missoula.museum\",\"modern.museum\",\"moma.museum\",\"money.museum\",\"monmouth.museum\",\"monticello.museum\",\"montreal.museum\",\"moscow.museum\",\"motorcycle.museum\",\"muenchen.museum\",\"muenster.museum\",\"mulhouse.museum\",\"muncie.museum\",\"museet.museum\",\"museumcenter.museum\",\"museumvereniging.museum\",\"music.museum\",\"national.museum\",\"nationalfirearms.museum\",\"nationalheritage.museum\",\"nativeamerican.museum\",\"naturalhistory.museum\",\"naturalhistorymuseum.museum\",\"naturalsciences.museum\",\"nature.museum\",\"naturhistorisches.museum\",\"natuurwetenschappen.museum\",\"naumburg.museum\",\"naval.museum\",\"nebraska.museum\",\"neues.museum\",\"newhampshire.museum\",\"newjersey.museum\",\"newmexico.museum\",\"newport.museum\",\"newspaper.museum\",\"newyork.museum\",\"niepce.museum\",\"norfolk.museum\",\"north.museum\",\"nrw.museum\",\"nyc.museum\",\"nyny.museum\",\"oceanographic.museum\",\"oceanographique.museum\",\"omaha.museum\",\"online.museum\",\"ontario.museum\",\"openair.museum\",\"oregon.museum\",\"oregontrail.museum\",\"otago.museum\",\"oxford.museum\",\"pacific.museum\",\"paderborn.museum\",\"palace.museum\",\"paleo.museum\",\"palmsprings.museum\",\"panama.museum\",\"paris.museum\",\"pasadena.museum\",\"pharmacy.museum\",\"philadelphia.museum\",\"philadelphiaarea.museum\",\"philately.museum\",\"phoenix.museum\",\"photography.museum\",\"pilots.museum\",\"pittsburgh.museum\",\"planetarium.museum\",\"plantation.museum\",\"plants.museum\",\"plaza.museum\",\"portal.museum\",\"portland.museum\",\"portlligat.museum\",\"posts-and-telecommunications.museum\",\"preservation.museum\",\"presidio.museum\",\"press.museum\",\"project.museum\",\"public.museum\",\"pubol.museum\",\"quebec.museum\",\"railroad.museum\",\"railway.museum\",\"research.museum\",\"resistance.museum\",\"riodejaneiro.museum\",\"rochester.museum\",\"rockart.museum\",\"roma.museum\",\"russia.museum\",\"saintlouis.museum\",\"salem.museum\",\"salvadordali.museum\",\"salzburg.museum\",\"sandiego.museum\",\"sanfrancisco.museum\",\"santabarbara.museum\",\"santacruz.museum\",\"santafe.museum\",\"saskatchewan.museum\",\"satx.museum\",\"savannahga.museum\",\"schlesisches.museum\",\"schoenbrunn.museum\",\"schokoladen.museum\",\"school.museum\",\"schweiz.museum\",\"science.museum\",\"scienceandhistory.museum\",\"scienceandindustry.museum\",\"sciencecenter.museum\",\"sciencecenters.museum\",\"science-fiction.museum\",\"sciencehistory.museum\",\"sciences.museum\",\"sciencesnaturelles.museum\",\"scotland.museum\",\"seaport.museum\",\"settlement.museum\",\"settlers.museum\",\"shell.museum\",\"sherbrooke.museum\",\"sibenik.museum\",\"silk.museum\",\"ski.museum\",\"skole.museum\",\"society.museum\",\"sologne.museum\",\"soundandvision.museum\",\"southcarolina.museum\",\"southwest.museum\",\"space.museum\",\"spy.museum\",\"square.museum\",\"stadt.museum\",\"stalbans.museum\",\"starnberg.museum\",\"state.museum\",\"stateofdelaware.museum\",\"station.museum\",\"steam.museum\",\"steiermark.museum\",\"stjohn.museum\",\"stockholm.museum\",\"stpetersburg.museum\",\"stuttgart.museum\",\"suisse.museum\",\"surgeonshall.museum\",\"surrey.museum\",\"svizzera.museum\",\"sweden.museum\",\"sydney.museum\",\"tank.museum\",\"tcm.museum\",\"technology.museum\",\"telekommunikation.museum\",\"television.museum\",\"texas.museum\",\"textile.museum\",\"theater.museum\",\"time.museum\",\"timekeeping.museum\",\"topology.museum\",\"torino.museum\",\"touch.museum\",\"town.museum\",\"transport.museum\",\"tree.museum\",\"trolley.museum\",\"trust.museum\",\"trustee.museum\",\"uhren.museum\",\"ulm.museum\",\"undersea.museum\",\"university.museum\",\"usa.museum\",\"usantiques.museum\",\"usarts.museum\",\"uscountryestate.museum\",\"usculture.museum\",\"usdecorativearts.museum\",\"usgarden.museum\",\"ushistory.museum\",\"ushuaia.museum\",\"uslivinghistory.museum\",\"utah.museum\",\"uvic.museum\",\"valley.museum\",\"vantaa.museum\",\"versailles.museum\",\"viking.museum\",\"village.museum\",\"virginia.museum\",\"virtual.museum\",\"virtuel.museum\",\"vlaanderen.museum\",\"volkenkunde.museum\",\"wales.museum\",\"wallonie.museum\",\"war.museum\",\"washingtondc.museum\",\"watchandclock.museum\",\"watch-and-clock.museum\",\"western.museum\",\"westfalen.museum\",\"whaling.museum\",\"wildlife.museum\",\"williamsburg.museum\",\"windmill.museum\",\"workshop.museum\",\"york.museum\",\"yorkshire.museum\",\"yosemite.museum\",\"youth.museum\",\"zoological.museum\",\"zoology.museum\",\"ירושלים.museum\",\"иком.museum\",\"mv\",\"aero.mv\",\"biz.mv\",\"com.mv\",\"coop.mv\",\"edu.mv\",\"gov.mv\",\"info.mv\",\"int.mv\",\"mil.mv\",\"museum.mv\",\"name.mv\",\"net.mv\",\"org.mv\",\"pro.mv\",\"mw\",\"ac.mw\",\"biz.mw\",\"co.mw\",\"com.mw\",\"coop.mw\",\"edu.mw\",\"gov.mw\",\"int.mw\",\"museum.mw\",\"net.mw\",\"org.mw\",\"mx\",\"com.mx\",\"org.mx\",\"gob.mx\",\"edu.mx\",\"net.mx\",\"my\",\"com.my\",\"net.my\",\"org.my\",\"gov.my\",\"edu.my\",\"mil.my\",\"name.my\",\"mz\",\"ac.mz\",\"adv.mz\",\"co.mz\",\"edu.mz\",\"gov.mz\",\"mil.mz\",\"net.mz\",\"org.mz\",\"na\",\"info.na\",\"pro.na\",\"name.na\",\"school.na\",\"or.na\",\"dr.na\",\"us.na\",\"mx.na\",\"ca.na\",\"in.na\",\"cc.na\",\"tv.na\",\"ws.na\",\"mobi.na\",\"co.na\",\"com.na\",\"org.na\",\"name\",\"nc\",\"asso.nc\",\"nom.nc\",\"ne\",\"net\",\"nf\",\"com.nf\",\"net.nf\",\"per.nf\",\"rec.nf\",\"web.nf\",\"arts.nf\",\"firm.nf\",\"info.nf\",\"other.nf\",\"store.nf\",\"ng\",\"com.ng\",\"edu.ng\",\"gov.ng\",\"i.ng\",\"mil.ng\",\"mobi.ng\",\"name.ng\",\"net.ng\",\"org.ng\",\"sch.ng\",\"ni\",\"ac.ni\",\"biz.ni\",\"co.ni\",\"com.ni\",\"edu.ni\",\"gob.ni\",\"in.ni\",\"info.ni\",\"int.ni\",\"mil.ni\",\"net.ni\",\"nom.ni\",\"org.ni\",\"web.ni\",\"nl\",\"no\",\"fhs.no\",\"vgs.no\",\"fylkesbibl.no\",\"folkebibl.no\",\"museum.no\",\"idrett.no\",\"priv.no\",\"mil.no\",\"stat.no\",\"dep.no\",\"kommune.no\",\"herad.no\",\"aa.no\",\"ah.no\",\"bu.no\",\"fm.no\",\"hl.no\",\"hm.no\",\"jan-mayen.no\",\"mr.no\",\"nl.no\",\"nt.no\",\"of.no\",\"ol.no\",\"oslo.no\",\"rl.no\",\"sf.no\",\"st.no\",\"svalbard.no\",\"tm.no\",\"tr.no\",\"va.no\",\"vf.no\",\"gs.aa.no\",\"gs.ah.no\",\"gs.bu.no\",\"gs.fm.no\",\"gs.hl.no\",\"gs.hm.no\",\"gs.jan-mayen.no\",\"gs.mr.no\",\"gs.nl.no\",\"gs.nt.no\",\"gs.of.no\",\"gs.ol.no\",\"gs.oslo.no\",\"gs.rl.no\",\"gs.sf.no\",\"gs.st.no\",\"gs.svalbard.no\",\"gs.tm.no\",\"gs.tr.no\",\"gs.va.no\",\"gs.vf.no\",\"akrehamn.no\",\"åkrehamn.no\",\"algard.no\",\"ålgård.no\",\"arna.no\",\"brumunddal.no\",\"bryne.no\",\"bronnoysund.no\",\"brønnøysund.no\",\"drobak.no\",\"drøbak.no\",\"egersund.no\",\"fetsund.no\",\"floro.no\",\"florø.no\",\"fredrikstad.no\",\"hokksund.no\",\"honefoss.no\",\"hønefoss.no\",\"jessheim.no\",\"jorpeland.no\",\"jørpeland.no\",\"kirkenes.no\",\"kopervik.no\",\"krokstadelva.no\",\"langevag.no\",\"langevåg.no\",\"leirvik.no\",\"mjondalen.no\",\"mjøndalen.no\",\"mo-i-rana.no\",\"mosjoen.no\",\"mosjøen.no\",\"nesoddtangen.no\",\"orkanger.no\",\"osoyro.no\",\"osøyro.no\",\"raholt.no\",\"råholt.no\",\"sandnessjoen.no\",\"sandnessjøen.no\",\"skedsmokorset.no\",\"slattum.no\",\"spjelkavik.no\",\"stathelle.no\",\"stavern.no\",\"stjordalshalsen.no\",\"stjørdalshalsen.no\",\"tananger.no\",\"tranby.no\",\"vossevangen.no\",\"afjord.no\",\"åfjord.no\",\"agdenes.no\",\"al.no\",\"ål.no\",\"alesund.no\",\"ålesund.no\",\"alstahaug.no\",\"alta.no\",\"áltá.no\",\"alaheadju.no\",\"álaheadju.no\",\"alvdal.no\",\"amli.no\",\"åmli.no\",\"amot.no\",\"åmot.no\",\"andebu.no\",\"andoy.no\",\"andøy.no\",\"andasuolo.no\",\"ardal.no\",\"årdal.no\",\"aremark.no\",\"arendal.no\",\"ås.no\",\"aseral.no\",\"åseral.no\",\"asker.no\",\"askim.no\",\"askvoll.no\",\"askoy.no\",\"askøy.no\",\"asnes.no\",\"åsnes.no\",\"audnedaln.no\",\"aukra.no\",\"aure.no\",\"aurland.no\",\"aurskog-holand.no\",\"aurskog-høland.no\",\"austevoll.no\",\"austrheim.no\",\"averoy.no\",\"averøy.no\",\"balestrand.no\",\"ballangen.no\",\"balat.no\",\"bálát.no\",\"balsfjord.no\",\"bahccavuotna.no\",\"báhccavuotna.no\",\"bamble.no\",\"bardu.no\",\"beardu.no\",\"beiarn.no\",\"bajddar.no\",\"bájddar.no\",\"baidar.no\",\"báidár.no\",\"berg.no\",\"bergen.no\",\"berlevag.no\",\"berlevåg.no\",\"bearalvahki.no\",\"bearalváhki.no\",\"bindal.no\",\"birkenes.no\",\"bjarkoy.no\",\"bjarkøy.no\",\"bjerkreim.no\",\"bjugn.no\",\"bodo.no\",\"bodø.no\",\"badaddja.no\",\"bådåddjå.no\",\"budejju.no\",\"bokn.no\",\"bremanger.no\",\"bronnoy.no\",\"brønnøy.no\",\"bygland.no\",\"bykle.no\",\"barum.no\",\"bærum.no\",\"bo.telemark.no\",\"bø.telemark.no\",\"bo.nordland.no\",\"bø.nordland.no\",\"bievat.no\",\"bievát.no\",\"bomlo.no\",\"bømlo.no\",\"batsfjord.no\",\"båtsfjord.no\",\"bahcavuotna.no\",\"báhcavuotna.no\",\"dovre.no\",\"drammen.no\",\"drangedal.no\",\"dyroy.no\",\"dyrøy.no\",\"donna.no\",\"dønna.no\",\"eid.no\",\"eidfjord.no\",\"eidsberg.no\",\"eidskog.no\",\"eidsvoll.no\",\"eigersund.no\",\"elverum.no\",\"enebakk.no\",\"engerdal.no\",\"etne.no\",\"etnedal.no\",\"evenes.no\",\"evenassi.no\",\"evenášši.no\",\"evje-og-hornnes.no\",\"farsund.no\",\"fauske.no\",\"fuossko.no\",\"fuoisku.no\",\"fedje.no\",\"fet.no\",\"finnoy.no\",\"finnøy.no\",\"fitjar.no\",\"fjaler.no\",\"fjell.no\",\"flakstad.no\",\"flatanger.no\",\"flekkefjord.no\",\"flesberg.no\",\"flora.no\",\"fla.no\",\"flå.no\",\"folldal.no\",\"forsand.no\",\"fosnes.no\",\"frei.no\",\"frogn.no\",\"froland.no\",\"frosta.no\",\"frana.no\",\"fræna.no\",\"froya.no\",\"frøya.no\",\"fusa.no\",\"fyresdal.no\",\"forde.no\",\"førde.no\",\"gamvik.no\",\"gangaviika.no\",\"gáŋgaviika.no\",\"gaular.no\",\"gausdal.no\",\"gildeskal.no\",\"gildeskål.no\",\"giske.no\",\"gjemnes.no\",\"gjerdrum.no\",\"gjerstad.no\",\"gjesdal.no\",\"gjovik.no\",\"gjøvik.no\",\"gloppen.no\",\"gol.no\",\"gran.no\",\"grane.no\",\"granvin.no\",\"gratangen.no\",\"grimstad.no\",\"grong.no\",\"kraanghke.no\",\"kråanghke.no\",\"grue.no\",\"gulen.no\",\"hadsel.no\",\"halden.no\",\"halsa.no\",\"hamar.no\",\"hamaroy.no\",\"habmer.no\",\"hábmer.no\",\"hapmir.no\",\"hápmir.no\",\"hammerfest.no\",\"hammarfeasta.no\",\"hámmárfeasta.no\",\"haram.no\",\"hareid.no\",\"harstad.no\",\"hasvik.no\",\"aknoluokta.no\",\"ákŋoluokta.no\",\"hattfjelldal.no\",\"aarborte.no\",\"haugesund.no\",\"hemne.no\",\"hemnes.no\",\"hemsedal.no\",\"heroy.more-og-romsdal.no\",\"herøy.møre-og-romsdal.no\",\"heroy.nordland.no\",\"herøy.nordland.no\",\"hitra.no\",\"hjartdal.no\",\"hjelmeland.no\",\"hobol.no\",\"hobøl.no\",\"hof.no\",\"hol.no\",\"hole.no\",\"holmestrand.no\",\"holtalen.no\",\"holtålen.no\",\"hornindal.no\",\"horten.no\",\"hurdal.no\",\"hurum.no\",\"hvaler.no\",\"hyllestad.no\",\"hagebostad.no\",\"hægebostad.no\",\"hoyanger.no\",\"høyanger.no\",\"hoylandet.no\",\"høylandet.no\",\"ha.no\",\"hå.no\",\"ibestad.no\",\"inderoy.no\",\"inderøy.no\",\"iveland.no\",\"jevnaker.no\",\"jondal.no\",\"jolster.no\",\"jølster.no\",\"karasjok.no\",\"karasjohka.no\",\"kárášjohka.no\",\"karlsoy.no\",\"galsa.no\",\"gálsá.no\",\"karmoy.no\",\"karmøy.no\",\"kautokeino.no\",\"guovdageaidnu.no\",\"klepp.no\",\"klabu.no\",\"klæbu.no\",\"kongsberg.no\",\"kongsvinger.no\",\"kragero.no\",\"kragerø.no\",\"kristiansand.no\",\"kristiansund.no\",\"krodsherad.no\",\"krødsherad.no\",\"kvalsund.no\",\"rahkkeravju.no\",\"ráhkkerávju.no\",\"kvam.no\",\"kvinesdal.no\",\"kvinnherad.no\",\"kviteseid.no\",\"kvitsoy.no\",\"kvitsøy.no\",\"kvafjord.no\",\"kvæfjord.no\",\"giehtavuoatna.no\",\"kvanangen.no\",\"kvænangen.no\",\"navuotna.no\",\"návuotna.no\",\"kafjord.no\",\"kåfjord.no\",\"gaivuotna.no\",\"gáivuotna.no\",\"larvik.no\",\"lavangen.no\",\"lavagis.no\",\"loabat.no\",\"loabát.no\",\"lebesby.no\",\"davvesiida.no\",\"leikanger.no\",\"leirfjord.no\",\"leka.no\",\"leksvik.no\",\"lenvik.no\",\"leangaviika.no\",\"leaŋgaviika.no\",\"lesja.no\",\"levanger.no\",\"lier.no\",\"lierne.no\",\"lillehammer.no\",\"lillesand.no\",\"lindesnes.no\",\"lindas.no\",\"lindås.no\",\"lom.no\",\"loppa.no\",\"lahppi.no\",\"láhppi.no\",\"lund.no\",\"lunner.no\",\"luroy.no\",\"lurøy.no\",\"luster.no\",\"lyngdal.no\",\"lyngen.no\",\"ivgu.no\",\"lardal.no\",\"lerdal.no\",\"lærdal.no\",\"lodingen.no\",\"lødingen.no\",\"lorenskog.no\",\"lørenskog.no\",\"loten.no\",\"løten.no\",\"malvik.no\",\"masoy.no\",\"måsøy.no\",\"muosat.no\",\"muosát.no\",\"mandal.no\",\"marker.no\",\"marnardal.no\",\"masfjorden.no\",\"meland.no\",\"meldal.no\",\"melhus.no\",\"meloy.no\",\"meløy.no\",\"meraker.no\",\"meråker.no\",\"moareke.no\",\"moåreke.no\",\"midsund.no\",\"midtre-gauldal.no\",\"modalen.no\",\"modum.no\",\"molde.no\",\"moskenes.no\",\"moss.no\",\"mosvik.no\",\"malselv.no\",\"målselv.no\",\"malatvuopmi.no\",\"málatvuopmi.no\",\"namdalseid.no\",\"aejrie.no\",\"namsos.no\",\"namsskogan.no\",\"naamesjevuemie.no\",\"nååmesjevuemie.no\",\"laakesvuemie.no\",\"nannestad.no\",\"narvik.no\",\"narviika.no\",\"naustdal.no\",\"nedre-eiker.no\",\"nes.akershus.no\",\"nes.buskerud.no\",\"nesna.no\",\"nesodden.no\",\"nesseby.no\",\"unjarga.no\",\"unjárga.no\",\"nesset.no\",\"nissedal.no\",\"nittedal.no\",\"nord-aurdal.no\",\"nord-fron.no\",\"nord-odal.no\",\"norddal.no\",\"nordkapp.no\",\"davvenjarga.no\",\"davvenjárga.no\",\"nordre-land.no\",\"nordreisa.no\",\"raisa.no\",\"ráisa.no\",\"nore-og-uvdal.no\",\"notodden.no\",\"naroy.no\",\"nærøy.no\",\"notteroy.no\",\"nøtterøy.no\",\"odda.no\",\"oksnes.no\",\"øksnes.no\",\"oppdal.no\",\"oppegard.no\",\"oppegård.no\",\"orkdal.no\",\"orland.no\",\"ørland.no\",\"orskog.no\",\"ørskog.no\",\"orsta.no\",\"ørsta.no\",\"os.hedmark.no\",\"os.hordaland.no\",\"osen.no\",\"osteroy.no\",\"osterøy.no\",\"ostre-toten.no\",\"østre-toten.no\",\"overhalla.no\",\"ovre-eiker.no\",\"øvre-eiker.no\",\"oyer.no\",\"øyer.no\",\"oygarden.no\",\"øygarden.no\",\"oystre-slidre.no\",\"øystre-slidre.no\",\"porsanger.no\",\"porsangu.no\",\"porsáŋgu.no\",\"porsgrunn.no\",\"radoy.no\",\"radøy.no\",\"rakkestad.no\",\"rana.no\",\"ruovat.no\",\"randaberg.no\",\"rauma.no\",\"rendalen.no\",\"rennebu.no\",\"rennesoy.no\",\"rennesøy.no\",\"rindal.no\",\"ringebu.no\",\"ringerike.no\",\"ringsaker.no\",\"rissa.no\",\"risor.no\",\"risør.no\",\"roan.no\",\"rollag.no\",\"rygge.no\",\"ralingen.no\",\"rælingen.no\",\"rodoy.no\",\"rødøy.no\",\"romskog.no\",\"rømskog.no\",\"roros.no\",\"røros.no\",\"rost.no\",\"røst.no\",\"royken.no\",\"røyken.no\",\"royrvik.no\",\"røyrvik.no\",\"rade.no\",\"råde.no\",\"salangen.no\",\"siellak.no\",\"saltdal.no\",\"salat.no\",\"sálát.no\",\"sálat.no\",\"samnanger.no\",\"sande.more-og-romsdal.no\",\"sande.møre-og-romsdal.no\",\"sande.vestfold.no\",\"sandefjord.no\",\"sandnes.no\",\"sandoy.no\",\"sandøy.no\",\"sarpsborg.no\",\"sauda.no\",\"sauherad.no\",\"sel.no\",\"selbu.no\",\"selje.no\",\"seljord.no\",\"sigdal.no\",\"siljan.no\",\"sirdal.no\",\"skaun.no\",\"skedsmo.no\",\"ski.no\",\"skien.no\",\"skiptvet.no\",\"skjervoy.no\",\"skjervøy.no\",\"skierva.no\",\"skiervá.no\",\"skjak.no\",\"skjåk.no\",\"skodje.no\",\"skanland.no\",\"skånland.no\",\"skanit.no\",\"skánit.no\",\"smola.no\",\"smøla.no\",\"snillfjord.no\",\"snasa.no\",\"snåsa.no\",\"snoasa.no\",\"snaase.no\",\"snåase.no\",\"sogndal.no\",\"sokndal.no\",\"sola.no\",\"solund.no\",\"songdalen.no\",\"sortland.no\",\"spydeberg.no\",\"stange.no\",\"stavanger.no\",\"steigen.no\",\"steinkjer.no\",\"stjordal.no\",\"stjørdal.no\",\"stokke.no\",\"stor-elvdal.no\",\"stord.no\",\"stordal.no\",\"storfjord.no\",\"omasvuotna.no\",\"strand.no\",\"stranda.no\",\"stryn.no\",\"sula.no\",\"suldal.no\",\"sund.no\",\"sunndal.no\",\"surnadal.no\",\"sveio.no\",\"svelvik.no\",\"sykkylven.no\",\"sogne.no\",\"søgne.no\",\"somna.no\",\"sømna.no\",\"sondre-land.no\",\"søndre-land.no\",\"sor-aurdal.no\",\"sør-aurdal.no\",\"sor-fron.no\",\"sør-fron.no\",\"sor-odal.no\",\"sør-odal.no\",\"sor-varanger.no\",\"sør-varanger.no\",\"matta-varjjat.no\",\"mátta-várjjat.no\",\"sorfold.no\",\"sørfold.no\",\"sorreisa.no\",\"sørreisa.no\",\"sorum.no\",\"sørum.no\",\"tana.no\",\"deatnu.no\",\"time.no\",\"tingvoll.no\",\"tinn.no\",\"tjeldsund.no\",\"dielddanuorri.no\",\"tjome.no\",\"tjøme.no\",\"tokke.no\",\"tolga.no\",\"torsken.no\",\"tranoy.no\",\"tranøy.no\",\"tromso.no\",\"tromsø.no\",\"tromsa.no\",\"romsa.no\",\"trondheim.no\",\"troandin.no\",\"trysil.no\",\"trana.no\",\"træna.no\",\"trogstad.no\",\"trøgstad.no\",\"tvedestrand.no\",\"tydal.no\",\"tynset.no\",\"tysfjord.no\",\"divtasvuodna.no\",\"divttasvuotna.no\",\"tysnes.no\",\"tysvar.no\",\"tysvær.no\",\"tonsberg.no\",\"tønsberg.no\",\"ullensaker.no\",\"ullensvang.no\",\"ulvik.no\",\"utsira.no\",\"vadso.no\",\"vadsø.no\",\"cahcesuolo.no\",\"čáhcesuolo.no\",\"vaksdal.no\",\"valle.no\",\"vang.no\",\"vanylven.no\",\"vardo.no\",\"vardø.no\",\"varggat.no\",\"várggát.no\",\"vefsn.no\",\"vaapste.no\",\"vega.no\",\"vegarshei.no\",\"vegårshei.no\",\"vennesla.no\",\"verdal.no\",\"verran.no\",\"vestby.no\",\"vestnes.no\",\"vestre-slidre.no\",\"vestre-toten.no\",\"vestvagoy.no\",\"vestvågøy.no\",\"vevelstad.no\",\"vik.no\",\"vikna.no\",\"vindafjord.no\",\"volda.no\",\"voss.no\",\"varoy.no\",\"værøy.no\",\"vagan.no\",\"vågan.no\",\"voagat.no\",\"vagsoy.no\",\"vågsøy.no\",\"vaga.no\",\"vågå.no\",\"valer.ostfold.no\",\"våler.østfold.no\",\"valer.hedmark.no\",\"våler.hedmark.no\",\"*.np\",\"nr\",\"biz.nr\",\"info.nr\",\"gov.nr\",\"edu.nr\",\"org.nr\",\"net.nr\",\"com.nr\",\"nu\",\"nz\",\"ac.nz\",\"co.nz\",\"cri.nz\",\"geek.nz\",\"gen.nz\",\"govt.nz\",\"health.nz\",\"iwi.nz\",\"kiwi.nz\",\"maori.nz\",\"mil.nz\",\"māori.nz\",\"net.nz\",\"org.nz\",\"parliament.nz\",\"school.nz\",\"om\",\"co.om\",\"com.om\",\"edu.om\",\"gov.om\",\"med.om\",\"museum.om\",\"net.om\",\"org.om\",\"pro.om\",\"onion\",\"org\",\"pa\",\"ac.pa\",\"gob.pa\",\"com.pa\",\"org.pa\",\"sld.pa\",\"edu.pa\",\"net.pa\",\"ing.pa\",\"abo.pa\",\"med.pa\",\"nom.pa\",\"pe\",\"edu.pe\",\"gob.pe\",\"nom.pe\",\"mil.pe\",\"org.pe\",\"com.pe\",\"net.pe\",\"pf\",\"com.pf\",\"org.pf\",\"edu.pf\",\"*.pg\",\"ph\",\"com.ph\",\"net.ph\",\"org.ph\",\"gov.ph\",\"edu.ph\",\"ngo.ph\",\"mil.ph\",\"i.ph\",\"pk\",\"com.pk\",\"net.pk\",\"edu.pk\",\"org.pk\",\"fam.pk\",\"biz.pk\",\"web.pk\",\"gov.pk\",\"gob.pk\",\"gok.pk\",\"gon.pk\",\"gop.pk\",\"gos.pk\",\"info.pk\",\"pl\",\"com.pl\",\"net.pl\",\"org.pl\",\"aid.pl\",\"agro.pl\",\"atm.pl\",\"auto.pl\",\"biz.pl\",\"edu.pl\",\"gmina.pl\",\"gsm.pl\",\"info.pl\",\"mail.pl\",\"miasta.pl\",\"media.pl\",\"mil.pl\",\"nieruchomosci.pl\",\"nom.pl\",\"pc.pl\",\"powiat.pl\",\"priv.pl\",\"realestate.pl\",\"rel.pl\",\"sex.pl\",\"shop.pl\",\"sklep.pl\",\"sos.pl\",\"szkola.pl\",\"targi.pl\",\"tm.pl\",\"tourism.pl\",\"travel.pl\",\"turystyka.pl\",\"gov.pl\",\"ap.gov.pl\",\"ic.gov.pl\",\"is.gov.pl\",\"us.gov.pl\",\"kmpsp.gov.pl\",\"kppsp.gov.pl\",\"kwpsp.gov.pl\",\"psp.gov.pl\",\"wskr.gov.pl\",\"kwp.gov.pl\",\"mw.gov.pl\",\"ug.gov.pl\",\"um.gov.pl\",\"umig.gov.pl\",\"ugim.gov.pl\",\"upow.gov.pl\",\"uw.gov.pl\",\"starostwo.gov.pl\",\"pa.gov.pl\",\"po.gov.pl\",\"psse.gov.pl\",\"pup.gov.pl\",\"rzgw.gov.pl\",\"sa.gov.pl\",\"so.gov.pl\",\"sr.gov.pl\",\"wsa.gov.pl\",\"sko.gov.pl\",\"uzs.gov.pl\",\"wiih.gov.pl\",\"winb.gov.pl\",\"pinb.gov.pl\",\"wios.gov.pl\",\"witd.gov.pl\",\"wzmiuw.gov.pl\",\"piw.gov.pl\",\"wiw.gov.pl\",\"griw.gov.pl\",\"wif.gov.pl\",\"oum.gov.pl\",\"sdn.gov.pl\",\"zp.gov.pl\",\"uppo.gov.pl\",\"mup.gov.pl\",\"wuoz.gov.pl\",\"konsulat.gov.pl\",\"oirm.gov.pl\",\"augustow.pl\",\"babia-gora.pl\",\"bedzin.pl\",\"beskidy.pl\",\"bialowieza.pl\",\"bialystok.pl\",\"bielawa.pl\",\"bieszczady.pl\",\"boleslawiec.pl\",\"bydgoszcz.pl\",\"bytom.pl\",\"cieszyn.pl\",\"czeladz.pl\",\"czest.pl\",\"dlugoleka.pl\",\"elblag.pl\",\"elk.pl\",\"glogow.pl\",\"gniezno.pl\",\"gorlice.pl\",\"grajewo.pl\",\"ilawa.pl\",\"jaworzno.pl\",\"jelenia-gora.pl\",\"jgora.pl\",\"kalisz.pl\",\"kazimierz-dolny.pl\",\"karpacz.pl\",\"kartuzy.pl\",\"kaszuby.pl\",\"katowice.pl\",\"kepno.pl\",\"ketrzyn.pl\",\"klodzko.pl\",\"kobierzyce.pl\",\"kolobrzeg.pl\",\"konin.pl\",\"konskowola.pl\",\"kutno.pl\",\"lapy.pl\",\"lebork.pl\",\"legnica.pl\",\"lezajsk.pl\",\"limanowa.pl\",\"lomza.pl\",\"lowicz.pl\",\"lubin.pl\",\"lukow.pl\",\"malbork.pl\",\"malopolska.pl\",\"mazowsze.pl\",\"mazury.pl\",\"mielec.pl\",\"mielno.pl\",\"mragowo.pl\",\"naklo.pl\",\"nowaruda.pl\",\"nysa.pl\",\"olawa.pl\",\"olecko.pl\",\"olkusz.pl\",\"olsztyn.pl\",\"opoczno.pl\",\"opole.pl\",\"ostroda.pl\",\"ostroleka.pl\",\"ostrowiec.pl\",\"ostrowwlkp.pl\",\"pila.pl\",\"pisz.pl\",\"podhale.pl\",\"podlasie.pl\",\"polkowice.pl\",\"pomorze.pl\",\"pomorskie.pl\",\"prochowice.pl\",\"pruszkow.pl\",\"przeworsk.pl\",\"pulawy.pl\",\"radom.pl\",\"rawa-maz.pl\",\"rybnik.pl\",\"rzeszow.pl\",\"sanok.pl\",\"sejny.pl\",\"slask.pl\",\"slupsk.pl\",\"sosnowiec.pl\",\"stalowa-wola.pl\",\"skoczow.pl\",\"starachowice.pl\",\"stargard.pl\",\"suwalki.pl\",\"swidnica.pl\",\"swiebodzin.pl\",\"swinoujscie.pl\",\"szczecin.pl\",\"szczytno.pl\",\"tarnobrzeg.pl\",\"tgory.pl\",\"turek.pl\",\"tychy.pl\",\"ustka.pl\",\"walbrzych.pl\",\"warmia.pl\",\"warszawa.pl\",\"waw.pl\",\"wegrow.pl\",\"wielun.pl\",\"wlocl.pl\",\"wloclawek.pl\",\"wodzislaw.pl\",\"wolomin.pl\",\"wroclaw.pl\",\"zachpomor.pl\",\"zagan.pl\",\"zarow.pl\",\"zgora.pl\",\"zgorzelec.pl\",\"pm\",\"pn\",\"gov.pn\",\"co.pn\",\"org.pn\",\"edu.pn\",\"net.pn\",\"post\",\"pr\",\"com.pr\",\"net.pr\",\"org.pr\",\"gov.pr\",\"edu.pr\",\"isla.pr\",\"pro.pr\",\"biz.pr\",\"info.pr\",\"name.pr\",\"est.pr\",\"prof.pr\",\"ac.pr\",\"pro\",\"aaa.pro\",\"aca.pro\",\"acct.pro\",\"avocat.pro\",\"bar.pro\",\"cpa.pro\",\"eng.pro\",\"jur.pro\",\"law.pro\",\"med.pro\",\"recht.pro\",\"ps\",\"edu.ps\",\"gov.ps\",\"sec.ps\",\"plo.ps\",\"com.ps\",\"org.ps\",\"net.ps\",\"pt\",\"net.pt\",\"gov.pt\",\"org.pt\",\"edu.pt\",\"int.pt\",\"publ.pt\",\"com.pt\",\"nome.pt\",\"pw\",\"co.pw\",\"ne.pw\",\"or.pw\",\"ed.pw\",\"go.pw\",\"belau.pw\",\"py\",\"com.py\",\"coop.py\",\"edu.py\",\"gov.py\",\"mil.py\",\"net.py\",\"org.py\",\"qa\",\"com.qa\",\"edu.qa\",\"gov.qa\",\"mil.qa\",\"name.qa\",\"net.qa\",\"org.qa\",\"sch.qa\",\"re\",\"asso.re\",\"com.re\",\"nom.re\",\"ro\",\"arts.ro\",\"com.ro\",\"firm.ro\",\"info.ro\",\"nom.ro\",\"nt.ro\",\"org.ro\",\"rec.ro\",\"store.ro\",\"tm.ro\",\"www.ro\",\"rs\",\"ac.rs\",\"co.rs\",\"edu.rs\",\"gov.rs\",\"in.rs\",\"org.rs\",\"ru\",\"rw\",\"ac.rw\",\"co.rw\",\"coop.rw\",\"gov.rw\",\"mil.rw\",\"net.rw\",\"org.rw\",\"sa\",\"com.sa\",\"net.sa\",\"org.sa\",\"gov.sa\",\"med.sa\",\"pub.sa\",\"edu.sa\",\"sch.sa\",\"sb\",\"com.sb\",\"edu.sb\",\"gov.sb\",\"net.sb\",\"org.sb\",\"sc\",\"com.sc\",\"gov.sc\",\"net.sc\",\"org.sc\",\"edu.sc\",\"sd\",\"com.sd\",\"net.sd\",\"org.sd\",\"edu.sd\",\"med.sd\",\"tv.sd\",\"gov.sd\",\"info.sd\",\"se\",\"a.se\",\"ac.se\",\"b.se\",\"bd.se\",\"brand.se\",\"c.se\",\"d.se\",\"e.se\",\"f.se\",\"fh.se\",\"fhsk.se\",\"fhv.se\",\"g.se\",\"h.se\",\"i.se\",\"k.se\",\"komforb.se\",\"kommunalforbund.se\",\"komvux.se\",\"l.se\",\"lanbib.se\",\"m.se\",\"n.se\",\"naturbruksgymn.se\",\"o.se\",\"org.se\",\"p.se\",\"parti.se\",\"pp.se\",\"press.se\",\"r.se\",\"s.se\",\"t.se\",\"tm.se\",\"u.se\",\"w.se\",\"x.se\",\"y.se\",\"z.se\",\"sg\",\"com.sg\",\"net.sg\",\"org.sg\",\"gov.sg\",\"edu.sg\",\"per.sg\",\"sh\",\"com.sh\",\"net.sh\",\"gov.sh\",\"org.sh\",\"mil.sh\",\"si\",\"sj\",\"sk\",\"sl\",\"com.sl\",\"net.sl\",\"edu.sl\",\"gov.sl\",\"org.sl\",\"sm\",\"sn\",\"art.sn\",\"com.sn\",\"edu.sn\",\"gouv.sn\",\"org.sn\",\"perso.sn\",\"univ.sn\",\"so\",\"com.so\",\"edu.so\",\"gov.so\",\"me.so\",\"net.so\",\"org.so\",\"sr\",\"ss\",\"biz.ss\",\"com.ss\",\"edu.ss\",\"gov.ss\",\"net.ss\",\"org.ss\",\"st\",\"co.st\",\"com.st\",\"consulado.st\",\"edu.st\",\"embaixada.st\",\"gov.st\",\"mil.st\",\"net.st\",\"org.st\",\"principe.st\",\"saotome.st\",\"store.st\",\"su\",\"sv\",\"com.sv\",\"edu.sv\",\"gob.sv\",\"org.sv\",\"red.sv\",\"sx\",\"gov.sx\",\"sy\",\"edu.sy\",\"gov.sy\",\"net.sy\",\"mil.sy\",\"com.sy\",\"org.sy\",\"sz\",\"co.sz\",\"ac.sz\",\"org.sz\",\"tc\",\"td\",\"tel\",\"tf\",\"tg\",\"th\",\"ac.th\",\"co.th\",\"go.th\",\"in.th\",\"mi.th\",\"net.th\",\"or.th\",\"tj\",\"ac.tj\",\"biz.tj\",\"co.tj\",\"com.tj\",\"edu.tj\",\"go.tj\",\"gov.tj\",\"int.tj\",\"mil.tj\",\"name.tj\",\"net.tj\",\"nic.tj\",\"org.tj\",\"test.tj\",\"web.tj\",\"tk\",\"tl\",\"gov.tl\",\"tm\",\"com.tm\",\"co.tm\",\"org.tm\",\"net.tm\",\"nom.tm\",\"gov.tm\",\"mil.tm\",\"edu.tm\",\"tn\",\"com.tn\",\"ens.tn\",\"fin.tn\",\"gov.tn\",\"ind.tn\",\"intl.tn\",\"nat.tn\",\"net.tn\",\"org.tn\",\"info.tn\",\"perso.tn\",\"tourism.tn\",\"edunet.tn\",\"rnrt.tn\",\"rns.tn\",\"rnu.tn\",\"mincom.tn\",\"agrinet.tn\",\"defense.tn\",\"turen.tn\",\"to\",\"com.to\",\"gov.to\",\"net.to\",\"org.to\",\"edu.to\",\"mil.to\",\"tr\",\"av.tr\",\"bbs.tr\",\"bel.tr\",\"biz.tr\",\"com.tr\",\"dr.tr\",\"edu.tr\",\"gen.tr\",\"gov.tr\",\"info.tr\",\"mil.tr\",\"k12.tr\",\"kep.tr\",\"name.tr\",\"net.tr\",\"org.tr\",\"pol.tr\",\"tel.tr\",\"tsk.tr\",\"tv.tr\",\"web.tr\",\"nc.tr\",\"gov.nc.tr\",\"tt\",\"co.tt\",\"com.tt\",\"org.tt\",\"net.tt\",\"biz.tt\",\"info.tt\",\"pro.tt\",\"int.tt\",\"coop.tt\",\"jobs.tt\",\"mobi.tt\",\"travel.tt\",\"museum.tt\",\"aero.tt\",\"name.tt\",\"gov.tt\",\"edu.tt\",\"tv\",\"tw\",\"edu.tw\",\"gov.tw\",\"mil.tw\",\"com.tw\",\"net.tw\",\"org.tw\",\"idv.tw\",\"game.tw\",\"ebiz.tw\",\"club.tw\",\"網路.tw\",\"組織.tw\",\"商業.tw\",\"tz\",\"ac.tz\",\"co.tz\",\"go.tz\",\"hotel.tz\",\"info.tz\",\"me.tz\",\"mil.tz\",\"mobi.tz\",\"ne.tz\",\"or.tz\",\"sc.tz\",\"tv.tz\",\"ua\",\"com.ua\",\"edu.ua\",\"gov.ua\",\"in.ua\",\"net.ua\",\"org.ua\",\"cherkassy.ua\",\"cherkasy.ua\",\"chernigov.ua\",\"chernihiv.ua\",\"chernivtsi.ua\",\"chernovtsy.ua\",\"ck.ua\",\"cn.ua\",\"cr.ua\",\"crimea.ua\",\"cv.ua\",\"dn.ua\",\"dnepropetrovsk.ua\",\"dnipropetrovsk.ua\",\"dominic.ua\",\"donetsk.ua\",\"dp.ua\",\"if.ua\",\"ivano-frankivsk.ua\",\"kh.ua\",\"kharkiv.ua\",\"kharkov.ua\",\"kherson.ua\",\"khmelnitskiy.ua\",\"khmelnytskyi.ua\",\"kiev.ua\",\"kirovograd.ua\",\"km.ua\",\"kr.ua\",\"krym.ua\",\"ks.ua\",\"kv.ua\",\"kyiv.ua\",\"lg.ua\",\"lt.ua\",\"lugansk.ua\",\"lutsk.ua\",\"lv.ua\",\"lviv.ua\",\"mk.ua\",\"mykolaiv.ua\",\"nikolaev.ua\",\"od.ua\",\"odesa.ua\",\"odessa.ua\",\"pl.ua\",\"poltava.ua\",\"rivne.ua\",\"rovno.ua\",\"rv.ua\",\"sb.ua\",\"sebastopol.ua\",\"sevastopol.ua\",\"sm.ua\",\"sumy.ua\",\"te.ua\",\"ternopil.ua\",\"uz.ua\",\"uzhgorod.ua\",\"vinnica.ua\",\"vinnytsia.ua\",\"vn.ua\",\"volyn.ua\",\"yalta.ua\",\"zaporizhzhe.ua\",\"zaporizhzhia.ua\",\"zhitomir.ua\",\"zhytomyr.ua\",\"zp.ua\",\"zt.ua\",\"ug\",\"co.ug\",\"or.ug\",\"ac.ug\",\"sc.ug\",\"go.ug\",\"ne.ug\",\"com.ug\",\"org.ug\",\"uk\",\"ac.uk\",\"co.uk\",\"gov.uk\",\"ltd.uk\",\"me.uk\",\"net.uk\",\"nhs.uk\",\"org.uk\",\"plc.uk\",\"police.uk\",\"*.sch.uk\",\"us\",\"dni.us\",\"fed.us\",\"isa.us\",\"kids.us\",\"nsn.us\",\"ak.us\",\"al.us\",\"ar.us\",\"as.us\",\"az.us\",\"ca.us\",\"co.us\",\"ct.us\",\"dc.us\",\"de.us\",\"fl.us\",\"ga.us\",\"gu.us\",\"hi.us\",\"ia.us\",\"id.us\",\"il.us\",\"in.us\",\"ks.us\",\"ky.us\",\"la.us\",\"ma.us\",\"md.us\",\"me.us\",\"mi.us\",\"mn.us\",\"mo.us\",\"ms.us\",\"mt.us\",\"nc.us\",\"nd.us\",\"ne.us\",\"nh.us\",\"nj.us\",\"nm.us\",\"nv.us\",\"ny.us\",\"oh.us\",\"ok.us\",\"or.us\",\"pa.us\",\"pr.us\",\"ri.us\",\"sc.us\",\"sd.us\",\"tn.us\",\"tx.us\",\"ut.us\",\"vi.us\",\"vt.us\",\"va.us\",\"wa.us\",\"wi.us\",\"wv.us\",\"wy.us\",\"k12.ak.us\",\"k12.al.us\",\"k12.ar.us\",\"k12.as.us\",\"k12.az.us\",\"k12.ca.us\",\"k12.co.us\",\"k12.ct.us\",\"k12.dc.us\",\"k12.de.us\",\"k12.fl.us\",\"k12.ga.us\",\"k12.gu.us\",\"k12.ia.us\",\"k12.id.us\",\"k12.il.us\",\"k12.in.us\",\"k12.ks.us\",\"k12.ky.us\",\"k12.la.us\",\"k12.ma.us\",\"k12.md.us\",\"k12.me.us\",\"k12.mi.us\",\"k12.mn.us\",\"k12.mo.us\",\"k12.ms.us\",\"k12.mt.us\",\"k12.nc.us\",\"k12.ne.us\",\"k12.nh.us\",\"k12.nj.us\",\"k12.nm.us\",\"k12.nv.us\",\"k12.ny.us\",\"k12.oh.us\",\"k12.ok.us\",\"k12.or.us\",\"k12.pa.us\",\"k12.pr.us\",\"k12.ri.us\",\"k12.sc.us\",\"k12.tn.us\",\"k12.tx.us\",\"k12.ut.us\",\"k12.vi.us\",\"k12.vt.us\",\"k12.va.us\",\"k12.wa.us\",\"k12.wi.us\",\"k12.wy.us\",\"cc.ak.us\",\"cc.al.us\",\"cc.ar.us\",\"cc.as.us\",\"cc.az.us\",\"cc.ca.us\",\"cc.co.us\",\"cc.ct.us\",\"cc.dc.us\",\"cc.de.us\",\"cc.fl.us\",\"cc.ga.us\",\"cc.gu.us\",\"cc.hi.us\",\"cc.ia.us\",\"cc.id.us\",\"cc.il.us\",\"cc.in.us\",\"cc.ks.us\",\"cc.ky.us\",\"cc.la.us\",\"cc.ma.us\",\"cc.md.us\",\"cc.me.us\",\"cc.mi.us\",\"cc.mn.us\",\"cc.mo.us\",\"cc.ms.us\",\"cc.mt.us\",\"cc.nc.us\",\"cc.nd.us\",\"cc.ne.us\",\"cc.nh.us\",\"cc.nj.us\",\"cc.nm.us\",\"cc.nv.us\",\"cc.ny.us\",\"cc.oh.us\",\"cc.ok.us\",\"cc.or.us\",\"cc.pa.us\",\"cc.pr.us\",\"cc.ri.us\",\"cc.sc.us\",\"cc.sd.us\",\"cc.tn.us\",\"cc.tx.us\",\"cc.ut.us\",\"cc.vi.us\",\"cc.vt.us\",\"cc.va.us\",\"cc.wa.us\",\"cc.wi.us\",\"cc.wv.us\",\"cc.wy.us\",\"lib.ak.us\",\"lib.al.us\",\"lib.ar.us\",\"lib.as.us\",\"lib.az.us\",\"lib.ca.us\",\"lib.co.us\",\"lib.ct.us\",\"lib.dc.us\",\"lib.fl.us\",\"lib.ga.us\",\"lib.gu.us\",\"lib.hi.us\",\"lib.ia.us\",\"lib.id.us\",\"lib.il.us\",\"lib.in.us\",\"lib.ks.us\",\"lib.ky.us\",\"lib.la.us\",\"lib.ma.us\",\"lib.md.us\",\"lib.me.us\",\"lib.mi.us\",\"lib.mn.us\",\"lib.mo.us\",\"lib.ms.us\",\"lib.mt.us\",\"lib.nc.us\",\"lib.nd.us\",\"lib.ne.us\",\"lib.nh.us\",\"lib.nj.us\",\"lib.nm.us\",\"lib.nv.us\",\"lib.ny.us\",\"lib.oh.us\",\"lib.ok.us\",\"lib.or.us\",\"lib.pa.us\",\"lib.pr.us\",\"lib.ri.us\",\"lib.sc.us\",\"lib.sd.us\",\"lib.tn.us\",\"lib.tx.us\",\"lib.ut.us\",\"lib.vi.us\",\"lib.vt.us\",\"lib.va.us\",\"lib.wa.us\",\"lib.wi.us\",\"lib.wy.us\",\"pvt.k12.ma.us\",\"chtr.k12.ma.us\",\"paroch.k12.ma.us\",\"ann-arbor.mi.us\",\"cog.mi.us\",\"dst.mi.us\",\"eaton.mi.us\",\"gen.mi.us\",\"mus.mi.us\",\"tec.mi.us\",\"washtenaw.mi.us\",\"uy\",\"com.uy\",\"edu.uy\",\"gub.uy\",\"mil.uy\",\"net.uy\",\"org.uy\",\"uz\",\"co.uz\",\"com.uz\",\"net.uz\",\"org.uz\",\"va\",\"vc\",\"com.vc\",\"net.vc\",\"org.vc\",\"gov.vc\",\"mil.vc\",\"edu.vc\",\"ve\",\"arts.ve\",\"co.ve\",\"com.ve\",\"e12.ve\",\"edu.ve\",\"firm.ve\",\"gob.ve\",\"gov.ve\",\"info.ve\",\"int.ve\",\"mil.ve\",\"net.ve\",\"org.ve\",\"rec.ve\",\"store.ve\",\"tec.ve\",\"web.ve\",\"vg\",\"vi\",\"co.vi\",\"com.vi\",\"k12.vi\",\"net.vi\",\"org.vi\",\"vn\",\"com.vn\",\"net.vn\",\"org.vn\",\"edu.vn\",\"gov.vn\",\"int.vn\",\"ac.vn\",\"biz.vn\",\"info.vn\",\"name.vn\",\"pro.vn\",\"health.vn\",\"vu\",\"com.vu\",\"edu.vu\",\"net.vu\",\"org.vu\",\"wf\",\"ws\",\"com.ws\",\"net.ws\",\"org.ws\",\"gov.ws\",\"edu.ws\",\"yt\",\"امارات\",\"հայ\",\"বাংলা\",\"бг\",\"бел\",\"中国\",\"中國\",\"الجزائر\",\"مصر\",\"ею\",\"ευ\",\"موريتانيا\",\"გე\",\"ελ\",\"香港\",\"公司.香港\",\"教育.香港\",\"政府.香港\",\"個人.香港\",\"網絡.香港\",\"組織.香港\",\"ಭಾರತ\",\"ଭାରତ\",\"ভাৰত\",\"भारतम्\",\"भारोत\",\"ڀارت\",\"ഭാരതം\",\"भारत\",\"بارت\",\"بھارت\",\"భారత్\",\"ભારત\",\"ਭਾਰਤ\",\"ভারত\",\"இந்தியா\",\"ایران\",\"ايران\",\"عراق\",\"الاردن\",\"한국\",\"қаз\",\"ලංකා\",\"இலங்கை\",\"المغرب\",\"мкд\",\"мон\",\"澳門\",\"澳门\",\"مليسيا\",\"عمان\",\"پاکستان\",\"پاكستان\",\"فلسطين\",\"срб\",\"пр.срб\",\"орг.срб\",\"обр.срб\",\"од.срб\",\"упр.срб\",\"ак.срб\",\"рф\",\"قطر\",\"السعودية\",\"السعودیة\",\"السعودیۃ\",\"السعوديه\",\"سودان\",\"新加坡\",\"சிங்கப்பூர்\",\"سورية\",\"سوريا\",\"ไทย\",\"ศึกษา.ไทย\",\"ธุรกิจ.ไทย\",\"รัฐบาล.ไทย\",\"ทหาร.ไทย\",\"เน็ต.ไทย\",\"องค์กร.ไทย\",\"تونس\",\"台灣\",\"台湾\",\"臺灣\",\"укр\",\"اليمن\",\"xxx\",\"*.ye\",\"ac.za\",\"agric.za\",\"alt.za\",\"co.za\",\"edu.za\",\"gov.za\",\"grondar.za\",\"law.za\",\"mil.za\",\"net.za\",\"ngo.za\",\"nic.za\",\"nis.za\",\"nom.za\",\"org.za\",\"school.za\",\"tm.za\",\"web.za\",\"zm\",\"ac.zm\",\"biz.zm\",\"co.zm\",\"com.zm\",\"edu.zm\",\"gov.zm\",\"info.zm\",\"mil.zm\",\"net.zm\",\"org.zm\",\"sch.zm\",\"zw\",\"ac.zw\",\"co.zw\",\"gov.zw\",\"mil.zw\",\"org.zw\",\"aaa\",\"aarp\",\"abarth\",\"abb\",\"abbott\",\"abbvie\",\"abc\",\"able\",\"abogado\",\"abudhabi\",\"academy\",\"accenture\",\"accountant\",\"accountants\",\"aco\",\"actor\",\"adac\",\"ads\",\"adult\",\"aeg\",\"aetna\",\"afamilycompany\",\"afl\",\"africa\",\"agakhan\",\"agency\",\"aig\",\"aigo\",\"airbus\",\"airforce\",\"airtel\",\"akdn\",\"alfaromeo\",\"alibaba\",\"alipay\",\"allfinanz\",\"allstate\",\"ally\",\"alsace\",\"alstom\",\"amazon\",\"americanexpress\",\"americanfamily\",\"amex\",\"amfam\",\"amica\",\"amsterdam\",\"analytics\",\"android\",\"anquan\",\"anz\",\"aol\",\"apartments\",\"app\",\"apple\",\"aquarelle\",\"arab\",\"aramco\",\"archi\",\"army\",\"art\",\"arte\",\"asda\",\"associates\",\"athleta\",\"attorney\",\"auction\",\"audi\",\"audible\",\"audio\",\"auspost\",\"author\",\"auto\",\"autos\",\"avianca\",\"aws\",\"axa\",\"azure\",\"baby\",\"baidu\",\"banamex\",\"bananarepublic\",\"band\",\"bank\",\"bar\",\"barcelona\",\"barclaycard\",\"barclays\",\"barefoot\",\"bargains\",\"baseball\",\"basketball\",\"bauhaus\",\"bayern\",\"bbc\",\"bbt\",\"bbva\",\"bcg\",\"bcn\",\"beats\",\"beauty\",\"beer\",\"bentley\",\"berlin\",\"best\",\"bestbuy\",\"bet\",\"bharti\",\"bible\",\"bid\",\"bike\",\"bing\",\"bingo\",\"bio\",\"black\",\"blackfriday\",\"blockbuster\",\"blog\",\"bloomberg\",\"blue\",\"bms\",\"bmw\",\"bnpparibas\",\"boats\",\"boehringer\",\"bofa\",\"bom\",\"bond\",\"boo\",\"book\",\"booking\",\"bosch\",\"bostik\",\"boston\",\"bot\",\"boutique\",\"box\",\"bradesco\",\"bridgestone\",\"broadway\",\"broker\",\"brother\",\"brussels\",\"budapest\",\"bugatti\",\"build\",\"builders\",\"business\",\"buy\",\"buzz\",\"bzh\",\"cab\",\"cafe\",\"cal\",\"call\",\"calvinklein\",\"cam\",\"camera\",\"camp\",\"cancerresearch\",\"canon\",\"capetown\",\"capital\",\"capitalone\",\"car\",\"caravan\",\"cards\",\"care\",\"career\",\"careers\",\"cars\",\"casa\",\"case\",\"caseih\",\"cash\",\"casino\",\"catering\",\"catholic\",\"cba\",\"cbn\",\"cbre\",\"cbs\",\"ceb\",\"center\",\"ceo\",\"cern\",\"cfa\",\"cfd\",\"chanel\",\"channel\",\"charity\",\"chase\",\"chat\",\"cheap\",\"chintai\",\"christmas\",\"chrome\",\"church\",\"cipriani\",\"circle\",\"cisco\",\"citadel\",\"citi\",\"citic\",\"city\",\"cityeats\",\"claims\",\"cleaning\",\"click\",\"clinic\",\"clinique\",\"clothing\",\"cloud\",\"club\",\"clubmed\",\"coach\",\"codes\",\"coffee\",\"college\",\"cologne\",\"comcast\",\"commbank\",\"community\",\"company\",\"compare\",\"computer\",\"comsec\",\"condos\",\"construction\",\"consulting\",\"contact\",\"contractors\",\"cooking\",\"cookingchannel\",\"cool\",\"corsica\",\"country\",\"coupon\",\"coupons\",\"courses\",\"cpa\",\"credit\",\"creditcard\",\"creditunion\",\"cricket\",\"crown\",\"crs\",\"cruise\",\"cruises\",\"csc\",\"cuisinella\",\"cymru\",\"cyou\",\"dabur\",\"dad\",\"dance\",\"data\",\"date\",\"dating\",\"datsun\",\"day\",\"dclk\",\"dds\",\"deal\",\"dealer\",\"deals\",\"degree\",\"delivery\",\"dell\",\"deloitte\",\"delta\",\"democrat\",\"dental\",\"dentist\",\"desi\",\"design\",\"dev\",\"dhl\",\"diamonds\",\"diet\",\"digital\",\"direct\",\"directory\",\"discount\",\"discover\",\"dish\",\"diy\",\"dnp\",\"docs\",\"doctor\",\"dog\",\"domains\",\"dot\",\"download\",\"drive\",\"dtv\",\"dubai\",\"duck\",\"dunlop\",\"dupont\",\"durban\",\"dvag\",\"dvr\",\"earth\",\"eat\",\"eco\",\"edeka\",\"education\",\"email\",\"emerck\",\"energy\",\"engineer\",\"engineering\",\"enterprises\",\"epson\",\"equipment\",\"ericsson\",\"erni\",\"esq\",\"estate\",\"esurance\",\"etisalat\",\"eurovision\",\"eus\",\"events\",\"exchange\",\"expert\",\"exposed\",\"express\",\"extraspace\",\"fage\",\"fail\",\"fairwinds\",\"faith\",\"family\",\"fan\",\"fans\",\"farm\",\"farmers\",\"fashion\",\"fast\",\"fedex\",\"feedback\",\"ferrari\",\"ferrero\",\"fiat\",\"fidelity\",\"fido\",\"film\",\"final\",\"finance\",\"financial\",\"fire\",\"firestone\",\"firmdale\",\"fish\",\"fishing\",\"fit\",\"fitness\",\"flickr\",\"flights\",\"flir\",\"florist\",\"flowers\",\"fly\",\"foo\",\"food\",\"foodnetwork\",\"football\",\"ford\",\"forex\",\"forsale\",\"forum\",\"foundation\",\"fox\",\"free\",\"fresenius\",\"frl\",\"frogans\",\"frontdoor\",\"frontier\",\"ftr\",\"fujitsu\",\"fujixerox\",\"fun\",\"fund\",\"furniture\",\"futbol\",\"fyi\",\"gal\",\"gallery\",\"gallo\",\"gallup\",\"game\",\"games\",\"gap\",\"garden\",\"gay\",\"gbiz\",\"gdn\",\"gea\",\"gent\",\"genting\",\"george\",\"ggee\",\"gift\",\"gifts\",\"gives\",\"giving\",\"glade\",\"glass\",\"gle\",\"global\",\"globo\",\"gmail\",\"gmbh\",\"gmo\",\"gmx\",\"godaddy\",\"gold\",\"goldpoint\",\"golf\",\"goo\",\"goodyear\",\"goog\",\"google\",\"gop\",\"got\",\"grainger\",\"graphics\",\"gratis\",\"green\",\"gripe\",\"grocery\",\"group\",\"guardian\",\"gucci\",\"guge\",\"guide\",\"guitars\",\"guru\",\"hair\",\"hamburg\",\"hangout\",\"haus\",\"hbo\",\"hdfc\",\"hdfcbank\",\"health\",\"healthcare\",\"help\",\"helsinki\",\"here\",\"hermes\",\"hgtv\",\"hiphop\",\"hisamitsu\",\"hitachi\",\"hiv\",\"hkt\",\"hockey\",\"holdings\",\"holiday\",\"homedepot\",\"homegoods\",\"homes\",\"homesense\",\"honda\",\"horse\",\"hospital\",\"host\",\"hosting\",\"hot\",\"hoteles\",\"hotels\",\"hotmail\",\"house\",\"how\",\"hsbc\",\"hughes\",\"hyatt\",\"hyundai\",\"ibm\",\"icbc\",\"ice\",\"icu\",\"ieee\",\"ifm\",\"ikano\",\"imamat\",\"imdb\",\"immo\",\"immobilien\",\"inc\",\"industries\",\"infiniti\",\"ing\",\"ink\",\"institute\",\"insurance\",\"insure\",\"intel\",\"international\",\"intuit\",\"investments\",\"ipiranga\",\"irish\",\"ismaili\",\"ist\",\"istanbul\",\"itau\",\"itv\",\"iveco\",\"jaguar\",\"java\",\"jcb\",\"jcp\",\"jeep\",\"jetzt\",\"jewelry\",\"jio\",\"jll\",\"jmp\",\"jnj\",\"joburg\",\"jot\",\"joy\",\"jpmorgan\",\"jprs\",\"juegos\",\"juniper\",\"kaufen\",\"kddi\",\"kerryhotels\",\"kerrylogistics\",\"kerryproperties\",\"kfh\",\"kia\",\"kim\",\"kinder\",\"kindle\",\"kitchen\",\"kiwi\",\"koeln\",\"komatsu\",\"kosher\",\"kpmg\",\"kpn\",\"krd\",\"kred\",\"kuokgroup\",\"kyoto\",\"lacaixa\",\"lamborghini\",\"lamer\",\"lancaster\",\"lancia\",\"land\",\"landrover\",\"lanxess\",\"lasalle\",\"lat\",\"latino\",\"latrobe\",\"law\",\"lawyer\",\"lds\",\"lease\",\"leclerc\",\"lefrak\",\"legal\",\"lego\",\"lexus\",\"lgbt\",\"lidl\",\"life\",\"lifeinsurance\",\"lifestyle\",\"lighting\",\"like\",\"lilly\",\"limited\",\"limo\",\"lincoln\",\"linde\",\"link\",\"lipsy\",\"live\",\"living\",\"lixil\",\"llc\",\"llp\",\"loan\",\"loans\",\"locker\",\"locus\",\"loft\",\"lol\",\"london\",\"lotte\",\"lotto\",\"love\",\"lpl\",\"lplfinancial\",\"ltd\",\"ltda\",\"lundbeck\",\"lupin\",\"luxe\",\"luxury\",\"macys\",\"madrid\",\"maif\",\"maison\",\"makeup\",\"man\",\"management\",\"mango\",\"map\",\"market\",\"marketing\",\"markets\",\"marriott\",\"marshalls\",\"maserati\",\"mattel\",\"mba\",\"mckinsey\",\"med\",\"media\",\"meet\",\"melbourne\",\"meme\",\"memorial\",\"men\",\"menu\",\"merckmsd\",\"metlife\",\"miami\",\"microsoft\",\"mini\",\"mint\",\"mit\",\"mitsubishi\",\"mlb\",\"mls\",\"mma\",\"mobile\",\"moda\",\"moe\",\"moi\",\"mom\",\"monash\",\"money\",\"monster\",\"mormon\",\"mortgage\",\"moscow\",\"moto\",\"motorcycles\",\"mov\",\"movie\",\"msd\",\"mtn\",\"mtr\",\"mutual\",\"nab\",\"nadex\",\"nagoya\",\"nationwide\",\"natura\",\"navy\",\"nba\",\"nec\",\"netbank\",\"netflix\",\"network\",\"neustar\",\"new\",\"newholland\",\"news\",\"next\",\"nextdirect\",\"nexus\",\"nfl\",\"ngo\",\"nhk\",\"nico\",\"nike\",\"nikon\",\"ninja\",\"nissan\",\"nissay\",\"nokia\",\"northwesternmutual\",\"norton\",\"now\",\"nowruz\",\"nowtv\",\"nra\",\"nrw\",\"ntt\",\"nyc\",\"obi\",\"observer\",\"off\",\"office\",\"okinawa\",\"olayan\",\"olayangroup\",\"oldnavy\",\"ollo\",\"omega\",\"one\",\"ong\",\"onl\",\"online\",\"onyourside\",\"ooo\",\"open\",\"oracle\",\"orange\",\"organic\",\"origins\",\"osaka\",\"otsuka\",\"ott\",\"ovh\",\"page\",\"panasonic\",\"paris\",\"pars\",\"partners\",\"parts\",\"party\",\"passagens\",\"pay\",\"pccw\",\"pet\",\"pfizer\",\"pharmacy\",\"phd\",\"philips\",\"phone\",\"photo\",\"photography\",\"photos\",\"physio\",\"pics\",\"pictet\",\"pictures\",\"pid\",\"pin\",\"ping\",\"pink\",\"pioneer\",\"pizza\",\"place\",\"play\",\"playstation\",\"plumbing\",\"plus\",\"pnc\",\"pohl\",\"poker\",\"politie\",\"porn\",\"pramerica\",\"praxi\",\"press\",\"prime\",\"prod\",\"productions\",\"prof\",\"progressive\",\"promo\",\"properties\",\"property\",\"protection\",\"pru\",\"prudential\",\"pub\",\"pwc\",\"qpon\",\"quebec\",\"quest\",\"qvc\",\"racing\",\"radio\",\"raid\",\"read\",\"realestate\",\"realtor\",\"realty\",\"recipes\",\"red\",\"redstone\",\"redumbrella\",\"rehab\",\"reise\",\"reisen\",\"reit\",\"reliance\",\"ren\",\"rent\",\"rentals\",\"repair\",\"report\",\"republican\",\"rest\",\"restaurant\",\"review\",\"reviews\",\"rexroth\",\"rich\",\"richardli\",\"ricoh\",\"rightathome\",\"ril\",\"rio\",\"rip\",\"rmit\",\"rocher\",\"rocks\",\"rodeo\",\"rogers\",\"room\",\"rsvp\",\"rugby\",\"ruhr\",\"run\",\"rwe\",\"ryukyu\",\"saarland\",\"safe\",\"safety\",\"sakura\",\"sale\",\"salon\",\"samsclub\",\"samsung\",\"sandvik\",\"sandvikcoromant\",\"sanofi\",\"sap\",\"sarl\",\"sas\",\"save\",\"saxo\",\"sbi\",\"sbs\",\"sca\",\"scb\",\"schaeffler\",\"schmidt\",\"scholarships\",\"school\",\"schule\",\"schwarz\",\"science\",\"scjohnson\",\"scor\",\"scot\",\"search\",\"seat\",\"secure\",\"security\",\"seek\",\"select\",\"sener\",\"services\",\"ses\",\"seven\",\"sew\",\"sex\",\"sexy\",\"sfr\",\"shangrila\",\"sharp\",\"shaw\",\"shell\",\"shia\",\"shiksha\",\"shoes\",\"shop\",\"shopping\",\"shouji\",\"show\",\"showtime\",\"shriram\",\"silk\",\"sina\",\"singles\",\"site\",\"ski\",\"skin\",\"sky\",\"skype\",\"sling\",\"smart\",\"smile\",\"sncf\",\"soccer\",\"social\",\"softbank\",\"software\",\"sohu\",\"solar\",\"solutions\",\"song\",\"sony\",\"soy\",\"spa\",\"space\",\"sport\",\"spot\",\"spreadbetting\",\"srl\",\"stada\",\"staples\",\"star\",\"statebank\",\"statefarm\",\"stc\",\"stcgroup\",\"stockholm\",\"storage\",\"store\",\"stream\",\"studio\",\"study\",\"style\",\"sucks\",\"supplies\",\"supply\",\"support\",\"surf\",\"surgery\",\"suzuki\",\"swatch\",\"swiftcover\",\"swiss\",\"sydney\",\"symantec\",\"systems\",\"tab\",\"taipei\",\"talk\",\"taobao\",\"target\",\"tatamotors\",\"tatar\",\"tattoo\",\"tax\",\"taxi\",\"tci\",\"tdk\",\"team\",\"tech\",\"technology\",\"temasek\",\"tennis\",\"teva\",\"thd\",\"theater\",\"theatre\",\"tiaa\",\"tickets\",\"tienda\",\"tiffany\",\"tips\",\"tires\",\"tirol\",\"tjmaxx\",\"tjx\",\"tkmaxx\",\"tmall\",\"today\",\"tokyo\",\"tools\",\"top\",\"toray\",\"toshiba\",\"total\",\"tours\",\"town\",\"toyota\",\"toys\",\"trade\",\"trading\",\"training\",\"travel\",\"travelchannel\",\"travelers\",\"travelersinsurance\",\"trust\",\"trv\",\"tube\",\"tui\",\"tunes\",\"tushu\",\"tvs\",\"ubank\",\"ubs\",\"unicom\",\"university\",\"uno\",\"uol\",\"ups\",\"vacations\",\"vana\",\"vanguard\",\"vegas\",\"ventures\",\"verisign\",\"versicherung\",\"vet\",\"viajes\",\"video\",\"vig\",\"viking\",\"villas\",\"vin\",\"vip\",\"virgin\",\"visa\",\"vision\",\"viva\",\"vivo\",\"vlaanderen\",\"vodka\",\"volkswagen\",\"volvo\",\"vote\",\"voting\",\"voto\",\"voyage\",\"vuelos\",\"wales\",\"walmart\",\"walter\",\"wang\",\"wanggou\",\"watch\",\"watches\",\"weather\",\"weatherchannel\",\"webcam\",\"weber\",\"website\",\"wed\",\"wedding\",\"weibo\",\"weir\",\"whoswho\",\"wien\",\"wiki\",\"williamhill\",\"win\",\"windows\",\"wine\",\"winners\",\"wme\",\"wolterskluwer\",\"woodside\",\"work\",\"works\",\"world\",\"wow\",\"wtc\",\"wtf\",\"xbox\",\"xerox\",\"xfinity\",\"xihuan\",\"xin\",\"कॉम\",\"セール\",\"佛山\",\"慈善\",\"集团\",\"在线\",\"大众汽车\",\"点看\",\"คอม\",\"八卦\",\"موقع\",\"公益\",\"公司\",\"香格里拉\",\"网站\",\"移动\",\"我爱你\",\"москва\",\"католик\",\"онлайн\",\"сайт\",\"联通\",\"קום\",\"时尚\",\"微博\",\"淡马锡\",\"ファッション\",\"орг\",\"नेट\",\"ストア\",\"アマゾン\",\"삼성\",\"商标\",\"商店\",\"商城\",\"дети\",\"ポイント\",\"新闻\",\"工行\",\"家電\",\"كوم\",\"中文网\",\"中信\",\"娱乐\",\"谷歌\",\"電訊盈科\",\"购物\",\"クラウド\",\"通販\",\"网店\",\"संगठन\",\"餐厅\",\"网络\",\"ком\",\"亚马逊\",\"诺基亚\",\"食品\",\"飞利浦\",\"手表\",\"手机\",\"ارامكو\",\"العليان\",\"اتصالات\",\"بازار\",\"ابوظبي\",\"كاثوليك\",\"همراه\",\"닷컴\",\"政府\",\"شبكة\",\"بيتك\",\"عرب\",\"机构\",\"组织机构\",\"健康\",\"招聘\",\"рус\",\"珠宝\",\"大拿\",\"みんな\",\"グーグル\",\"世界\",\"書籍\",\"网址\",\"닷넷\",\"コム\",\"天主教\",\"游戏\",\"vermögensberater\",\"vermögensberatung\",\"企业\",\"信息\",\"嘉里大酒店\",\"嘉里\",\"广东\",\"政务\",\"xyz\",\"yachts\",\"yahoo\",\"yamaxun\",\"yandex\",\"yodobashi\",\"yoga\",\"yokohama\",\"you\",\"youtube\",\"yun\",\"zappos\",\"zara\",\"zero\",\"zip\",\"zone\",\"zuerich\",\"cc.ua\",\"inf.ua\",\"ltd.ua\",\"adobeaemcloud.com\",\"adobeaemcloud.net\",\"*.dev.adobeaemcloud.com\",\"beep.pl\",\"barsy.ca\",\"*.compute.estate\",\"*.alces.network\",\"altervista.org\",\"alwaysdata.net\",\"cloudfront.net\",\"*.compute.amazonaws.com\",\"*.compute-1.amazonaws.com\",\"*.compute.amazonaws.com.cn\",\"us-east-1.amazonaws.com\",\"cn-north-1.eb.amazonaws.com.cn\",\"cn-northwest-1.eb.amazonaws.com.cn\",\"elasticbeanstalk.com\",\"ap-northeast-1.elasticbeanstalk.com\",\"ap-northeast-2.elasticbeanstalk.com\",\"ap-northeast-3.elasticbeanstalk.com\",\"ap-south-1.elasticbeanstalk.com\",\"ap-southeast-1.elasticbeanstalk.com\",\"ap-southeast-2.elasticbeanstalk.com\",\"ca-central-1.elasticbeanstalk.com\",\"eu-central-1.elasticbeanstalk.com\",\"eu-west-1.elasticbeanstalk.com\",\"eu-west-2.elasticbeanstalk.com\",\"eu-west-3.elasticbeanstalk.com\",\"sa-east-1.elasticbeanstalk.com\",\"us-east-1.elasticbeanstalk.com\",\"us-east-2.elasticbeanstalk.com\",\"us-gov-west-1.elasticbeanstalk.com\",\"us-west-1.elasticbeanstalk.com\",\"us-west-2.elasticbeanstalk.com\",\"*.elb.amazonaws.com\",\"*.elb.amazonaws.com.cn\",\"s3.amazonaws.com\",\"s3-ap-northeast-1.amazonaws.com\",\"s3-ap-northeast-2.amazonaws.com\",\"s3-ap-south-1.amazonaws.com\",\"s3-ap-southeast-1.amazonaws.com\",\"s3-ap-southeast-2.amazonaws.com\",\"s3-ca-central-1.amazonaws.com\",\"s3-eu-central-1.amazonaws.com\",\"s3-eu-west-1.amazonaws.com\",\"s3-eu-west-2.amazonaws.com\",\"s3-eu-west-3.amazonaws.com\",\"s3-external-1.amazonaws.com\",\"s3-fips-us-gov-west-1.amazonaws.com\",\"s3-sa-east-1.amazonaws.com\",\"s3-us-gov-west-1.amazonaws.com\",\"s3-us-east-2.amazonaws.com\",\"s3-us-west-1.amazonaws.com\",\"s3-us-west-2.amazonaws.com\",\"s3.ap-northeast-2.amazonaws.com\",\"s3.ap-south-1.amazonaws.com\",\"s3.cn-north-1.amazonaws.com.cn\",\"s3.ca-central-1.amazonaws.com\",\"s3.eu-central-1.amazonaws.com\",\"s3.eu-west-2.amazonaws.com\",\"s3.eu-west-3.amazonaws.com\",\"s3.us-east-2.amazonaws.com\",\"s3.dualstack.ap-northeast-1.amazonaws.com\",\"s3.dualstack.ap-northeast-2.amazonaws.com\",\"s3.dualstack.ap-south-1.amazonaws.com\",\"s3.dualstack.ap-southeast-1.amazonaws.com\",\"s3.dualstack.ap-southeast-2.amazonaws.com\",\"s3.dualstack.ca-central-1.amazonaws.com\",\"s3.dualstack.eu-central-1.amazonaws.com\",\"s3.dualstack.eu-west-1.amazonaws.com\",\"s3.dualstack.eu-west-2.amazonaws.com\",\"s3.dualstack.eu-west-3.amazonaws.com\",\"s3.dualstack.sa-east-1.amazonaws.com\",\"s3.dualstack.us-east-1.amazonaws.com\",\"s3.dualstack.us-east-2.amazonaws.com\",\"s3-website-us-east-1.amazonaws.com\",\"s3-website-us-west-1.amazonaws.com\",\"s3-website-us-west-2.amazonaws.com\",\"s3-website-ap-northeast-1.amazonaws.com\",\"s3-website-ap-southeast-1.amazonaws.com\",\"s3-website-ap-southeast-2.amazonaws.com\",\"s3-website-eu-west-1.amazonaws.com\",\"s3-website-sa-east-1.amazonaws.com\",\"s3-website.ap-northeast-2.amazonaws.com\",\"s3-website.ap-south-1.amazonaws.com\",\"s3-website.ca-central-1.amazonaws.com\",\"s3-website.eu-central-1.amazonaws.com\",\"s3-website.eu-west-2.amazonaws.com\",\"s3-website.eu-west-3.amazonaws.com\",\"s3-website.us-east-2.amazonaws.com\",\"amsw.nl\",\"t3l3p0rt.net\",\"tele.amune.org\",\"apigee.io\",\"on-aptible.com\",\"user.aseinet.ne.jp\",\"gv.vc\",\"d.gv.vc\",\"user.party.eus\",\"pimienta.org\",\"poivron.org\",\"potager.org\",\"sweetpepper.org\",\"myasustor.com\",\"myfritz.net\",\"*.awdev.ca\",\"*.advisor.ws\",\"b-data.io\",\"backplaneapp.io\",\"balena-devices.com\",\"app.banzaicloud.io\",\"betainabox.com\",\"bnr.la\",\"blackbaudcdn.net\",\"boomla.net\",\"boxfuse.io\",\"square7.ch\",\"bplaced.com\",\"bplaced.de\",\"square7.de\",\"bplaced.net\",\"square7.net\",\"browsersafetymark.io\",\"uk0.bigv.io\",\"dh.bytemark.co.uk\",\"vm.bytemark.co.uk\",\"mycd.eu\",\"carrd.co\",\"crd.co\",\"uwu.ai\",\"ae.org\",\"ar.com\",\"br.com\",\"cn.com\",\"com.de\",\"com.se\",\"de.com\",\"eu.com\",\"gb.com\",\"gb.net\",\"hu.com\",\"hu.net\",\"jp.net\",\"jpn.com\",\"kr.com\",\"mex.com\",\"no.com\",\"qc.com\",\"ru.com\",\"sa.com\",\"se.net\",\"uk.com\",\"uk.net\",\"us.com\",\"uy.com\",\"za.bz\",\"za.com\",\"africa.com\",\"gr.com\",\"in.net\",\"us.org\",\"co.com\",\"c.la\",\"certmgr.org\",\"xenapponazure.com\",\"discourse.group\",\"discourse.team\",\"virtueeldomein.nl\",\"cleverapps.io\",\"*.lcl.dev\",\"*.stg.dev\",\"c66.me\",\"cloud66.ws\",\"cloud66.zone\",\"jdevcloud.com\",\"wpdevcloud.com\",\"cloudaccess.host\",\"freesite.host\",\"cloudaccess.net\",\"cloudcontrolled.com\",\"cloudcontrolapp.com\",\"cloudera.site\",\"trycloudflare.com\",\"workers.dev\",\"wnext.app\",\"co.ca\",\"*.otap.co\",\"co.cz\",\"c.cdn77.org\",\"cdn77-ssl.net\",\"r.cdn77.net\",\"rsc.cdn77.org\",\"ssl.origin.cdn77-secure.org\",\"cloudns.asia\",\"cloudns.biz\",\"cloudns.club\",\"cloudns.cc\",\"cloudns.eu\",\"cloudns.in\",\"cloudns.info\",\"cloudns.org\",\"cloudns.pro\",\"cloudns.pw\",\"cloudns.us\",\"cloudeity.net\",\"cnpy.gdn\",\"co.nl\",\"co.no\",\"webhosting.be\",\"hosting-cluster.nl\",\"ac.ru\",\"edu.ru\",\"gov.ru\",\"int.ru\",\"mil.ru\",\"test.ru\",\"dyn.cosidns.de\",\"dynamisches-dns.de\",\"dnsupdater.de\",\"internet-dns.de\",\"l-o-g-i-n.de\",\"dynamic-dns.info\",\"feste-ip.net\",\"knx-server.net\",\"static-access.net\",\"realm.cz\",\"*.cryptonomic.net\",\"cupcake.is\",\"*.customer-oci.com\",\"*.oci.customer-oci.com\",\"*.ocp.customer-oci.com\",\"*.ocs.customer-oci.com\",\"cyon.link\",\"cyon.site\",\"daplie.me\",\"localhost.daplie.me\",\"dattolocal.com\",\"dattorelay.com\",\"dattoweb.com\",\"mydatto.com\",\"dattolocal.net\",\"mydatto.net\",\"biz.dk\",\"co.dk\",\"firm.dk\",\"reg.dk\",\"store.dk\",\"*.dapps.earth\",\"*.bzz.dapps.earth\",\"builtwithdark.com\",\"edgestack.me\",\"debian.net\",\"dedyn.io\",\"dnshome.de\",\"online.th\",\"shop.th\",\"drayddns.com\",\"dreamhosters.com\",\"mydrobo.com\",\"drud.io\",\"drud.us\",\"duckdns.org\",\"dy.fi\",\"tunk.org\",\"dyndns-at-home.com\",\"dyndns-at-work.com\",\"dyndns-blog.com\",\"dyndns-free.com\",\"dyndns-home.com\",\"dyndns-ip.com\",\"dyndns-mail.com\",\"dyndns-office.com\",\"dyndns-pics.com\",\"dyndns-remote.com\",\"dyndns-server.com\",\"dyndns-web.com\",\"dyndns-wiki.com\",\"dyndns-work.com\",\"dyndns.biz\",\"dyndns.info\",\"dyndns.org\",\"dyndns.tv\",\"at-band-camp.net\",\"ath.cx\",\"barrel-of-knowledge.info\",\"barrell-of-knowledge.info\",\"better-than.tv\",\"blogdns.com\",\"blogdns.net\",\"blogdns.org\",\"blogsite.org\",\"boldlygoingnowhere.org\",\"broke-it.net\",\"buyshouses.net\",\"cechire.com\",\"dnsalias.com\",\"dnsalias.net\",\"dnsalias.org\",\"dnsdojo.com\",\"dnsdojo.net\",\"dnsdojo.org\",\"does-it.net\",\"doesntexist.com\",\"doesntexist.org\",\"dontexist.com\",\"dontexist.net\",\"dontexist.org\",\"doomdns.com\",\"doomdns.org\",\"dvrdns.org\",\"dyn-o-saur.com\",\"dynalias.com\",\"dynalias.net\",\"dynalias.org\",\"dynathome.net\",\"dyndns.ws\",\"endofinternet.net\",\"endofinternet.org\",\"endoftheinternet.org\",\"est-a-la-maison.com\",\"est-a-la-masion.com\",\"est-le-patron.com\",\"est-mon-blogueur.com\",\"for-better.biz\",\"for-more.biz\",\"for-our.info\",\"for-some.biz\",\"for-the.biz\",\"forgot.her.name\",\"forgot.his.name\",\"from-ak.com\",\"from-al.com\",\"from-ar.com\",\"from-az.net\",\"from-ca.com\",\"from-co.net\",\"from-ct.com\",\"from-dc.com\",\"from-de.com\",\"from-fl.com\",\"from-ga.com\",\"from-hi.com\",\"from-ia.com\",\"from-id.com\",\"from-il.com\",\"from-in.com\",\"from-ks.com\",\"from-ky.com\",\"from-la.net\",\"from-ma.com\",\"from-md.com\",\"from-me.org\",\"from-mi.com\",\"from-mn.com\",\"from-mo.com\",\"from-ms.com\",\"from-mt.com\",\"from-nc.com\",\"from-nd.com\",\"from-ne.com\",\"from-nh.com\",\"from-nj.com\",\"from-nm.com\",\"from-nv.com\",\"from-ny.net\",\"from-oh.com\",\"from-ok.com\",\"from-or.com\",\"from-pa.com\",\"from-pr.com\",\"from-ri.com\",\"from-sc.com\",\"from-sd.com\",\"from-tn.com\",\"from-tx.com\",\"from-ut.com\",\"from-va.com\",\"from-vt.com\",\"from-wa.com\",\"from-wi.com\",\"from-wv.com\",\"from-wy.com\",\"ftpaccess.cc\",\"fuettertdasnetz.de\",\"game-host.org\",\"game-server.cc\",\"getmyip.com\",\"gets-it.net\",\"go.dyndns.org\",\"gotdns.com\",\"gotdns.org\",\"groks-the.info\",\"groks-this.info\",\"ham-radio-op.net\",\"here-for-more.info\",\"hobby-site.com\",\"hobby-site.org\",\"home.dyndns.org\",\"homedns.org\",\"homeftp.net\",\"homeftp.org\",\"homeip.net\",\"homelinux.com\",\"homelinux.net\",\"homelinux.org\",\"homeunix.com\",\"homeunix.net\",\"homeunix.org\",\"iamallama.com\",\"in-the-band.net\",\"is-a-anarchist.com\",\"is-a-blogger.com\",\"is-a-bookkeeper.com\",\"is-a-bruinsfan.org\",\"is-a-bulls-fan.com\",\"is-a-candidate.org\",\"is-a-caterer.com\",\"is-a-celticsfan.org\",\"is-a-chef.com\",\"is-a-chef.net\",\"is-a-chef.org\",\"is-a-conservative.com\",\"is-a-cpa.com\",\"is-a-cubicle-slave.com\",\"is-a-democrat.com\",\"is-a-designer.com\",\"is-a-doctor.com\",\"is-a-financialadvisor.com\",\"is-a-geek.com\",\"is-a-geek.net\",\"is-a-geek.org\",\"is-a-green.com\",\"is-a-guru.com\",\"is-a-hard-worker.com\",\"is-a-hunter.com\",\"is-a-knight.org\",\"is-a-landscaper.com\",\"is-a-lawyer.com\",\"is-a-liberal.com\",\"is-a-libertarian.com\",\"is-a-linux-user.org\",\"is-a-llama.com\",\"is-a-musician.com\",\"is-a-nascarfan.com\",\"is-a-nurse.com\",\"is-a-painter.com\",\"is-a-patsfan.org\",\"is-a-personaltrainer.com\",\"is-a-photographer.com\",\"is-a-player.com\",\"is-a-republican.com\",\"is-a-rockstar.com\",\"is-a-socialist.com\",\"is-a-soxfan.org\",\"is-a-student.com\",\"is-a-teacher.com\",\"is-a-techie.com\",\"is-a-therapist.com\",\"is-an-accountant.com\",\"is-an-actor.com\",\"is-an-actress.com\",\"is-an-anarchist.com\",\"is-an-artist.com\",\"is-an-engineer.com\",\"is-an-entertainer.com\",\"is-by.us\",\"is-certified.com\",\"is-found.org\",\"is-gone.com\",\"is-into-anime.com\",\"is-into-cars.com\",\"is-into-cartoons.com\",\"is-into-games.com\",\"is-leet.com\",\"is-lost.org\",\"is-not-certified.com\",\"is-saved.org\",\"is-slick.com\",\"is-uberleet.com\",\"is-very-bad.org\",\"is-very-evil.org\",\"is-very-good.org\",\"is-very-nice.org\",\"is-very-sweet.org\",\"is-with-theband.com\",\"isa-geek.com\",\"isa-geek.net\",\"isa-geek.org\",\"isa-hockeynut.com\",\"issmarterthanyou.com\",\"isteingeek.de\",\"istmein.de\",\"kicks-ass.net\",\"kicks-ass.org\",\"knowsitall.info\",\"land-4-sale.us\",\"lebtimnetz.de\",\"leitungsen.de\",\"likes-pie.com\",\"likescandy.com\",\"merseine.nu\",\"mine.nu\",\"misconfused.org\",\"mypets.ws\",\"myphotos.cc\",\"neat-url.com\",\"office-on-the.net\",\"on-the-web.tv\",\"podzone.net\",\"podzone.org\",\"readmyblog.org\",\"saves-the-whales.com\",\"scrapper-site.net\",\"scrapping.cc\",\"selfip.biz\",\"selfip.com\",\"selfip.info\",\"selfip.net\",\"selfip.org\",\"sells-for-less.com\",\"sells-for-u.com\",\"sells-it.net\",\"sellsyourhome.org\",\"servebbs.com\",\"servebbs.net\",\"servebbs.org\",\"serveftp.net\",\"serveftp.org\",\"servegame.org\",\"shacknet.nu\",\"simple-url.com\",\"space-to-rent.com\",\"stuff-4-sale.org\",\"stuff-4-sale.us\",\"teaches-yoga.com\",\"thruhere.net\",\"traeumtgerade.de\",\"webhop.biz\",\"webhop.info\",\"webhop.net\",\"webhop.org\",\"worse-than.tv\",\"writesthisblog.com\",\"ddnss.de\",\"dyn.ddnss.de\",\"dyndns.ddnss.de\",\"dyndns1.de\",\"dyn-ip24.de\",\"home-webserver.de\",\"dyn.home-webserver.de\",\"myhome-server.de\",\"ddnss.org\",\"definima.net\",\"definima.io\",\"bci.dnstrace.pro\",\"ddnsfree.com\",\"ddnsgeek.com\",\"giize.com\",\"gleeze.com\",\"kozow.com\",\"loseyourip.com\",\"ooguy.com\",\"theworkpc.com\",\"casacam.net\",\"dynu.net\",\"accesscam.org\",\"camdvr.org\",\"freeddns.org\",\"mywire.org\",\"webredirect.org\",\"myddns.rocks\",\"blogsite.xyz\",\"dynv6.net\",\"e4.cz\",\"en-root.fr\",\"mytuleap.com\",\"onred.one\",\"staging.onred.one\",\"enonic.io\",\"customer.enonic.io\",\"eu.org\",\"al.eu.org\",\"asso.eu.org\",\"at.eu.org\",\"au.eu.org\",\"be.eu.org\",\"bg.eu.org\",\"ca.eu.org\",\"cd.eu.org\",\"ch.eu.org\",\"cn.eu.org\",\"cy.eu.org\",\"cz.eu.org\",\"de.eu.org\",\"dk.eu.org\",\"edu.eu.org\",\"ee.eu.org\",\"es.eu.org\",\"fi.eu.org\",\"fr.eu.org\",\"gr.eu.org\",\"hr.eu.org\",\"hu.eu.org\",\"ie.eu.org\",\"il.eu.org\",\"in.eu.org\",\"int.eu.org\",\"is.eu.org\",\"it.eu.org\",\"jp.eu.org\",\"kr.eu.org\",\"lt.eu.org\",\"lu.eu.org\",\"lv.eu.org\",\"mc.eu.org\",\"me.eu.org\",\"mk.eu.org\",\"mt.eu.org\",\"my.eu.org\",\"net.eu.org\",\"ng.eu.org\",\"nl.eu.org\",\"no.eu.org\",\"nz.eu.org\",\"paris.eu.org\",\"pl.eu.org\",\"pt.eu.org\",\"q-a.eu.org\",\"ro.eu.org\",\"ru.eu.org\",\"se.eu.org\",\"si.eu.org\",\"sk.eu.org\",\"tr.eu.org\",\"uk.eu.org\",\"us.eu.org\",\"eu-1.evennode.com\",\"eu-2.evennode.com\",\"eu-3.evennode.com\",\"eu-4.evennode.com\",\"us-1.evennode.com\",\"us-2.evennode.com\",\"us-3.evennode.com\",\"us-4.evennode.com\",\"twmail.cc\",\"twmail.net\",\"twmail.org\",\"mymailer.com.tw\",\"url.tw\",\"apps.fbsbx.com\",\"ru.net\",\"adygeya.ru\",\"bashkiria.ru\",\"bir.ru\",\"cbg.ru\",\"com.ru\",\"dagestan.ru\",\"grozny.ru\",\"kalmykia.ru\",\"kustanai.ru\",\"marine.ru\",\"mordovia.ru\",\"msk.ru\",\"mytis.ru\",\"nalchik.ru\",\"nov.ru\",\"pyatigorsk.ru\",\"spb.ru\",\"vladikavkaz.ru\",\"vladimir.ru\",\"abkhazia.su\",\"adygeya.su\",\"aktyubinsk.su\",\"arkhangelsk.su\",\"armenia.su\",\"ashgabad.su\",\"azerbaijan.su\",\"balashov.su\",\"bashkiria.su\",\"bryansk.su\",\"bukhara.su\",\"chimkent.su\",\"dagestan.su\",\"east-kazakhstan.su\",\"exnet.su\",\"georgia.su\",\"grozny.su\",\"ivanovo.su\",\"jambyl.su\",\"kalmykia.su\",\"kaluga.su\",\"karacol.su\",\"karaganda.su\",\"karelia.su\",\"khakassia.su\",\"krasnodar.su\",\"kurgan.su\",\"kustanai.su\",\"lenug.su\",\"mangyshlak.su\",\"mordovia.su\",\"msk.su\",\"murmansk.su\",\"nalchik.su\",\"navoi.su\",\"north-kazakhstan.su\",\"nov.su\",\"obninsk.su\",\"penza.su\",\"pokrovsk.su\",\"sochi.su\",\"spb.su\",\"tashkent.su\",\"termez.su\",\"togliatti.su\",\"troitsk.su\",\"tselinograd.su\",\"tula.su\",\"tuva.su\",\"vladikavkaz.su\",\"vladimir.su\",\"vologda.su\",\"channelsdvr.net\",\"u.channelsdvr.net\",\"fastly-terrarium.com\",\"fastlylb.net\",\"map.fastlylb.net\",\"freetls.fastly.net\",\"map.fastly.net\",\"a.prod.fastly.net\",\"global.prod.fastly.net\",\"a.ssl.fastly.net\",\"b.ssl.fastly.net\",\"global.ssl.fastly.net\",\"fastpanel.direct\",\"fastvps-server.com\",\"fhapp.xyz\",\"fedorainfracloud.org\",\"fedorapeople.org\",\"cloud.fedoraproject.org\",\"app.os.fedoraproject.org\",\"app.os.stg.fedoraproject.org\",\"mydobiss.com\",\"filegear.me\",\"filegear-au.me\",\"filegear-de.me\",\"filegear-gb.me\",\"filegear-ie.me\",\"filegear-jp.me\",\"filegear-sg.me\",\"firebaseapp.com\",\"flynnhub.com\",\"flynnhosting.net\",\"0e.vc\",\"freebox-os.com\",\"freeboxos.com\",\"fbx-os.fr\",\"fbxos.fr\",\"freebox-os.fr\",\"freeboxos.fr\",\"freedesktop.org\",\"*.futurecms.at\",\"*.ex.futurecms.at\",\"*.in.futurecms.at\",\"futurehosting.at\",\"futuremailing.at\",\"*.ex.ortsinfo.at\",\"*.kunden.ortsinfo.at\",\"*.statics.cloud\",\"service.gov.uk\",\"gehirn.ne.jp\",\"usercontent.jp\",\"gentapps.com\",\"lab.ms\",\"github.io\",\"githubusercontent.com\",\"gitlab.io\",\"glitch.me\",\"lolipop.io\",\"cloudapps.digital\",\"london.cloudapps.digital\",\"homeoffice.gov.uk\",\"ro.im\",\"shop.ro\",\"goip.de\",\"run.app\",\"a.run.app\",\"web.app\",\"*.0emm.com\",\"appspot.com\",\"*.r.appspot.com\",\"blogspot.ae\",\"blogspot.al\",\"blogspot.am\",\"blogspot.ba\",\"blogspot.be\",\"blogspot.bg\",\"blogspot.bj\",\"blogspot.ca\",\"blogspot.cf\",\"blogspot.ch\",\"blogspot.cl\",\"blogspot.co.at\",\"blogspot.co.id\",\"blogspot.co.il\",\"blogspot.co.ke\",\"blogspot.co.nz\",\"blogspot.co.uk\",\"blogspot.co.za\",\"blogspot.com\",\"blogspot.com.ar\",\"blogspot.com.au\",\"blogspot.com.br\",\"blogspot.com.by\",\"blogspot.com.co\",\"blogspot.com.cy\",\"blogspot.com.ee\",\"blogspot.com.eg\",\"blogspot.com.es\",\"blogspot.com.mt\",\"blogspot.com.ng\",\"blogspot.com.tr\",\"blogspot.com.uy\",\"blogspot.cv\",\"blogspot.cz\",\"blogspot.de\",\"blogspot.dk\",\"blogspot.fi\",\"blogspot.fr\",\"blogspot.gr\",\"blogspot.hk\",\"blogspot.hr\",\"blogspot.hu\",\"blogspot.ie\",\"blogspot.in\",\"blogspot.is\",\"blogspot.it\",\"blogspot.jp\",\"blogspot.kr\",\"blogspot.li\",\"blogspot.lt\",\"blogspot.lu\",\"blogspot.md\",\"blogspot.mk\",\"blogspot.mr\",\"blogspot.mx\",\"blogspot.my\",\"blogspot.nl\",\"blogspot.no\",\"blogspot.pe\",\"blogspot.pt\",\"blogspot.qa\",\"blogspot.re\",\"blogspot.ro\",\"blogspot.rs\",\"blogspot.ru\",\"blogspot.se\",\"blogspot.sg\",\"blogspot.si\",\"blogspot.sk\",\"blogspot.sn\",\"blogspot.td\",\"blogspot.tw\",\"blogspot.ug\",\"blogspot.vn\",\"cloudfunctions.net\",\"cloud.goog\",\"codespot.com\",\"googleapis.com\",\"googlecode.com\",\"pagespeedmobilizer.com\",\"publishproxy.com\",\"withgoogle.com\",\"withyoutube.com\",\"awsmppl.com\",\"fin.ci\",\"free.hr\",\"caa.li\",\"ua.rs\",\"conf.se\",\"hs.zone\",\"hs.run\",\"hashbang.sh\",\"hasura.app\",\"hasura-app.io\",\"hepforge.org\",\"herokuapp.com\",\"herokussl.com\",\"myravendb.com\",\"ravendb.community\",\"ravendb.me\",\"development.run\",\"ravendb.run\",\"bpl.biz\",\"orx.biz\",\"ng.city\",\"biz.gl\",\"ng.ink\",\"col.ng\",\"firm.ng\",\"gen.ng\",\"ltd.ng\",\"ngo.ng\",\"ng.school\",\"sch.so\",\"häkkinen.fi\",\"*.moonscale.io\",\"moonscale.net\",\"iki.fi\",\"dyn-berlin.de\",\"in-berlin.de\",\"in-brb.de\",\"in-butter.de\",\"in-dsl.de\",\"in-dsl.net\",\"in-dsl.org\",\"in-vpn.de\",\"in-vpn.net\",\"in-vpn.org\",\"biz.at\",\"info.at\",\"info.cx\",\"ac.leg.br\",\"al.leg.br\",\"am.leg.br\",\"ap.leg.br\",\"ba.leg.br\",\"ce.leg.br\",\"df.leg.br\",\"es.leg.br\",\"go.leg.br\",\"ma.leg.br\",\"mg.leg.br\",\"ms.leg.br\",\"mt.leg.br\",\"pa.leg.br\",\"pb.leg.br\",\"pe.leg.br\",\"pi.leg.br\",\"pr.leg.br\",\"rj.leg.br\",\"rn.leg.br\",\"ro.leg.br\",\"rr.leg.br\",\"rs.leg.br\",\"sc.leg.br\",\"se.leg.br\",\"sp.leg.br\",\"to.leg.br\",\"pixolino.com\",\"ipifony.net\",\"mein-iserv.de\",\"test-iserv.de\",\"iserv.dev\",\"iobb.net\",\"myjino.ru\",\"*.hosting.myjino.ru\",\"*.landing.myjino.ru\",\"*.spectrum.myjino.ru\",\"*.vps.myjino.ru\",\"*.triton.zone\",\"*.cns.joyent.com\",\"js.org\",\"kaas.gg\",\"khplay.nl\",\"keymachine.de\",\"kinghost.net\",\"uni5.net\",\"knightpoint.systems\",\"oya.to\",\"co.krd\",\"edu.krd\",\"git-repos.de\",\"lcube-server.de\",\"svn-repos.de\",\"leadpages.co\",\"lpages.co\",\"lpusercontent.com\",\"lelux.site\",\"co.business\",\"co.education\",\"co.events\",\"co.financial\",\"co.network\",\"co.place\",\"co.technology\",\"app.lmpm.com\",\"linkitools.space\",\"linkyard.cloud\",\"linkyard-cloud.ch\",\"members.linode.com\",\"nodebalancer.linode.com\",\"we.bs\",\"loginline.app\",\"loginline.dev\",\"loginline.io\",\"loginline.services\",\"loginline.site\",\"krasnik.pl\",\"leczna.pl\",\"lubartow.pl\",\"lublin.pl\",\"poniatowa.pl\",\"swidnik.pl\",\"uklugs.org\",\"glug.org.uk\",\"lug.org.uk\",\"lugs.org.uk\",\"barsy.bg\",\"barsy.co.uk\",\"barsyonline.co.uk\",\"barsycenter.com\",\"barsyonline.com\",\"barsy.club\",\"barsy.de\",\"barsy.eu\",\"barsy.in\",\"barsy.info\",\"barsy.io\",\"barsy.me\",\"barsy.menu\",\"barsy.mobi\",\"barsy.net\",\"barsy.online\",\"barsy.org\",\"barsy.pro\",\"barsy.pub\",\"barsy.shop\",\"barsy.site\",\"barsy.support\",\"barsy.uk\",\"*.magentosite.cloud\",\"mayfirst.info\",\"mayfirst.org\",\"hb.cldmail.ru\",\"miniserver.com\",\"memset.net\",\"cloud.metacentrum.cz\",\"custom.metacentrum.cz\",\"flt.cloud.muni.cz\",\"usr.cloud.muni.cz\",\"meteorapp.com\",\"eu.meteorapp.com\",\"co.pl\",\"azurecontainer.io\",\"azurewebsites.net\",\"azure-mobile.net\",\"cloudapp.net\",\"mozilla-iot.org\",\"bmoattachments.org\",\"net.ru\",\"org.ru\",\"pp.ru\",\"ui.nabu.casa\",\"pony.club\",\"of.fashion\",\"on.fashion\",\"of.football\",\"in.london\",\"of.london\",\"for.men\",\"and.mom\",\"for.mom\",\"for.one\",\"for.sale\",\"of.work\",\"to.work\",\"nctu.me\",\"bitballoon.com\",\"netlify.com\",\"4u.com\",\"ngrok.io\",\"nh-serv.co.uk\",\"nfshost.com\",\"dnsking.ch\",\"mypi.co\",\"n4t.co\",\"001www.com\",\"ddnslive.com\",\"myiphost.com\",\"forumz.info\",\"16-b.it\",\"32-b.it\",\"64-b.it\",\"soundcast.me\",\"tcp4.me\",\"dnsup.net\",\"hicam.net\",\"now-dns.net\",\"ownip.net\",\"vpndns.net\",\"dynserv.org\",\"now-dns.org\",\"x443.pw\",\"now-dns.top\",\"ntdll.top\",\"freeddns.us\",\"crafting.xyz\",\"zapto.xyz\",\"nsupdate.info\",\"nerdpol.ovh\",\"blogsyte.com\",\"brasilia.me\",\"cable-modem.org\",\"ciscofreak.com\",\"collegefan.org\",\"couchpotatofries.org\",\"damnserver.com\",\"ddns.me\",\"ditchyourip.com\",\"dnsfor.me\",\"dnsiskinky.com\",\"dvrcam.info\",\"dynns.com\",\"eating-organic.net\",\"fantasyleague.cc\",\"geekgalaxy.com\",\"golffan.us\",\"health-carereform.com\",\"homesecuritymac.com\",\"homesecuritypc.com\",\"hopto.me\",\"ilovecollege.info\",\"loginto.me\",\"mlbfan.org\",\"mmafan.biz\",\"myactivedirectory.com\",\"mydissent.net\",\"myeffect.net\",\"mymediapc.net\",\"mypsx.net\",\"mysecuritycamera.com\",\"mysecuritycamera.net\",\"mysecuritycamera.org\",\"net-freaks.com\",\"nflfan.org\",\"nhlfan.net\",\"no-ip.ca\",\"no-ip.co.uk\",\"no-ip.net\",\"noip.us\",\"onthewifi.com\",\"pgafan.net\",\"point2this.com\",\"pointto.us\",\"privatizehealthinsurance.net\",\"quicksytes.com\",\"read-books.org\",\"securitytactics.com\",\"serveexchange.com\",\"servehumour.com\",\"servep2p.com\",\"servesarcasm.com\",\"stufftoread.com\",\"ufcfan.org\",\"unusualperson.com\",\"workisboring.com\",\"3utilities.com\",\"bounceme.net\",\"ddns.net\",\"ddnsking.com\",\"gotdns.ch\",\"hopto.org\",\"myftp.biz\",\"myftp.org\",\"myvnc.com\",\"no-ip.biz\",\"no-ip.info\",\"no-ip.org\",\"noip.me\",\"redirectme.net\",\"servebeer.com\",\"serveblog.net\",\"servecounterstrike.com\",\"serveftp.com\",\"servegame.com\",\"servehalflife.com\",\"servehttp.com\",\"serveirc.com\",\"serveminecraft.net\",\"servemp3.com\",\"servepics.com\",\"servequake.com\",\"sytes.net\",\"webhop.me\",\"zapto.org\",\"stage.nodeart.io\",\"nodum.co\",\"nodum.io\",\"pcloud.host\",\"nyc.mn\",\"nom.ae\",\"nom.af\",\"nom.ai\",\"nom.al\",\"nym.by\",\"nom.bz\",\"nym.bz\",\"nom.cl\",\"nym.ec\",\"nom.gd\",\"nom.ge\",\"nom.gl\",\"nym.gr\",\"nom.gt\",\"nym.gy\",\"nym.hk\",\"nom.hn\",\"nym.ie\",\"nom.im\",\"nom.ke\",\"nym.kz\",\"nym.la\",\"nym.lc\",\"nom.li\",\"nym.li\",\"nym.lt\",\"nym.lu\",\"nom.lv\",\"nym.me\",\"nom.mk\",\"nym.mn\",\"nym.mx\",\"nom.nu\",\"nym.nz\",\"nym.pe\",\"nym.pt\",\"nom.pw\",\"nom.qa\",\"nym.ro\",\"nom.rs\",\"nom.si\",\"nym.sk\",\"nom.st\",\"nym.su\",\"nym.sx\",\"nom.tj\",\"nym.tw\",\"nom.ug\",\"nom.uy\",\"nom.vc\",\"nom.vg\",\"static.observableusercontent.com\",\"cya.gg\",\"cloudycluster.net\",\"nid.io\",\"opencraft.hosting\",\"operaunite.com\",\"skygearapp.com\",\"outsystemscloud.com\",\"ownprovider.com\",\"own.pm\",\"ox.rs\",\"oy.lc\",\"pgfog.com\",\"pagefrontapp.com\",\"art.pl\",\"gliwice.pl\",\"krakow.pl\",\"poznan.pl\",\"wroc.pl\",\"zakopane.pl\",\"pantheonsite.io\",\"gotpantheon.com\",\"mypep.link\",\"perspecta.cloud\",\"on-web.fr\",\"*.platform.sh\",\"*.platformsh.site\",\"dyn53.io\",\"co.bn\",\"xen.prgmr.com\",\"priv.at\",\"prvcy.page\",\"*.dweb.link\",\"protonet.io\",\"chirurgiens-dentistes-en-france.fr\",\"byen.site\",\"pubtls.org\",\"qualifioapp.com\",\"qbuser.com\",\"instantcloud.cn\",\"ras.ru\",\"qa2.com\",\"qcx.io\",\"*.sys.qcx.io\",\"dev-myqnapcloud.com\",\"alpha-myqnapcloud.com\",\"myqnapcloud.com\",\"*.quipelements.com\",\"vapor.cloud\",\"vaporcloud.io\",\"rackmaze.com\",\"rackmaze.net\",\"*.on-k3s.io\",\"*.on-rancher.cloud\",\"*.on-rio.io\",\"readthedocs.io\",\"rhcloud.com\",\"app.render.com\",\"onrender.com\",\"repl.co\",\"repl.run\",\"resindevice.io\",\"devices.resinstaging.io\",\"hzc.io\",\"wellbeingzone.eu\",\"ptplus.fit\",\"wellbeingzone.co.uk\",\"git-pages.rit.edu\",\"sandcats.io\",\"logoip.de\",\"logoip.com\",\"schokokeks.net\",\"gov.scot\",\"scrysec.com\",\"firewall-gateway.com\",\"firewall-gateway.de\",\"my-gateway.de\",\"my-router.de\",\"spdns.de\",\"spdns.eu\",\"firewall-gateway.net\",\"my-firewall.org\",\"myfirewall.org\",\"spdns.org\",\"senseering.net\",\"biz.ua\",\"co.ua\",\"pp.ua\",\"shiftedit.io\",\"myshopblocks.com\",\"shopitsite.com\",\"mo-siemens.io\",\"1kapp.com\",\"appchizi.com\",\"applinzi.com\",\"sinaapp.com\",\"vipsinaapp.com\",\"siteleaf.net\",\"bounty-full.com\",\"alpha.bounty-full.com\",\"beta.bounty-full.com\",\"stackhero-network.com\",\"static.land\",\"dev.static.land\",\"sites.static.land\",\"apps.lair.io\",\"*.stolos.io\",\"spacekit.io\",\"customer.speedpartner.de\",\"api.stdlib.com\",\"storj.farm\",\"utwente.io\",\"soc.srcf.net\",\"user.srcf.net\",\"temp-dns.com\",\"applicationcloud.io\",\"scapp.io\",\"*.s5y.io\",\"*.sensiosite.cloud\",\"syncloud.it\",\"diskstation.me\",\"dscloud.biz\",\"dscloud.me\",\"dscloud.mobi\",\"dsmynas.com\",\"dsmynas.net\",\"dsmynas.org\",\"familyds.com\",\"familyds.net\",\"familyds.org\",\"i234.me\",\"myds.me\",\"synology.me\",\"vpnplus.to\",\"direct.quickconnect.to\",\"taifun-dns.de\",\"gda.pl\",\"gdansk.pl\",\"gdynia.pl\",\"med.pl\",\"sopot.pl\",\"edugit.org\",\"telebit.app\",\"telebit.io\",\"*.telebit.xyz\",\"gwiddle.co.uk\",\"thingdustdata.com\",\"cust.dev.thingdust.io\",\"cust.disrec.thingdust.io\",\"cust.prod.thingdust.io\",\"cust.testing.thingdust.io\",\"arvo.network\",\"azimuth.network\",\"bloxcms.com\",\"townnews-staging.com\",\"12hp.at\",\"2ix.at\",\"4lima.at\",\"lima-city.at\",\"12hp.ch\",\"2ix.ch\",\"4lima.ch\",\"lima-city.ch\",\"trafficplex.cloud\",\"de.cool\",\"12hp.de\",\"2ix.de\",\"4lima.de\",\"lima-city.de\",\"1337.pictures\",\"clan.rip\",\"lima-city.rocks\",\"webspace.rocks\",\"lima.zone\",\"*.transurl.be\",\"*.transurl.eu\",\"*.transurl.nl\",\"tuxfamily.org\",\"dd-dns.de\",\"diskstation.eu\",\"diskstation.org\",\"dray-dns.de\",\"draydns.de\",\"dyn-vpn.de\",\"dynvpn.de\",\"mein-vigor.de\",\"my-vigor.de\",\"my-wan.de\",\"syno-ds.de\",\"synology-diskstation.de\",\"synology-ds.de\",\"uber.space\",\"*.uberspace.de\",\"hk.com\",\"hk.org\",\"ltd.hk\",\"inc.hk\",\"virtualuser.de\",\"virtual-user.de\",\"urown.cloud\",\"dnsupdate.info\",\"lib.de.us\",\"2038.io\",\"router.management\",\"v-info.info\",\"voorloper.cloud\",\"v.ua\",\"wafflecell.com\",\"*.webhare.dev\",\"wedeploy.io\",\"wedeploy.me\",\"wedeploy.sh\",\"remotewd.com\",\"wmflabs.org\",\"myforum.community\",\"community-pro.de\",\"diskussionsbereich.de\",\"community-pro.net\",\"meinforum.net\",\"half.host\",\"xnbay.com\",\"u2.xnbay.com\",\"u2-local.xnbay.com\",\"cistron.nl\",\"demon.nl\",\"xs4all.space\",\"yandexcloud.net\",\"storage.yandexcloud.net\",\"website.yandexcloud.net\",\"official.academy\",\"yolasite.com\",\"ybo.faith\",\"yombo.me\",\"homelink.one\",\"ybo.party\",\"ybo.review\",\"ybo.science\",\"ybo.trade\",\"nohost.me\",\"noho.st\",\"za.net\",\"za.org\",\"now.sh\",\"bss.design\",\"basicserver.io\",\"virtualserver.io\",\"enterprisecloud.nu\"]"); /***/ }), /***/ 42357: /***/ ((module) => { "use strict"; module.exports = require("assert");; /***/ }), /***/ 64293: /***/ ((module) => { "use strict"; module.exports = require("buffer");; /***/ }), /***/ 63129: /***/ ((module) => { "use strict"; module.exports = require("child_process");; /***/ }), /***/ 33373: /***/ ((module) => { "use strict"; module.exports = require("crypto");; /***/ }), /***/ 28614: /***/ ((module) => { "use strict"; module.exports = require("events");; /***/ }), /***/ 35747: /***/ ((module) => { "use strict"; module.exports = require("fs");; /***/ }), /***/ 98605: /***/ ((module) => { "use strict"; module.exports = require("http");; /***/ }), /***/ 57211: /***/ ((module) => { "use strict"; module.exports = require("https");; /***/ }), /***/ 11631: /***/ ((module) => { "use strict"; module.exports = require("net");; /***/ }), /***/ 12087: /***/ ((module) => { "use strict"; module.exports = require("os");; /***/ }), /***/ 85622: /***/ ((module) => { "use strict"; module.exports = require("path");; /***/ }), /***/ 94213: /***/ ((module) => { "use strict"; module.exports = require("punycode");; /***/ }), /***/ 71191: /***/ ((module) => { "use strict"; module.exports = require("querystring");; /***/ }), /***/ 92413: /***/ ((module) => { "use strict"; module.exports = require("stream");; /***/ }), /***/ 4016: /***/ ((module) => { "use strict"; module.exports = require("tls");; /***/ }), /***/ 78835: /***/ ((module) => { "use strict"; module.exports = require("url");; /***/ }), /***/ 31669: /***/ ((module) => { "use strict"; module.exports = require("util");; /***/ }), /***/ 92184: /***/ ((module) => { "use strict"; module.exports = require("vm");; /***/ }), /***/ 78761: /***/ ((module) => { "use strict"; module.exports = require("zlib");; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(__webpack_module_cache__[moduleId]) { /******/ return __webpack_module_cache__[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ id: moduleId, /******/ loaded: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ threw = false; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/node module decorator */ /******/ (() => { /******/ __webpack_require__.nmd = (module) => { /******/ module.paths = []; /******/ if (!module.children) module.children = []; /******/ return module; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/compat */ /******/ /******/ __webpack_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup /******/ // Load entry module and return exports /******/ return __webpack_require__(94822); /******/ })() ; //# sourceMappingURL=index.js.map